1
votes

I am having an issue related to executing a .Net dll from a classic asp application on a 64 Bit Windows Server 2008 server running IIS7. The situation is as follows:

I have written a .Net C# assembly to perform some encryption tasks. This assembly has been made available to the classic ASP environment via inheriting from ServicedComponent, ensuring the assemblyinfo file has the ComVisible(true) attribute, and it has been installed using the "regsvcs" command line.

When testing on my own desktop (XP running IIS6) everything worked fine. When moving to IIS 7, Windows Server 2008 I get the infamous "ASP 0177 Server.CreateObject failed".

I have tried the following to no avail:

  1. Ensuring the ASP and Script Extension features were installed on the server, as this is not the default for IIS7. This allowed me to execute simple ASP commands, but not server.createobject for the .net assembly.
  2. Enabled 32 Bit application support for the app pool supporting the classic asp site
  3. Used NetworkService as the identity for the app pool supporting the classic asp site
  4. Tried registering dll using regsvr32, which failed
  5. I am able to create other objects such as "scripting.filesystemobject"
  6. Moving dll's to the wow64 directory and then using regsvcs to register them.
  7. And yes when I have been executing the regsvcs commands they have been from a command line launched with "RunAs" Administrator. The regsvcs commands have registred successfully from both the 64 and 32 bit versions. However, when used from the classic asp application, it fails.

This question is closely related to this one. However, I think this question was more related to using tools on the server as opposed to a programatic problem similiar to mine.

Anyone have any more ideas to try?

3
Downgrade to windows 2003? It sounds like you really don't need 2008. - NotMe
Unfortunately, for this situation I do not have the option of downgrading to Windows 2003. Most of the web site will be built in .Net as we migrate the classic asp application to .Net. So, I think we will have to figure out the issue :( - Pat

3 Answers

6
votes

After a lot of help here and some more research, we finally came across the answer. To solve our issue we did the following:

  • No longer inherit from ServiceComponent (This is ok, since we are not actually leveraging any specific COM+ features)
  • Utilized the following commands to install the component, which must be done in order:

    gacutil /i "C:\Inetpub\wwwroot\ASPTest*name of dll*"

    regasm /tlb "C:\Inetpub\wwwroot\ASPTest*name of dll*"

This process eliminated the original errors and also had the added benefit of being able to replace the dll while IIS is running.

2
votes

Try this

Component Services -> Computers -> My Computer -> COM+ Applications

Open a COM+ Application object.

Open Components.

Right-click on a class and select Properties.

Under "Advanced" there is a check box for "Allow IIS intrinsic properties".

It works for me

0
votes

Create a vbs test file and try to create your COM object there. If you can't (i.e. you get the same error) then your component is not registered correctly. If you can - then it was installed correctly and the problem is with the lack of permissions for the account your application is executed under in IIS.