From: Juan Marcial on
Hello-

Running VB6 object (EXE ActiveX) on IIS-7 Classic ASP page, get Err:
Permission denied…

Sample of problem:

1. I create a EXE ActiveX with VB6, that's simple:

Project Name: Something
Class: Greeting
Code:
----------------------
Option Explicit

Public Function Hello()
Hello = "Hello " + Format(Now, "hh:nn:ss")
End Function
----------------------

And generate EXE. Now I test it with any VB6 project:
------------------------
Option Explicit

Sub Main()
Dim obj As Object
Set obj = CreateObject("Something.Greeting")
MsgBox obj.Hello
Set obj = Nothing
End Sub
-------------------------
Works fine.

Not I create a new Web site, folder ASPTest, and any page, say Default.asp,
and put this:
--------------------------
<%
Dim obj
On Error Resume Next
Set obj = CreateObject("Something.Greeting")

If Err.Number = 0 Then
Response.Write "<h1>" + obj.Hello + "</h1>"
Set obj = Nothing
Else
Response.Write "Err: " & Err.Description
End If
%>
----------------------------------------------------------

Follow, I add a new Application ASPTest in IIS-W7, with Classic .NET AppPool.
I run: http://localhost/ASPTest
The Browser responses: Err: Permission denied

OK. I create a second ASP page, adoTest.asp, with this code:

<%
Dim obj
On Error Resume Next

Set obj = CreateObject("ADODB.Recordset")

If Err.Number = 0 Then
Response.Write "<h1>" + TypeName(obj) + "</h1>"
Set obj = Nothing
Else
Response.Write "Err: " & Err.Description
End If
%>

Run: http://localhost/ASPTest/adoTest.asp
Response: Recordset (works perfect). This second page say to me that ASP /
ActiveX works fine.

My question is: -How to give permissions of my EXE-ActiveX objects to run
over IIS (Windows 7)?

NOTE. I need and EXE ActiveX, not a DLL ActiveX due to I will going to works
with a client - server application.

--
Juan Marcial
Software Engineer
From: Paul Clement on
On Thu, 11 Feb 2010 06:59:02 -0800, Juan Marcial <eslender2007(a)hotmail.com> wrote:

� Hello-

� Running VB6 object (EXE ActiveX) on IIS-7 Classic ASP page, get Err:
� Permission denied�


What type of security is your ASP app configured for? Anonymous? Basic? Could be that the identity
under which the ASP app is executing does not have sufficient permissions to launch the ActiveX EXE.

The following may help as well (The Client User Does Not Have Sufficient Permissions section):

http://support.microsoft.com/kb/180384

Also, make certain that the Visual Basic runtime permissions are correct:

http://support.microsoft.com/kb/278751


Paul
~~~~
Microsoft MVP (Visual Basic)
From: Juan Marcial on
Thanks Paul

I tried ...
http://support.microsoft.com/kb/180384
but ... This scenario applies to Windows 2000, Windows NT, Windows 95,
Windows 98, and Windows Millennium Edition (Me) servers

It seem to me does not apply to Windows 7, did not work

Now,
http://support.microsoft.com/kb/278751
does neither it solve the simple problem


Is it the real end of VB6 ?

--
Juan Marcial
Ingeniero de Software


"Paul Clement" wrote:

> On Thu, 11 Feb 2010 06:59:02 -0800, Juan Marcial <eslender2007(a)hotmail.com> wrote:
>
> ¤ Hello-
> ¤
> ¤ Running VB6 object (EXE ActiveX) on IIS-7 Classic ASP page, get Err:
> ¤ Permission denied…
> ¤
>
> What type of security is your ASP app configured for? Anonymous? Basic? Could be that the identity
> under which the ASP app is executing does not have sufficient permissions to launch the ActiveX EXE.
>
> The following may help as well (The Client User Does Not Have Sufficient Permissions section):
>
> http://support.microsoft.com/kb/180384
>
> Also, make certain that the Visual Basic runtime permissions are correct:
>
> http://support.microsoft.com/kb/278751
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
> .
>
From: Paul Clement on
On Fri, 12 Feb 2010 06:21:02 -0800, Juan Marcial <eslender2007(a)hotmail.com> wrote:

� Thanks Paul

� I tried ...
� http://support.microsoft.com/kb/180384
� but ... This scenario applies to Windows 2000, Windows NT, Windows 95,
� Windows 98, and Windows Millennium Edition (Me) servers

� It seem to me does not apply to Windows 7, did not work

� Now,
� http://support.microsoft.com/kb/278751
� does neither it solve the simple problem


� Is it the real end of VB6 ?

Well, yes it is the end of VB 6.0, but I don't think that is the problem here.

An ActiveX EXE is typically not run from an ASP app and you're probably encountering security
issues. In any event, you should be using an ActiveX DLL. Even in a client server configuration you
can host an ActiveX DLL in COM+ and access this component from an ASP app or a desktop app running
on another system on the network.

You can find the COM+ applet (Component Services) in Control Panel under Administrative Tools.


Paul
~~~~
Microsoft MVP (Visual Basic)