iis - Creating a file in wwwroot -


I have place c: / Inseptp / wwwroot / sample

in IIS and there is a website sample There is a folder in C: / inetpub / wwwroot / sample / work

I can not read or write a file in this work folder. I am using C # to read and write I have set up NTFS permissions for full access, still the problem

Please help

This is probably related to a problem with ACL, When you run it in Visual Studio WebDiv Server, it runs using your identity, and if you use Visual Studio in a similar way (Vista +) then you can actually run as an Administrator when you use the IIS Run it in the form of a service identity, for IIS 6 and 7 Generally network service, or apple recognition for IIS 7 SP2 and IIS 7.5 One thing I would suggest is to add some tracing information that is trying to write the file, for example try / hold where the exception is sent to trace so that you can enable tracing and determine Whether or not an exception is happening or not. Also make sure that you are using the correct physical path because you can also have problems with relative paths because IIS will probably solve them in system 32 if you server. Mappath or something similar are not used.


Comments