0

I developed a console application in C# that should call a Web Service method.

After I added the service reference and VS created the Proxy classes, I could use this to call the method:

        var seed = new Seed.CrSeedClient();
        string semilla = await seed.getSeedAsync();

When getSeedAsync method is called, this is shown in the debug window and, of course, the method does not return what it should.

'ConComm.exe' (CLR v4.0.30319: ConComm.exe): 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_es_b77a5c561934e089\mscorlib.resources.dll' loaded. Module was compiled with no symbols.
Thrown exception: 'System.IO.FileNotFoundException' in mscorlib.dll
Thrown exception: 'System.IO.FileNotFoundException' in mscorlib.dll
'ConComm.exe' (CLR v4.0.30319: ConComm.exe): 'C:\Users\jaime\AppData\Local\Temp\wcu5wg4c\wcu5wg4c.dll' loaded. Symbols loaded.

I have used steps explained here to try to solve the problem.

First, I set

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

in app.manifest file to force the console application to run as administrator.

Second, I added this in app.config file:

  <system.diagnostics>         
    <switches>            
      <add name="XmlSerialization.Compilation" value="4"/>         
    </switches>    
  </system.diagnostics>

when I see C:\Users\jaime\AppData\Local\Temp\ folder, I can check that when that web service method is called, a folder is created with some files in it, so, it is not a permission issue.

What else can I do as another attempt?

By the way, when using SoapUI application, the method works well, so, it is not a problem of the WS.

Regards Jaime

jstuardo
  • 3,901
  • 14
  • 61
  • 136

1 Answers1

0

Maybe try putting a try catch around the method call to see if you could view the InnerException to get more information

try
{
    var seed = new Seed.CrSeedClient();
    string semilla = await seed.getSeedAsync();
}
catch(Exception e)
{
    var details = e.InnerException;
}
  • The problem is that no exception is thrown... as I wrote, the debug window shows the exception, but the method call itself does not throw the exception, so it is not "catched". – jstuardo Sep 27 '19 at 11:23
  • @jstuardo Maybe try cleaning out the bin and obj folders and restoring nuget packages. Maybe it is just a weird VS referencing error. I also found some references [msdn](https://social.msdn.microsoft.com/Forums/vstudio/en-US/3bb56b09-5b6e-4d74-aa0f-7ec03eb591a4/systemiofilenotfoundexception-is-happening-on-debug?forum=csharpgeneral) that might help you. They say you could use a Process Monitor to find what file could be missing [monitor](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon) – Thomas Lieser Sep 27 '19 at 13:41