Reputation: 5025
I have an unmanaged COM object, and I would like to call it from ASP.NET 3.5.
Can I just call it like in C# or do I have to write something special in the web.config, or configure the IIS specialy.
Right now I'm getting a stackoverflow exception.
Upvotes: 1
Views: 421
Reputation: 7506
For .NET projects you have the COM tab in the "Add References" dialog. Add a reference to your COM object and it should just work.
If it works on a development machine, but not in production you just have to check all the usual suspects:
Upvotes: 1
Reputation:
You can't just call a com object from managed code. You have to P/Invoke it. Check out pinvoke.net for how to p/invoke most of the windows API. There is also a tool for generating p/invoke code called the p/invoke interop assistant.
As to why you're getting the overflow, its probably unrelated to any com calls. You're probably doing something else wrong. Check your properties, its one of the most common places you'll end up with a SO. Also, check your call stack at the point of the overflow, as it will tell you what method(s) is/are causing the issue.
Upvotes: 1