what kind of error is this?

M

micky

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose
"Properties" and select the Security tab. Click "Add" to add the appropriate
user or group. Highlight the ASP.NET account, and check the boxes for the
desired access.
 
H

Hans Kesting

ASP.NET is not authorized to access the requested resource. Consider granting
access rights to the resource to the ASP.NET request identity. ASP.NET has a
base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service
on IIS 6) that is used if the application is not impersonating. If the
application is impersonating via <identity impersonate="true"/>, the identity
will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated
request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose
"Properties" and select the Security tab. Click "Add" to add the appropriate
user or group. Highlight the ASP.NET account, and check the boxes for the
desired access.

Either you want to read from some file where you don't have access to
(probably on the network - the default ASPNET user has no rights
outside the webserver).
Or you want to write to some file, and ASPNET doesn't have the rights
to do so.

Find out what file it complains about and see the rest of the error
message for "a" way to solve it.

Hans Kesting
 
M

micky

in asp.net 1.0, i worked well if i modify userName to "System" in
processModel propery in Machine.config..

<processModel enable="true" timeout="Infinite" idleTimeout="Infinite"
shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000"
restartQueueLimit="10" memoryLimit="60" webGarden="false"
cpuMask="0xffffffff" userName="SYSTEM" password="AutoGenerate"
logLevel="Errors" clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00" maxWorkerThreads="20"
maxIoThreads="20"/>


but where can i find this username section in asp.net 2.0??

i only find this processModel property..there is no userName attribute..???

<section name="processModel"
type="System.Web.Configuration.ProcessModelSection, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
allowDefinition="MachineOnly" allowLocation="false" />
 
M

micky

there is no write file just read file
error is like this.

Line 29: string fileName =
HttpContext.Current.Server.MapPath(GetSettingsFile());
Line 30: // create a filestream to read the XML document
Line 31: FileStream fs = new FileStream(fileName, FileMode.Open);
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top