problem in iis

Discussion in 'ASP General' started by anonymous@devdex.com, Jan 25, 2004.

  1. Guest

    Hi Mr,
    I have a problem .
    I have created an Xml file ,I can read from it but
    I cant write in it .
    when I want to write to it ,IIS showes me the following
    error page .

    please help me , what is my problem ?

    Thank you






    ==========================================================
    Server Error in '/go' Application.
    ----------------------------------------------------------
    ----------------------

    Access to the path "E:\go\Xml\Users.xml" is denied.
    Description: An unhandled exception occurred during the
    execution of the current web request. Please review the
    stack trace for more information about the error and
    where it originated in the code.

    Exception Details: System.UnauthorizedAccessException:
    Access to the path "E:\go\Xml\Users.xml" is denied.

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

    Source Error:


    Line 55: (Password, "SHA1")
    Line 56: dsUsers.Tables("users").Rows.Add(rowUser)
    Line 57: dsUsers.WriteXml(strXMLFile,
    XmlWriteMode.WriteSchema)
    Line 58: Return True
    Line 59: 'Catch ex As Exception


    Source File: E:\go\Classes\MainClass.vb Line: 57

    Stack Trace:


    [UnauthorizedAccessException: Access to the
    path "E:\go\Xml\Users.xml" is denied.]
    System.IO.__Error.WinIOError(Int32 errorCode, String
    str) +393
    System.IO.FileStream..ctor(String path, FileMode mode,
    FileAccess access, FileShare share, Int32 bufferSize,
    Boolean useAsync, String msgPath, Boolean bFromProxy) +888
    System.IO.FileStream..ctor(String path, FileMode mode,
    FileAccess access, FileShare share) +45
    System.Xml.XmlTextWriter..ctor(String filename,
    Encoding encoding)
    System.Data.DataSet.WriteXml(String fileName,
    XmlWriteMode mode)
    go.MainClass.AddUser(String UserName, String Password)
    in E:\go\Classes\MainClass.vb:57
    go.AddUserWebForm.ButAdduser_Click(Object sender,
    EventArgs e) in E:\go\WebForms\AddUserWebForm.aspx.vb:40
    System.Web.UI.WebControls.Button.OnClick(EventArgs e)

    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEv
    entHandler.RaisePostBackEvent(String eventArgument)
    System.Web.UI.Page.RaisePostBackEvent
    (IPostBackEventHandler sourceControl, String
    eventArgument)
    System.Web.UI.Page.RaisePostBackEvent
    (NameValueCollection postData)
    System.Web.UI.Page.ProcessRequestMain() +1277

    ==========================================================





    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    , Jan 25, 2004
    #1
    1. Advertising

  2. Steven Burn Guest

    Looks like permission errors at your servers end. Have you checked to make
    sure they have both read and write access?

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    Disclaimer:
    I know I'm probably wrong, I just like taking part ;o)


    <> wrote in message
    news:...
    >
    > Hi Mr,
    > I have a problem .
    > I have created an Xml file ,I can read from it but
    > I cant write in it .
    > when I want to write to it ,IIS showes me the following
    > error page .
    >
    > please help me , what is my problem ?
    >
    > Thank you
    >
    >
    >
    >
    >
    >
    > ==========================================================
    > Server Error in '/go' Application.
    > ----------------------------------------------------------
    > ----------------------
    >
    > Access to the path "E:\go\Xml\Users.xml" is denied.
    > Description: An unhandled exception occurred during the
    > execution of the current web request. Please review the
    > stack trace for more information about the error and
    > where it originated in the code.
    >
    > Exception Details: System.UnauthorizedAccessException:
    > Access to the path "E:\go\Xml\Users.xml" is denied.
    >
    > 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 write 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.
    >
    > Source Error:
    >
    >
    > Line 55: (Password, "SHA1")
    > Line 56: dsUsers.Tables("users").Rows.Add(rowUser)
    > Line 57: dsUsers.WriteXml(strXMLFile,
    > XmlWriteMode.WriteSchema)
    > Line 58: Return True
    > Line 59: 'Catch ex As Exception
    >
    >
    > Source File: E:\go\Classes\MainClass.vb Line: 57
    >
    > Stack Trace:
    >
    >
    > [UnauthorizedAccessException: Access to the
    > path "E:\go\Xml\Users.xml" is denied.]
    > System.IO.__Error.WinIOError(Int32 errorCode, String
    > str) +393
    > System.IO.FileStream..ctor(String path, FileMode mode,
    > FileAccess access, FileShare share, Int32 bufferSize,
    > Boolean useAsync, String msgPath, Boolean bFromProxy) +888
    > System.IO.FileStream..ctor(String path, FileMode mode,
    > FileAccess access, FileShare share) +45
    > System.Xml.XmlTextWriter..ctor(String filename,
    > Encoding encoding)
    > System.Data.DataSet.WriteXml(String fileName,
    > XmlWriteMode mode)
    > go.MainClass.AddUser(String UserName, String Password)
    > in E:\go\Classes\MainClass.vb:57
    > go.AddUserWebForm.ButAdduser_Click(Object sender,
    > EventArgs e) in E:\go\WebForms\AddUserWebForm.aspx.vb:40
    > System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    >
    > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEv
    > entHandler.RaisePostBackEvent(String eventArgument)
    > System.Web.UI.Page.RaisePostBackEvent
    > (IPostBackEventHandler sourceControl, String
    > eventArgument)
    > System.Web.UI.Page.RaisePostBackEvent
    > (NameValueCollection postData)
    > System.Web.UI.Page.ProcessRequestMain() +1277
    >
    > ==========================================================
    >
    >
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Steven Burn, Jan 25, 2004
    #2
    1. Advertising

  3. I answered this exact same question, in this exact same group, two hours
    ago.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    <> wrote in message
    news:...
    >
    > Hi Mr,
    > I have a problem .
    > I have created an Xml file ,I can read from it but
    > I cant write in it .
    > when I want to write to it ,IIS showes me the following
    > error page .
    >
    > please help me , what is my problem ?
    >
    > Thank you
    >
    >
    >
    >
    >
    >
    > ==========================================================
    > Server Error in '/go' Application.
    > ----------------------------------------------------------
    > ----------------------
    >
    > Access to the path "E:\go\Xml\Users.xml" is denied.
    > Description: An unhandled exception occurred during the
    > execution of the current web request. Please review the
    > stack trace for more information about the error and
    > where it originated in the code.
    >
    > Exception Details: System.UnauthorizedAccessException:
    > Access to the path "E:\go\Xml\Users.xml" is denied.
    >
    > 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 write 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.
    >
    > Source Error:
    >
    >
    > Line 55: (Password, "SHA1")
    > Line 56: dsUsers.Tables("users").Rows.Add(rowUser)
    > Line 57: dsUsers.WriteXml(strXMLFile,
    > XmlWriteMode.WriteSchema)
    > Line 58: Return True
    > Line 59: 'Catch ex As Exception
    >
    >
    > Source File: E:\go\Classes\MainClass.vb Line: 57
    >
    > Stack Trace:
    >
    >
    > [UnauthorizedAccessException: Access to the
    > path "E:\go\Xml\Users.xml" is denied.]
    > System.IO.__Error.WinIOError(Int32 errorCode, String
    > str) +393
    > System.IO.FileStream..ctor(String path, FileMode mode,
    > FileAccess access, FileShare share, Int32 bufferSize,
    > Boolean useAsync, String msgPath, Boolean bFromProxy) +888
    > System.IO.FileStream..ctor(String path, FileMode mode,
    > FileAccess access, FileShare share) +45
    > System.Xml.XmlTextWriter..ctor(String filename,
    > Encoding encoding)
    > System.Data.DataSet.WriteXml(String fileName,
    > XmlWriteMode mode)
    > go.MainClass.AddUser(String UserName, String Password)
    > in E:\go\Classes\MainClass.vb:57
    > go.AddUserWebForm.ButAdduser_Click(Object sender,
    > EventArgs e) in E:\go\WebForms\AddUserWebForm.aspx.vb:40
    > System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    >
    > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEv
    > entHandler.RaisePostBackEvent(String eventArgument)
    > System.Web.UI.Page.RaisePostBackEvent
    > (IPostBackEventHandler sourceControl, String
    > eventArgument)
    > System.Web.UI.Page.RaisePostBackEvent
    > (NameValueCollection postData)
    > System.Web.UI.Page.ProcessRequestMain() +1277
    >
    > ==========================================================
    >
    >
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Aaron Bertrand [MVP], Jan 25, 2004
    #3
  4. Steven Burn Guest

    In the exact same way? <gg>

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    Disclaimer:
    I know I'm probably wrong, I just like taking part ;o)


    Aaron Bertrand [MVP] <> wrote in message
    news:...
    > I answered this exact same question, in this exact same group, two hours
    > ago.
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > http://www.aspfaq.com/
    >
    >
    >
    >
    > <> wrote in message
    > news:...
    > >
    > > Hi Mr,
    > > I have a problem .
    > > I have created an Xml file ,I can read from it but
    > > I cant write in it .
    > > when I want to write to it ,IIS showes me the following
    > > error page .
    > >
    > > please help me , what is my problem ?
    > >
    > > Thank you
    > >
    > >
    > >
    > >
    > >
    > >
    > > ==========================================================
    > > Server Error in '/go' Application.
    > > ----------------------------------------------------------
    > > ----------------------
    > >
    > > Access to the path "E:\go\Xml\Users.xml" is denied.
    > > Description: An unhandled exception occurred during the
    > > execution of the current web request. Please review the
    > > stack trace for more information about the error and
    > > where it originated in the code.
    > >
    > > Exception Details: System.UnauthorizedAccessException:
    > > Access to the path "E:\go\Xml\Users.xml" is denied.
    > >
    > > 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 write 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.
    > >
    > > Source Error:
    > >
    > >
    > > Line 55: (Password, "SHA1")
    > > Line 56: dsUsers.Tables("users").Rows.Add(rowUser)
    > > Line 57: dsUsers.WriteXml(strXMLFile,
    > > XmlWriteMode.WriteSchema)
    > > Line 58: Return True
    > > Line 59: 'Catch ex As Exception
    > >
    > >
    > > Source File: E:\go\Classes\MainClass.vb Line: 57
    > >
    > > Stack Trace:
    > >
    > >
    > > [UnauthorizedAccessException: Access to the
    > > path "E:\go\Xml\Users.xml" is denied.]
    > > System.IO.__Error.WinIOError(Int32 errorCode, String
    > > str) +393
    > > System.IO.FileStream..ctor(String path, FileMode mode,
    > > FileAccess access, FileShare share, Int32 bufferSize,
    > > Boolean useAsync, String msgPath, Boolean bFromProxy) +888
    > > System.IO.FileStream..ctor(String path, FileMode mode,
    > > FileAccess access, FileShare share) +45
    > > System.Xml.XmlTextWriter..ctor(String filename,
    > > Encoding encoding)
    > > System.Data.DataSet.WriteXml(String fileName,
    > > XmlWriteMode mode)
    > > go.MainClass.AddUser(String UserName, String Password)
    > > in E:\go\Classes\MainClass.vb:57
    > > go.AddUserWebForm.ButAdduser_Click(Object sender,
    > > EventArgs e) in E:\go\WebForms\AddUserWebForm.aspx.vb:40
    > > System.Web.UI.WebControls.Button.OnClick(EventArgs e)
    > >
    > > System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEv
    > > entHandler.RaisePostBackEvent(String eventArgument)
    > > System.Web.UI.Page.RaisePostBackEvent
    > > (IPostBackEventHandler sourceControl, String
    > > eventArgument)
    > > System.Web.UI.Page.RaisePostBackEvent
    > > (NameValueCollection postData)
    > > System.Web.UI.Page.ProcessRequestMain() +1277
    > >
    > > ==========================================================
    > >
    > >
    > >
    > >
    > >
    > > *** Sent via Developersdex http://www.developersdex.com ***
    > > Don't just participate in USENET...get rewarded for it!

    >
    >
    Steven Burn, Jan 25, 2004
    #4
  5. Pretty close. Neither the original nor the copy belongs in this group.
    Aaron Bertrand [MVP], Jan 25, 2004
    #5
  6. Steven Burn Guest

    Something tells me he/she/they aren't going to listen to use mere mortals
    ;o)

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    Disclaimer:
    I know I'm probably wrong, I just like taking part ;o)
    Steven Burn, Jan 25, 2004
    #6
    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. Grind Boy

    .NET IIS to IIS credentials problem...

    Grind Boy, Aug 13, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    2,435
    Grind Boy
    Aug 14, 2003
  2. Matthew Louden
    Replies:
    3
    Views:
    5,874
    Sherif ElMetainy
    Nov 7, 2003
  3. JMaelstrom

    IIS 6 vs IIS 5 ASP.NET Performance Issues

    JMaelstrom, Dec 9, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    4,650
    shan420
    Apr 30, 2010
  4. Hai Nguyen

    IIS 6.0 vs IIS 5.1

    Hai Nguyen, Feb 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,225
    Alvin Bruney [MVP]
    Mar 2, 2004
  5. Joe Kaplan \(MVP - ADSI\)

    Re: Accessing AD from IIS 6 vs IIS 5

    Joe Kaplan \(MVP - ADSI\), May 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    419
    Joe Kaplan \(MVP - ADSI\)
    May 7, 2004
Loading...

Share This Page