Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problem in IIS

Reply
Thread Tools

Problem in IIS

 
 
sara
Guest
Posts: n/a
 
      01-25-2004



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.IPo stBackEv
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

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

 
Reply With Quote
 
 
 
 
Aaron Bertrand [MVP]
Guest
Posts: n/a
 
      01-25-2004
Looks like a permissions issue to me. And one that the folks in an ASP.NET
newsgroup would be better equipped to help you with than here.

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




"sara" <(E-Mail Removed)> wrote in message
news:422801c3e357$e65bed70$(E-Mail Removed)...
>
>
>
> 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.IPo stBackEv
> 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
>
> ================================================== ========
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IIS 6 vs IIS 5 ASP.NET Performance Issues JMaelstrom ASP .Net 2 04-30-2010 04:32 PM
IIS 6.0 win2003, IIS users moe_rodrigue MCSE 1 04-01-2004 07:37 AM
IIS 6.0 vs IIS 5.1 Hai Nguyen ASP .Net 1 03-02-2004 06:22 AM
ASP.NET application works in IIS PWS, but not in remote IIS. Matthew Louden ASP .Net 3 11-07-2003 09:58 PM
.NET IIS to IIS credentials problem... Grind Boy ASP .Net 4 08-14-2003 12:59 PM



Advertisments