473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

security execption

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?
Feb 23 '06 #1
3 1151
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
"CsharpGuy" <Cs*******@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
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?

Feb 24 '06 #2
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. Justin Gengo [MCP]" wrote:
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
"CsharpGuy" <Cs*******@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
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?


Feb 24 '06 #3
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
"CsharpGuy" <Cs*******@discussions.microsoft.com> wrote in message
news:38**********************************@microsof t.com...
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. Justin Gengo [MCP]" wrote:
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
"CsharpGuy" <Cs*******@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
>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?
>
>


Feb 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ganesan selvaraj | last post by:
I using C# .net. i want to split the text files based of the some condition. my source text file size may be 4 kb to 4 gb. some time when i split the i got the "out of memory exception. when i...
2
by: robert | last post by:
well, talk about timely. i'm tasked to implement a security feature, and would rather do so in the database than the application code. the application is generally Oracle, but sometimes DB2. ...
116
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data...
9
by: Rasmus | last post by:
I need to set the exception message on an already constructed Exception. Is there a way to accomplish this? Psudo Code: public class MyException : Exception { public MyException (Hashtable...
4
by: Ashish | last post by:
Hi Guys I am getting the following error while implementing authentication using WS-security. "Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated...
0
by: prithvi g via .NET 247 | last post by:
Hi I am a newbie to .NET remoting, I am trying to implementauthorization using SSPI example provided by Michael Barnett. Ihave included the required dll(Microsoft.Samples.Security.SSPI.dll...
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
7
by: Magdelin | last post by:
Hi, My security team thinks allowing communication between the two IIS instances leads to severe security risks. Basically, we want to put our presentation tier on the perimeter network and the...
1
by: fireline1082 | last post by:
HI ALL PLEASE HELP ME. I am stuck on this point and can't do any progress in my project. Currently, I am using Domain Environment. I have Active directory and I want every users when they...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.