uh? security problem?

L

Lloyd Dupont

I'm trying to learn ASP.NET by myself at home.
I try to play with this WebLogControl: http://joel.net/code/weblogs.aspx
I downloaded, unzipped it and webshare the folder.
I'm running ASP.NET beta 2.0

I ran it, try to daa a comment and I had the following security related
error message. (see below) but I have no securiy tab in my file's property!!
I can't fix that! what can I do?

IIS error message:
-------------------------

Server Error in '/JoelWebLog' Application.
--------------------------------------------------------------------------------

Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.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
'L:\AppSource\ASP.NET Apps\JoelWebLog\_data\weblogs_comments.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 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:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.xml' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +1480439
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES
secAttrs, String msgPath, Boolean bFromProxy) +935
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, String msgPath,
Boolean bFromProxy) +112
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share) +47
System.Xml.XmlDocument.Save(String filename) +91
Joel.Net.PageComments.PageComments.Save() +99
Joel.Net.PageComments.PostComment.Submit_Click(Object sender, EventArgs
e) +1267
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
+232
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +5
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +31
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5157
 
G

GrantMagic

It appears that your IIS user account does not have access to that file.
Try sharing the file and setting the security levels to allow everyone full
access to test this!

Lloyd Dupont said:
I'm trying to learn ASP.NET by myself at home.
I try to play with this WebLogControl: http://joel.net/code/weblogs.aspx
I downloaded, unzipped it and webshare the folder.
I'm running ASP.NET beta 2.0

I ran it, try to daa a comment and I had the following security related
error message. (see below) but I have no securiy tab in my file's
property!! I can't fix that! what can I do?

IIS error message:
-------------------------

Server Error in '/JoelWebLog' Application.
--------------------------------------------------------------------------------

Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.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
'L:\AppSource\ASP.NET Apps\JoelWebLog\_data\weblogs_comments.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 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:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.xml' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +1480439
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options,
SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +935
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, FileOptions options, String
msgPath, Boolean bFromProxy) +112
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share) +47
System.Xml.XmlDocument.Save(String filename) +91
Joel.Net.PageComments.PageComments.Save() +99
Joel.Net.PageComments.PostComment.Submit_Click(Object sender, EventArgs
e) +1267
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +232

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +5
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +31
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5157
 
M

Martin Dechev

Hi,

Disable the so-called "simple filesharing" from Tools->Folder Options->View
in Windows Explorer. Then you will have "Sharing And Security" in the
context menu for files, folders, etc. in Windows Explorer.

Hope this helps
Martin
Lloyd Dupont said:
I'm trying to learn ASP.NET by myself at home.
I try to play with this WebLogControl: http://joel.net/code/weblogs.aspx
I downloaded, unzipped it and webshare the folder.
I'm running ASP.NET beta 2.0

I ran it, try to daa a comment and I had the following security related
error message. (see below) but I have no securiy tab in my file's property!!
I can't fix that! what can I do?

IIS error message:
-------------------------

Server Error in '/JoelWebLog' Application.
-------------------------------------------------------------------------- ------

Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.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
'L:\AppSource\ASP.NET Apps\JoelWebLog\_data\weblogs_comments.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 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:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.xml' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +1480439
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES
secAttrs, String msgPath, Boolean bFromProxy) +935
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, String msgPath,
Boolean bFromProxy) +112
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share) +47
System.Xml.XmlDocument.Save(String filename) +91
Joel.Net.PageComments.PageComments.Save() +99
Joel.Net.PageComments.PostComment.Submit_Click(Object sender, EventArgs
e) +1267
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String
eventArgument) +5
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +31
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5157



-------------------------------------------------------------------------- ------
Version Information: Microsoft .NET Framework Version:2.0.40607.16; ASP.NET
Version:2.0.40607.16
 
L

Lloyd Dupont

thanks I knew there was an easy way to have this security tab appears :D

now it doesn't work and that's really mysterious, but I will investigate!

Martin Dechev said:
Hi,

Disable the so-called "simple filesharing" from Tools->Folder
Options->View
in Windows Explorer. Then you will have "Sharing And Security" in the
context menu for files, folders, etc. in Windows Explorer.

Hope this helps
Martin
Lloyd Dupont said:
I'm trying to learn ASP.NET by myself at home.
I try to play with this WebLogControl: http://joel.net/code/weblogs.aspx
I downloaded, unzipped it and webshare the folder.
I'm running ASP.NET beta 2.0

I ran it, try to daa a comment and I had the following security related
error message. (see below) but I have no securiy tab in my file's property!!
I can't fix that! what can I do?

IIS error message:
-------------------------

Server Error in '/JoelWebLog' Application.
-------------------------------------------------------------------------- ------

Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.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
'L:\AppSource\ASP.NET Apps\JoelWebLog\_data\weblogs_comments.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 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:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[UnauthorizedAccessException: Access to the path 'L:\AppSource\ASP.NET
Apps\JoelWebLog\_data\weblogs_comments.xml' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +1480439
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES
secAttrs, String msgPath, Boolean bFromProxy) +935
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, FileOptions options, String msgPath,
Boolean bFromProxy) +112
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share) +47
System.Xml.XmlDocument.Save(String filename) +91
Joel.Net.PageComments.PageComments.Save() +99
Joel.Net.PageComments.PostComment.Submit_Click(Object sender,
EventArgs
e) +1267
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String
eventArgument) +5
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+31
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5157



-------------------------------------------------------------------------- ------
Version Information: Microsoft .NET Framework Version:2.0.40607.16; ASP.NET
Version:2.0.40607.16
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top