Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I keep getting this error when i try to upload files onto a directory on my server.

System.UnauthorizedAccessException: Access to the path 'C:\Users\Fafa\Documents\Visual Studio 2010\Projects\IBGTxalert\TxAlert\TxAlert.Web\Files\linqtoexcel2.xls' is denied.

any help on how to solve this will be deeply appreciated
Posted

1 solution

You can't access folders or files outside the virtual folder where your web site lives. It's a security thing. The only thing you can do is move the desired file to a place INSIDE your web site folder.
 
Share this answer
 
Comments
[no name] 26-Aug-11 10:10am    
its not inside my website. its a file i want to upload into a folder in the website. the problem is anytime i execute the code i get the error

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