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\User s.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.Unauthor izedAccessExcep tion:
Access to the path "E:\go\Xml\User s.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}\ASPNE T 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="tr ue"/>, the identity will be
the anonymous user (typically IUSR_MACHINENAM E) 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.A dd(rowUser)
Line 57: dsUsers.WriteXm l(strXMLFile,
XmlWriteMode.Wr iteSchema)
Line 58: Return True
Line 59: 'Catch ex As Exception
Source File: E:\go\Classes\M ainClass.vb Line: 57
Stack Trace:
[UnauthorizedAcc essException: Access to the
path "E:\go\Xml\User s.xml" is denied.]
System.IO.__Err or.WinIOError(I nt32 errorCode, String
str) +393
System.IO.FileS tream..ctor(Str ing path, FileMode mode,
FileAccess access, FileShare share, Int32 bufferSize,
Boolean useAsync, String msgPath, Boolean bFromProxy) +888
System.IO.FileS tream..ctor(Str ing path, FileMode mode,
FileAccess access, FileShare share) +45
System.Xml.XmlT extWriter..ctor (String filename,
Encoding encoding)
System.Data.Dat aSet.WriteXml(S tring fileName,
XmlWriteMode mode)
go.MainClass.Ad dUser(String UserName, String Password)
in E:\go\Classes\M ainClass.vb:57
go.AddUserWebFo rm.ButAdduser_C lick(Object sender,
EventArgs e) in E:\go\WebForms\ AddUserWebForm. aspx.vb:40
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e)
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEv
entHandler.Rais ePostBackEvent( String eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent
(IPostBackEvent Handler sourceControl, String
eventArgument)
System.Web.UI.P age.RaisePostBa ckEvent
(NameValueColle ction postData)
System.Web.UI.P age.ProcessRequ estMain() +1277
=============== =============== =============== =============
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!