I am trying to browse an image and i will search for the images with the same name in the folder called IMAGES . If it exists i just replace it
when i run my project using Visual Studio its working fine and image is perfectly getting replaced

when i do the same thing after publishing it , its saying
Access to the path 'C:\Inetpub\wwwroot\ms\IMAGES\' is denied.

I tried these things still not working
1) In the folder properties i allowed web sharing with read and write options
2) In the IIS for the IMAGES folder i gave read, write all permissions
3) In the web.config file identity impersonate = true
and authentication mode = "Windows'

Please solution for this

You have enabled impersonation with Windows Authentication. Therefore the web applications run under the user's account who access the web site from browser. Therefore the user account should have read/write access to the IMAGES folder in the server where the application is running.

Also the asp.net application runs under ASPNET account in Windows XP and Network Service account in Windows 2003, you need to provide to read/write access to the folder for these accounts.

also check the the folder itself is not read only.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.