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. Advertising

  2. micky

    Hans Kesting Guest

    Re: =?UTF-8?B?d2hhdCBraW5kIG9mIGVycm9yIGlzIHRoaXM/?=

    > 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
     
    Hans Kesting, Dec 7, 2005
    #2
    1. Advertising

  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" <> wrote in message
    news:u5dXq1x%...
    > 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
    #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);


    "Hans Kesting" <> wrote in message
    news:...
    >> 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
    >
    >
     
    micky, Dec 7, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike

    What kind of error is this??

    mike, Nov 14, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    1,539
  2. Replies:
    0
    Views:
    419
  3. Nils Petter Vaskinn
    Replies:
    0
    Views:
    789
    Nils Petter Vaskinn
    Jun 25, 2003
  4. Ron Natalie
    Replies:
    0
    Views:
    706
    Ron Natalie
    Jun 25, 2003
  5. blackbolek

    What kind of error is it?

    blackbolek, Nov 13, 2005, in forum: C++
    Replies:
    3
    Views:
    267
Loading...

Share This Page