{"id":1639,"date":"2022-08-30T15:18:12","date_gmt":"2022-08-30T15:18:12","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/problem-about-archived-forums-n-r-forums-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:18:12","modified_gmt":"2022-08-30T15:18:12","slug":"problem-about-archived-forums-n-r-forums-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-archived-forums-n-r-forums-collection-of-common-programming-errors\/","title":{"rendered":"problem about archived-forums-n-r-forums-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums pex-and-moles-powertool<br \/>\nI&#8217;m running into some problems with detouring method calls with moles.Say for example I have code that in more than one place is calling the following legacy method:public string GetSomeString(someEnum)I want to be able to detour this function call only when certain enumerators are passed in, and for others to have the production code implementation. How do I go about doing this?Initially I would thought this would work:GetSomeStringString = (en) =&gt; {if (en == aSpecificEnumValue){return &#8220;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums phoenix<br \/>\nnow all i want to do is waiting for the phoenix tutorial at CGO.When run the code built with phoenix, there is an exception:FileNotFoundException unhandled(Exception from HRESULT: 0x8007007E)\u00a0Even when I use VS&#8211;&gt;new project to generate an empty phoenix tool, compile and then run, the same exception happened.\u00a0why?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums phoenix<br \/>\nHello. I was attempting to recreate the No op instrumentation tutorial with a instrumentation project of my own. However, every time I run the command-line program, I get the following exception:Phx.FatalError was unhandledWhen I use the debugger, it appears that the exception is coming from the following line:Code SnippetPhx.PE.Writer writer = Phx.PE.Writer.New(Phx.GlobalData.GlobalLifetime, outputFileNameString,outputPdbFileNameStr, peModule, peModule.SymbolTable,peModule.Architecture, peModul<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums phoenix<br \/>\nHello,The sample provided with the Phoenix SDK &#8212; addcall, always ends with a Phx.FatalError. Is someone else facing the same problem? Does someone know the solution?This is the exception that is generated:Unhandled Exception: Phx.FatalError: Exception of type &#8216;Phx.FatalError&#8217; was thrown.\u00a0\u00a0 at Phx.FatalError.Dispatch()\u00a0\u00a0 at Phx.PE.Utilities.UserError(String infoString)\u00a0\u00a0 at Phx.PE.Writer.Write()\u00a0\u00a0 at Phx.PEModuleUnit.Close()\u00a0\u00a0 at main(String[] arguments) in c:\\documents and settings\\prmohan\\my d<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums pex-and-moles-powertool<br \/>\nI am trying to get Moles to work with nUnit. All seems to work fine from VS2010 when I use MSTest. Now I have switched the tests to nUnit and need to get them to run in an instrumented proces. For this I need to get the moles runner working, and that isa problem.When I execute C:\\Program Files\\Microsoft Moles\\bin&gt;moles.runner.x86.exe D:\\Testtools\\Testmachine Parkmanager\\TMPMVMService\\bin\\Debug\\TMPMVMServiceTests.dll \/runner:&#8221;c:\\Development Tools\\NUnit 2.5.2\\bin\\net-2.0\\nunit-console.exe&amp;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums phoenix<br \/>\nThanks in advance!!!What is the possible reason\u00a0the problem ?I used the sampel program to run testapp.exe .It works.While I used it to add call to my own program, it always report an exception message.&#8212;-Here is the exception message&#8212;-I:\\Program Files\\Phoenix SDK June 2008\\samples\\AddCall\\cpp\\Debug&gt;addcall.exe \/out addtest.exe \/pdbout addtest.pdb \/importdll ExoDLL.dll \/importmethod DisplayBox\u00a0\/localmethod foo \/in winform.exeTotal Global Symbols\u00a0 Count &#8211; 2045Unhandled Exception: Phx.FatalEr<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums network-class-library-systemnet<br \/>\nHi,\u00a0I am getting the following error message after deploying the application to server.Server Environment: Windows Server 2008 R2Event code: 3005 Event message: An unhandled exception has occurred. Event time: 6\/8\/2011 7:48:53 AM Event time (UTC): 6\/8\/2011 12:48:53 PM Event ID: b9d9c92dabae455c92ceacf7682aa1b2 Event sequence: 17 Event occurrence: 2 Event detail code: 0 \u00a0Application information: \u00a0\u00a0\u00a0 Application domain: \/LM\/W3SVC\/1\/ROOT\/LTS-1-129520105674665000 \u00a0\u00a0<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums network-class-library-systemnet<br \/>\nI&#8217;ll start on my previous problem: I was using WebClient.DownloadData to download binary data. But, in some cases, the download was too long (not the request-response, mostly because of the streaming). You can read about this problemhere.So, as a workaround, I started using the WebClient.DownloadDataAsync:\u00a0 \u00a0 \u00a0 \u00a0 try\u00a0\u00a0 \u00a0 \u00a0 \u00a0 {\u00a0\u00a0 \u00a0 \u00a0 \u00a0 using (WebClient wc = new WebClient())\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {\u00a0<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums network-class-library-systemnet<br \/>\nHi when i run application, it gives run time error &#8220;HttpListenerException was unhandled&#8221;\u00a0 access denied. At Listener.Start() in my .cs file. and my service is start on fix assign port no. 8082. so please help me, what can i do?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums popfly-bugs-and-suggestions<br \/>\nCustom HTML forms can crash the mashup designer. For example, if I have this HTMLCode Snippet&lt;form&gt;&lt;input type=&#8221;text&#8221; name=&#8221;MyInput&#8221; \/&gt;&lt;\/form&gt;If I type anything into the text box, and hit enter, I get an error saying &#8220;This request has expired.&#8221;.The customise button now does nothing, and I cannot get back to the designer.Cheers ~ Jamie<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums pos-for-net<br \/>\nI am attempting to get the Zebra service object working.I run into numerous problems including the following when I try to run the zebra test application.ZPOS.exe &#8211; Common Language Runtime Debugging Services&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;Application has generated an exception that could not be handled.Process id=0x13d4 (5076), Thread id=0x17d4 (6100).Click OK to terminate the application.Click CANCEL to debug the application.&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;OK\u00a0\u00a0 Cancel\u00a0\u00a0 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;I tried<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums phoenix<br \/>\nIn case anyone else runs into this, I found a solution on the ADO.NET forum:http:\/\/forums.microsoft.com\/MSDN\/ShowPost.aspx?PostID=665884&amp;SiteID=1You need to set Properties &gt; Build &gt; Platform target to &#8220;x86&#8221;. This will force it to run in WoW64, so the 32-bit mixed model Phoenix assemblies will load.Ravi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums pex-and-moles-powertool<br \/>\nHI,Even though i added Moles attribute on my Test method, I am still getting the below error -&gt;Moles requires tests to be an instrumented process.In Visual Studio Unit Test, add the following attribute to your unit test method:[TestMethod][HostType(&#8220;Moles&#8221;)] \/\/ add this attributepublic void Test() { &#8230; }Any Help would be appreciated.-Shashwat<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums network-class-library-systemnet<br \/>\nHi First off I am a Noob to Visual Basic and I am looking a bit of help, I am trying to create a program that will either return a message to say &#8220;I could connect to IP Address and port all is good&#8221; or if it gets the System.Net.Sockets.SocketException wasunhandled message &#8220;I couldnt connect to the IP Address please call them&#8221;Imports System.Net Imports System.Net.SocketsModule Module1Sub Main()Dim hostname As String = &#8220;81.***.***.***&#8221;Dim port As Integer = 5***Dim val<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<br \/>\narchived-forums-n-r-forums network-class-library-systemnet<br \/>\nI got a problem on Socket connect. I tried for a few days but the program also showed error to me that &#8220;SocketException was unhandled:\u00a0no response replied from\u00a0the destination server&#8221; when I compiled the below codes until went to the bold\u00a0code line of\u00a0s.Connect(endPt);\u00a0Please help me for that and thanks all of you in advance.public static bool Send(MailMessage message)\u00a0\u00a0 \u00a0 \u00a0 \u00a0{\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0IPHostEntry I<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-11-27 12:11:03. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>msdn archived-forums-n-r-forums pex-and-moles-powertool I&#8217;m running into some problems with detouring method calls with moles.Say for example I have code that in more than one place is calling the following legacy method:public string GetSomeString(someEnum)I want to be able to detour this function call only when certain enumerators are passed in, and for others to have the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1639","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1639"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1639\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}