Reputation: 111
Windows 7 32 bit, IIS 7.5.760016385
I created a DLL in Visual Basic 6.0 and trying to use it from within classic ASP code:
set obj = Server.CreateObject("a.b")
I get the following error:
006 ASP 0178
Server.CreateObject Access Error
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
err.number = -2147024891
I have tried creating the iusr_cmpname user and giving rights to it in the Default website and virtual directory of this ASP page. I have REGSVR32'd the dll's.
I have gone to "Turn Windows features on and off" and selected IIS/World Wide Web Services/Application Development Features then CHECKED off ASP, ASP.net, ISAPI extensions, and ISAPI filers.
I have followed many leads in different Newsgroups but I can get past this problem. We tried this last year, a year and 1/2 ago and had the same problem. Since we couldn't conquer this problem, we went back to Windows NT. We never had this problem on NT.
Now we are trying again to get past this so we can move to Windows 7 again. It seems that many people had this problem but any solution they found and have posted, don't seem to be what I need.
Any help will be appreciated. Thank you.
Upvotes: 11
Views: 28645
Reputation: 21
I think I was having a similar problem. I was trying to interactivey debug code in a VB6 DLL that was running in the VB6 IDE from a classic ASP application. When the application executed the Server.CreateObject statement it returned the following error:
Server object: 006~ASP 0178~Server.CreateObject Access Error~The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
BTW, I am running IIS 7.5 in a Windows 7 environment. I finally found a Microsoft article that said the problem was due to a missing registry entry for VB ASP Debugging in DCOM and/or inadequate permissions with DCOM, not IIS. The URL for the article is http://support.microsoft.com/kb/q259725. I implemented Work Around #1. One re-boot later, I could step into the VB DLL code from ASP. Chalk one up for Microsoft, and I don’t say that very often :-)
Upvotes: 0
Reputation: 375
Another approach that might work, is to install the DLL as DCOM application on dcomcnfg. It will run under different credentials.
Upvotes: 0
Reputation: 18803
The problem seems to be related to IIS not being able to access YOUR custom VB6 Active X dll on the file system. I registered a custom dll, that I created, in the same directory as the default web application and was able to get ASP to create the object.
Here's what I did:
Clean install of Windows 7 Professional 64 bit, SP1.
Enable the Windows ASP feature
This step ONLY for 64-bit Windows - Using IIS Manager, enable 32 bit applications for the default application pool.
Utils.cls:
Public Function Sum(ByVal a As Integer, ByVal b As Integer) As Integer
Sum = a + b
End Function
Default.asp:
<%@ Language=VBScript %>
<%
Option Explicit
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
Function Sum(a, b)
Sum = a + b
End Function
Function Sum2(a, b)
Dim adder
set adder = Server.CreateObject("CXUtils.Utils")
Sum2 = adder.Sum(a, b)
set adder = nothing
End Function
%>
<html>
<head>
<title>Add</title>
</head>
<body>
<b>2 + 3</b> = <%= Sum(2,3) %><br />
<b>3 + 4</b> = <%= Sum2(3,4) %>
</body>
</html>
My apologies if this doesn't all compile - there was a lot of editing to get the formatting to appear correctly.
Upvotes: 5
Reputation: 39823
I strongly recommend using Procmon to find the access violation. I had a similar issue years ago, and this was the only thing that solved it. In that scenario, it turned out to be a lack of permissions on the system temp folder.
If you post the results from Procmon, I may be able to amend this answer to be more helpful.
Upvotes: 4
Reputation: 12485
This page suggests that the problem may be the access rights assigned to the VB runtime. Try assigning everyone read and execute permissions on Msvbvm60.dll.
http://support.microsoft.com/kb/278013
Upvotes: 1