problem in iis

A

anonymous

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

==========================================================
 
S

Steven Burn

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)


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

==========================================================
 
A

Aaron Bertrand [MVP]

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

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




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

==========================================================
 
S

Steven Burn

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 said:
I answered this exact same question, in this exact same group, two hours
ago.

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




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

==========================================================
 
A

Aaron Bertrand [MVP]

Pretty close. Neither the original nor the copy belongs in this group.
 
S

Steven Burn

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)
 

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top