Home » VB.NetRSS

Cannot Create ActiveX component under IIS7.5, okay under IIS6

Hello,

I was struggling to find the right forum for this. Hopefully this forum is a suitable one.

We have an application consisting of a VB.Net dll hosted in IIS and a separate VB6 exe (we will upgrade it to .Net in the future). The IIS dll uses DCOM to access the exe and calls GetObject() to obtain its initial reference to it. 
 
We use windows authentication in IIS to control who has access.
 
The application works fine on Windows 2003 SP2 (IIS6), but on Windows 2008 R2 (IIS7.5) the call to GetObject() from the IIS dll fails when the Internet Explorer user is not also an administrator on the server. Err.Description returns "Cannot create ActiveX component".
 
Any suggestions on how I can fix this?
 
Many thanks, Paul
 

8 Answers Found

 

Answer 1

Not sure if I understand your configuration. Is this a web service or are you using .NET remoting? These are the only scenarios I can think of where the DLL would be hosted  by IIS.

 

 

Answer 2

The dll  implements some Web Classes and has been upgraded from VB6 to VB.Net. The terminology used in http://msdn.microsoft.com/en-us/library/zh5976bw(VS.90).aspx describes it as previously an "IIS Application Project", but now it is in VB.Net it called an "ASP.NET Web-site project".

It works  fine on Windows 2003, but we get this problem on 2008.

Thanks, Paul

 

Answer 3

OK, yes I remember Web Classes in VB 6.0 so I understand that part of the scenario. So, is the ASP.NET Web-site project attempting to create  an instance of a VB 6.0 ActiveX EXE? Is the ActiveX EXE installed on the same machine where the Web-site project is running?

If definitely sounds like a security issue so it would help to know where all the components are installed. I would also check the Event Log of the web server to see if there is any additional information.

 

 

Answer 4

The VB6 ActiveX exe  is on the same machine, and is already running when the GetObject call is made. The object we are trying to "get" from the ActiveX exe is a "Multiuse" object which has already been created by the exe.

I could not see anything in the event log (except if I remove the exception handler, then there is "An unhandled exception has occurred" exception from "ASP.NET 2.0.50727.0" in the application  log).

Thanks, Paul

 

 

 

 

 

Answer 5

Are there any dependent components used by this ActiveX EXE component  that may not be registered?

You mentioned using DCOM, but I'm not sure why you would need this for the ActiveX EXE since it's running on the same system as the web application. I would think that using Regsvr32 to register the ActiveX EXE would be sufficient.

Also, if the ActiveX EXE is secured for authenticated users then the web application  would probably need to have impersonation enabled in order to allow authenticated users access  to the component.


Paul ~~~~ Microsoft MVP (Visual Basic)
 

Answer 6

I think everything is registered correctly. The EXE itself is functioning fine  and everything works  correctly when the IE user is an Administrator on the server. The problem of GetObject failing occurs when the IE user is not an administrator on the Window 2008 Server (it works when the platform is Windows 2003 though).

We use DCOM to allow the EXE to be on a different machine, however in this case its on the same machine.

Impersonation is enabled.

I took a look at http://mvolo.com/blogs/serverside/archive/2007/12/08/IIS-7.0-Breaking-Changes-ASP.NET-2.0-applications-Integrated-mode.aspx which is about errors when migrating to IIS7, in particular the points below "Authentication, Authorization and Impersonation", however although my problem may turn out to be related to one of these points I still have not found the solution.

Regards, Paul

 

Answer 7

I think the problem is that the domain users do not have sufficient permissions to access  a running instance of the ActiveX EXE through GetObject. How is this running instance actually started? Is it through the interactive desktop user (Administrator) account?
 

Answer 8


Hello Paul M Jones,

Thanks for your post.

What's the situation on your side? Have you worked around this question? If you still have any problems, you could try to post on iis  7 forum  for better and quicker support. Here is the link:
http://forums.iis.net/default.aspx?GroupID=41

Best regards,

Liliane

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter