Access denied error
-
Hi everybody, I created a site using asp.net 2.0. That site has an html file which used to read and write some html codes at runtime. But I got an error message that is "Access to the path 'D:\WWWRoot\bolt.cc\www\Admin\Msg.htm' is denied." I talked with the service providers. They told me that they give full permission to that file. Also I checked the permission though the site control panel. The file has full permission to read and write. It is working correctly in the local mechine. This error occured at the time of open the file to write. Can you please tell the reason of this error? Thanks and Regards, Hogan
-
Hi everybody, I created a site using asp.net 2.0. That site has an html file which used to read and write some html codes at runtime. But I got an error message that is "Access to the path 'D:\WWWRoot\bolt.cc\www\Admin\Msg.htm' is denied." I talked with the service providers. They told me that they give full permission to that file. Also I checked the permission though the site control panel. The file has full permission to read and write. It is working correctly in the local mechine. This error occured at the time of open the file to write. Can you please tell the reason of this error? Thanks and Regards, Hogan
You can ask the provider to give ASP.NET account for full permission on that directory. If it's not possible, ask them an account name and password which is having full rights on the directory, then use impersonation before you write something to the file. You may check this[^] for getting an idea.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions