Click here to Skip to main content
15,877,915 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
We have a .net application which will executes the code and creates the batch file at remote path and then execute these files when I am debugging the code everthing going fine but when i published the code and hosted in IIS server the batch file is getting created but not getting executed can anyone please help me out of this issue
Posted
Updated 24-Jun-15 19:58pm
v2
Comments
virusstorm 25-Jun-15 15:53pm    
I suspect you are running into a security problem. What account is your .NET application running under? When you run it locally, it uses your local account to access the resources. If you didn't change the account the application runs under, the default account will not have the necessary permissions. Take a look at your event viewer on the server that is hosting the application, you should see some additional information.
Member 11790952 26-Jun-15 2:05am    
Hi,
Thanks for your help:-)
I believe that here the problem with my application is when we are executing on the Published version it is running under the logged in user’s name.

Here Instead of getting Everyone executable rights to remote path I heard that we can overcome this issue with Impersonation in ASP.NET

Here I need to know how to Impersonate the current user with specific user which are having executable rights and again how to undo the impersonation after running batch files ?
As I am oracle pl/sql developer I don't have any Idea on this can you please help me on this.I am not asking you the written code but I want a help how can I achieve this??

Thanks in advance:-)
Warm Regards,
Surendra
Herman<T>.Instance 8-Jul-15 11:26am    
did you debug to see of the problem IS your application?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900