Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM+ with ASP.Net

Status
Not open for further replies.

GoTerps88

Programmer
Apr 30, 2007
174
US
I needed to create a component that can be used by both ASP and ASP.NET at the same time. I originally created a COM Interop assembly, but I don't believe that's accessible by ASP.NET. I then created a COM+ assembly. I successfully referenced this locally in both in ASP and ASP.NET.

However, I started having problems when I deployed this to a webserver on the network. I used regsvcs to register the component on the webserver. That ran successfully. I verified the entry for this component in the registry, so I am assuming it registered properly.

When I accessed this from ASP.NET everything was kosher. But when I accessed this component via ASP, I received a 'cannot create object' when I call the component from Server.CreateObject("..."). I had COM Visible = true specified in the AssemblyInfo file. Again, this identical dll works locally but throws an error when I try to access this via ASP on the development webserver. I have specified full trust on the entire virtual directory folder for the localintranet code group.

Any pointers in the right direction will be much appreciated.

I am using Visual Studio 2005 with C#.
 
I still suspect that a problem exists with the registration of this assembly. Can an assembly be registered properly but not accessible? Being that this is essentially a COM component, I tried to create a reference within Visual Basic 6 to the type library of this dll on the network. It threw an error like "library not available". However, I can create a reference to the local reference to the type library that's located on the C drive. I can then call methods on this component within Visual Basic 6, just only with the local reference, not the one on the web server.
 
Correct, it works within ASP.NET but not Classic ASP -- at least on the network. But locally both work.
 
The specific error I received in ASP was 'ASP 0177 8013150a: Server can't create object'.

This is actually a different error than if the component doesn't exist or isn't registered. I think you would get 'ASP 0177 800401f3'.

Hope this helps.
 
Well, I think the assembly had to be registered because when I unregistered it, I got an error when trying to access from ASP.NET.

So perhaps the real kicker is that this assembly is not visible to COM on the network? However it's visible to COM locally.
 
But the main issue is that this is a .NET assembly that's being referenced by both architectures.
 
From what I can gather from the information you've posted you've written the assembly and integrated it into an ASP.NET application (and proved it works).

Is this correct? If so, then isn't your only issue the fact that it doesn't work when calling it from classic ASP? If that is correct then I don't see how it isn't a question for the ASP forum.

Or have I misunderstood your posts?


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
No one here can seem to answer this question, so I will post it over there.

This is not a subject many people seem to know much about.
 
I wasn't able to knock anyone's knowledge in this forum. I would definitely qualify the top-ranking members higher than me.

It just seems COM Interop seems to be a niche area in the .NET realm.
 
I thought that ASP and ASP.Net were two different scripting languages; that's why there is a forum for each language?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top