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. Using a COM object from a .NET web service

Using a COM object from a .NET web service

Scheduled Pinned Locked Moved Web Development
csharphelpc++visual-studiocom
2 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.
  • D Offline
    D Offline
    DavidWilson1974
    wrote on last edited by
    #1

    Hi guys! I'm developing my first web service, have stumbled a little and was wondering if anybody can offer any suggestions. I've setup an autogenerated managed C++ web service using visual studio .net....I'm exporting and can use basic methods from the webservice without any problems. What I really want to do is get my web service method to call methods on a COM object I've written. I've used this COM object many times from managed C++ without any problems by accessing it via an assembly that was generated using tlbimp. Any web service method that attempts to instantiate my COM object fails and returns an error 500 to the client browser. Basically, this works - String __gc* MyWebClass::FindAddress() { return S"Address Not Found"; } but this returns error 500 - String __gc* MyWebClass::FindAddress() { SimpleATLObjectLib::TesterClass *myTester = new SimpleATLObjectLib::TesterClass ; return S"Face Not Found"; } I'm assuming my problem is something to do with security, some IIS setting or the assembly/COM .dll files not being in the correct place but am having trouble figuring out whats going on. Could anybody make any suggestions? Thanks in advance! David

    L 1 Reply Last reply
    0
    • D DavidWilson1974

      Hi guys! I'm developing my first web service, have stumbled a little and was wondering if anybody can offer any suggestions. I've setup an autogenerated managed C++ web service using visual studio .net....I'm exporting and can use basic methods from the webservice without any problems. What I really want to do is get my web service method to call methods on a COM object I've written. I've used this COM object many times from managed C++ without any problems by accessing it via an assembly that was generated using tlbimp. Any web service method that attempts to instantiate my COM object fails and returns an error 500 to the client browser. Basically, this works - String __gc* MyWebClass::FindAddress() { return S"Address Not Found"; } but this returns error 500 - String __gc* MyWebClass::FindAddress() { SimpleATLObjectLib::TesterClass *myTester = new SimpleATLObjectLib::TesterClass ; return S"Face Not Found"; } I'm assuming my problem is something to do with security, some IIS setting or the assembly/COM .dll files not being in the correct place but am having trouble figuring out whats going on. Could anybody make any suggestions? Thanks in advance! David

      L Offline
      L Offline
      Leather99
      wrote on last edited by
      #2

      Presumably you have referenced the com object... Can you not just debug it, catch the exception and see what it is? MCSD(VB6/SQL7) MCAD(C#/SQL200) MCSD(C#/SQL200)

      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