security execption

G

Guest

I have an asp.net (C#) web form that needs to run an exe off of a network
drive and when i load the page i'm getting the following error message:
The application attempted to perform an operation not allowed by the
security policy. To grant this application the required permission please
contact your system administrator or change the application’s trust level in
the configuration file.

Now, I'm running IIS 5 and I've tried on this says:
http://support.microsoft.com/?kbid=555466&SD=tech
but IIS 5 doesnt have application pools, and I tried it on my test box
which is running IIS 6 but i still got the error message.

how can i run an exe from a network share via an asp.net web form?
 
S

S. Justin Gengo [MCP]

CsharpGuy,

I haven't done this myself, but what little I've come across has always been
about using PInvoke in order to run the application via a specified user
account that will have the proper permissions.

This blog post may help:
http://west-wind.com/weblog/posts/1572.aspx

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
G

Guest

thanks, i'll check that out. but what is going on is this:
I have a DLL created in c# and it calls a exe on a network shared drive. The
DLL is then referenced on my web page and my web pages calls the DLL and when
i load my page i get the security error message. BUT, i created a windows
tester app and called the same DLL the same way,. etc and the windows apps
works fine, so what is different between windows security and a web app
security?
 
S

S. Justin Gengo [MCP]

CsharpGuy,

The big difference there would be that the windows application is running as
you. When the .dll is called the application is using the same network
permissions you have.

The web app runs as (If you didn't change it) IUSR_[MachineName]. You could
look into user impersonation from a web application in order to load the
..dll by creating a network account to run the website as.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

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

Similar Threads

Security issue on Windows7 1
Security Exception 0
Weird security configuration message 3
Security Error 0
Security Problem 1
Security Exception 1
Security policy problem 2
security... 0

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
Martindap

Latest Threads

Top