Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

handling file permission

Status
Not open for further replies.

fmardani

Programmer
Jul 24, 2003
152
Hi,
I have created a stored procedure which runs uses master..xp_cmdshell @filename

This SP basically transfers a file from the network onto my pc.
When this sp is run in the quesry analyser, it works fine but not in ASP.NET
As soon as it hits the ExecuteNoNQuery then it says that there is a severe error.
I believe this is to do with permissioning??
The anonymous access is unchecked.
Do you know what can be done to run this sp in ASP.NET please?
Thanks
 
You could try adding:

<authentication mode="Windows" />
<identity impersonate="true" />

to have asp.net pick up your username and settings.


 
Sorry, I should specify that would be in your web.config file.
 
This is already set in the web.config and does not do what I am after.
Thanks
 
If something's running for you but not in ASP.NET, it's probably a permissiosn problem. IF the above doesn't help, you could also try giving the ASP.NET "user" administrator access to your computer - you can do this through users in the control panel. Also, are you specifying a valid user for the (sql?) server to be able to access the SP?
 
Did you set the SQL Server Permissions for the User that you log into it with?

Hope everyone is having a great day!

Thanks - Jennifer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top