what kind of error is this?

Discussion in 'ASP .Net' started by micky, Dec 7, 2005.

  1. micky

    micky Guest

    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.
     
    micky, Dec 7, 2005
    #1
    1. Advertisements

  2. micky

    Hans Kesting Guest

    ASP.NET is not authorized to access the requested resource. Consider granting
    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
     
    Hans Kesting, Dec 7, 2005
    #2
    1. Advertisements

  3. micky

    micky Guest

    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" />
     
    micky, Dec 7, 2005
    #3
  4. micky

    micky Guest

    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);
     
    micky, Dec 7, 2005
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.