<authentication mode="Forms" /> and file access

A

Anton ml. Vaheie

How do I convince (what I have to set in asp.net server) that my program
that is using
<authentication mode="Forms" /> can write to, copy, etc. files in
directories on local disk? I have given full permisions to local directory
(IUSR_Machinename user), but I still get:

"System.UnauthorizedAccessException: Access to the path
"D:\Inetpub\wwwroot\".

Any idea how to change it?
Anton, ml.
 
K

Kristof Van Praet

Hello,

you must make sure that the ASPNET account has read/write permissions to the
folder you want to write to.

or

If you want to grant IUSR_Machinename user or the current windows user (if
anonymous acces in IIS is disables) permissions to write you have to add
this configuration setting in your web.config file:

<identity impersonate="true"/>

This makes that the code is execute as the anonymous user or the
authenticated user.

Hope this helps,
Kristof
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top