Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Can't load proxy class created via "Add Web Reference..."

Can't load proxy class created via "Add Web Reference..."

Scheduled Pinned Locked Moved Web Development
announcementcsharpvisual-studiowcfsysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bwilhite
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • B bwilhite

      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

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      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.'

      B 1 Reply Last reply
      0
      • S Shog9 0

        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.'

        B Offline
        B Offline
        bwilhite
        wrote on last edited by
        #3

        Yes, that's what I had read also and I'd figured other project types would do the same, so I was surprised at the runtime exception... I think maybe I'll try the .NET forum...this problem is hard to classify.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups