By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,685 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,685 IT Pros & Developers. It's quick & easy.

I ve got this error while uploading my jpg file to the host via fileupload object :S

P: n/a
Server Error in '/' Application.
--------------------------------------------------------------------------------

Access to the path
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memory\resim_yok.jpg'
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
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memory\resim_yok.jpg'
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:

Line 24: saveFile = Path.Combine(savePath, FileUpload1.FileName);
Line 25:
Line 26: FileUpload1.SaveAs(saveFile);
Line 27:
Line 28: FileUpload1.SaveAs(Request.PhysicalApplicationPath + "memory/" +
filename);

Source File:
c:\Inetpub\vhosts\wonderfulreklam.com\subdomains\s oganli\httpdocs\memories.aspx
Line: 26

Stack Trace:

[UnauthorizedAccessException: Access to the path
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memory\resim_yok.jpg'
is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
+2013843
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode) +65
System.Web.HttpPostedFile.SaveAs(String filename) +87
System.Web.UI.WebControls.FileUpload.SaveAs(String filename) +22
ASP.memories_aspx.Button1_Click(Object sender, EventArgs e) in
c:\Inetpub\vhosts\wonderfulreklam.com\subdomains\s oganli\httpdocs\memories.aspx:26
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+107
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210
Jun 6 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
what part of the error message is unclear?

Yasin Cepeci wrote:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Access to the path
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memory\resim_yok.jpg'
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
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memory\resim_yok.jpg'
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:

Line 24: saveFile = Path.Combine(savePath, FileUpload1.FileName);
Line 25:
Line 26: FileUpload1.SaveAs(saveFile);
Line 27:
Line 28: FileUpload1.SaveAs(Request.PhysicalApplicationPath + "memory/" +
filename);

Source File:
c:\Inetpub\vhosts\wonderfulreklam.com\subdomains\s oganli\httpdocs\memories.aspx
Line: 26

Stack Trace:

[UnauthorizedAccessException: Access to the path
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memory\resim_yok.jpg'
is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
+2013843
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode) +65
System.Web.HttpPostedFile.SaveAs(String filename) +87
System.Web.UI.WebControls.FileUpload.SaveAs(String filename) +22
ASP.memories_aspx.Button1_Click(Object sender, EventArgs e) in
c:\Inetpub\vhosts\wonderfulreklam.com\subdomains\s oganli\httpdocs\memories.aspx:26
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+107
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210

Jun 6 '07 #2

P: n/a
browser error at http://www.soganli.com/memories.aspx while uploading jpg
file to host
"bruce barker" <no****@nospam.com>, haber iletisinde sunlari
yazdi:OK**************@TK2MSFTNGP02.phx.gbl...
what part of the error message is unclear?

Yasin Cepeci wrote:
>Server Error in '/' Application.
--------------------------------------------------------------------------------

Access to the path
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains \soganli\httpdocs\memory\resim_yok.jpg'
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
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains \soganli\httpdocs\memory\resim_yok.jpg'
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:

Line 24: saveFile = Path.Combine(savePath, FileUpload1.FileName);
Line 25:
Line 26: FileUpload1.SaveAs(saveFile);
Line 27:
Line 28: FileUpload1.SaveAs(Request.PhysicalApplicationPath + "memory/" +
filename);

Source File:
c:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memories.aspx
Line: 26

Stack Trace:

[UnauthorizedAccessException: Access to the path
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains \soganli\httpdocs\memory\resim_yok.jpg'
is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
+2013843
System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode) +65
System.Web.HttpPostedFile.SaveAs(String filename) +87
System.Web.UI.WebControls.FileUpload.SaveAs(String filename) +22
ASP.memories_aspx.Button1_Click(Object sender, EventArgs e) in
c:\Inetpub\vhosts\wonderfulreklam.com\subdomains\ soganli\httpdocs\memories.aspx:26
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String
eventArgument) +107

System.Web.UI.WebControls.Button.System.Web.UI.IP ostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210

Jun 7 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.