HTTPHandler to create & write files
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I have several web apps on my server. One of them is based on the HTTPHandler class. This needs to create and write a file in dir 'c:\inetpub\wwwroot\httphandlers'. Its being run under the ASPNET account, which does not have write privileges for this dir. I could change the ASPNET account to be of type 'administrator', but that does not seem like a safe thing to do. Another would be to write this file to dir \temp, a dir that is used to support web services. Is it safe to do so? If not, is this a case where I should use 'Impersonation'? This file needs to persist through the lifetime of the application, and the solution needs to work for Windows XP, and Windows 2003 server. Thanks. -Shefali