Can't load proxy class created via "Add Web Reference..."
-
Hi, I have a web service I created and uploaded to my server. In another project (output type .dll) I added a reference to the service via "Add Web Reference..." dialog. All seemed fine at first. A file called Reference.cs is added under the web reference node, and when I look at it, this looks just like the proxy class that is needed. The Build Action associated with this file is "Compile." I am also able to use intellisense to get access to the created proxy class, and when I load the .dll from another project in the same solution through the debugger, everything works fine. However, when I copy the files from my bin\Release\ to another folder (and also calling the .dll from a separate solution altogether), I get an exception : "System.TypeLoadException: Could not load type 'Trading.BrokerProxy.net.sbjgroup.CustomerMgmtSvc' from assembly 'SBJCharts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'..." (where Trading.BrokerProxy.net.sbjgroup.CustomerMgmtSvc is the proxy class) The other part of all of this, is that if I generate the proxy class via wsdl.exe and add the output to my project...at that point all works as expected (after I also remove the WebReference). I'd really like to figure out what's going on here, as it would be much simpler just to add the WebReference and then everything works as expected. Thanks in advance. BW
-
Hi, I have a web service I created and uploaded to my server. In another project (output type .dll) I added a reference to the service via "Add Web Reference..." dialog. All seemed fine at first. A file called Reference.cs is added under the web reference node, and when I look at it, this looks just like the proxy class that is needed. The Build Action associated with this file is "Compile." I am also able to use intellisense to get access to the created proxy class, and when I load the .dll from another project in the same solution through the debugger, everything works fine. However, when I copy the files from my bin\Release\ to another folder (and also calling the .dll from a separate solution altogether), I get an exception : "System.TypeLoadException: Could not load type 'Trading.BrokerProxy.net.sbjgroup.CustomerMgmtSvc' from assembly 'SBJCharts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'..." (where Trading.BrokerProxy.net.sbjgroup.CustomerMgmtSvc is the proxy class) The other part of all of this, is that if I generate the proxy class via wsdl.exe and add the output to my project...at that point all works as expected (after I also remove the WebReference). I'd really like to figure out what's going on here, as it would be much simpler just to add the WebReference and then everything works as expected. Thanks in advance. BW
AFAIK, ASP.NET actually builds the stuff in the Web References directory at run-time. Not sure how that works for non-ASP.NET projects. You might get more help by asking in the C#, .NET, or ASP.NET forums - those folks are old pros at this crazy stuff.
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
-
AFAIK, ASP.NET actually builds the stuff in the Web References directory at run-time. Not sure how that works for non-ASP.NET projects. You might get more help by asking in the C#, .NET, or ASP.NET forums - those folks are old pros at this crazy stuff.
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'