Jain Vijay wrote:
I m trying to upload file on sever through upload control. code is working fine in local environment. also i have test code in asp. But when i have deployed the same asp.net code on server, getting this error....
Vijay,
This is the problem with Access permissions on web server. Let me discussed it in details.
Why it was working on Local Environment ?Becuase, In VS, you application is running by
ASP.NET Engine
, which having the all rights to write data on your system, so its working fine on Local Enviroment.
Why not in Hosted Server ?Web Appliction runs on server with some limited permission for security reasons and user does not have the suficient permission to write data on Folder. So you are getting the Error.
Resolution :1. Give the
Full Access rights
to all the user on the folder where you are storing the file.
2. Create a Separate Application Pool on Web server, Change the Identity of Application pool to "
Local System
" ( Which having the maximum permissions) .
And assigned it to your virtual directory.
Hope this details explained will help you :-D