Hello. I need to write files from my asp.net 2.0 page. I thought I should have access to the folder where my application files are, but couldn't make it work. If i try to write using: FileStream writer = File.OpenWrite(Server.MapPath('file.txt')); then i get the following error message: Access to the path 'c:\windows\system32\inetsrv\file.txt' is denied. Any ideas? Thanks in advance.
Server.MapPath('file.txt') should not even resolve to that path.Are you having this issue locally ? Vikram DiscountASP.NET www.DiscountASP.NET
Please issue a helpdesk ticket to our technical support from your control panel,because I dont see any reason for Server.Mappath(...) should resolve to 'c:\windows\system32\...' Vikram DiscountASP.NET www.DiscountASP.NET
Locally it maps to C:\inetpub\wwwroot\TestApp\file.txt', which is fine, that's why I don't understand why it it's trying to open the file in c:\windows\system32\inetsrv\file.txt when I try in the hosted environment. Is there anything I need to setup in my app / DiscountASP.net control panel ? Thanks.