Problem running .Net executable from classic ASP page

J

jack

Hi there,

I work for a large company and we have been converting executables from
Cobol to C#. After compilation, we move the executable to our server
which has IIS and the NET framework installed.

If I invoke the executable from a command shell on the server, or from
within the SQL batch job facility, it runs without problem. On the
other hand, if I create a classic asp page that calls it using
WScript.shell, like this..

Set wshShell = CreateObject("WScript.Shell")
wshShell.CurrentDirectory=... etc.
wshShell.Run command,,true

and try to invoke it by loading the web page, I get an "access denied"
error in setting up the SQL connection within the executable.

My guess is that the executable, or some of the dlls it calls, does not
wish to allow the IIS process the same ability to run it as it does the
administrator of the server. We have tried having the IIS process run
as the administrator, and played around with file and other permissions
on the server to no avail, and with connection strings under the
assumption that it was a connection problem.

No one here knows .NET very well. The person who is converting the
executables is just a coder. I suspect it is a quick fix, since the
executable can be run by other processes on the server, but NET is a
mystery to me. Any help on resolving this problem would be greatly
appreciated.

Thanks for all your help,

Jack
(Please reply here, as the email I use on google is an old email,)
 
V

Vadym Stetsyak

Hello, jack!

j> If I invoke the executable from a command shell on the server, or from
j> within the SQL batch job facility, it runs without problem. On the
j> other hand, if I create a classic asp page that calls it using
j> WScript.shell, like this..

j> Set wshShell = CreateObject("WScript.Shell")
j> wshShell.CurrentDirectory=... etc.
j> wshShell.Run command,,true

j> and try to invoke it by loading the web page, I get an "access denied"
j> error in setting up the SQL connection within the executable.

What type of authentication is used when conntecting to SQL Server?
Windows or SQL Server?

If windows auth is used, then you should verify that the account under which executable runs has been granted access in the sql server.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top