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