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

Y

Yasin Cepeci

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.RaisePostBackEvent(String eventArgument)
+107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
 
B

bruce barker

what part of the error message is unclear?



Yasin said:
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.RaisePostBackEvent(String eventArgument)
+107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
 
Y

Yasin cepeci

browser error at http://www.soganli.com/memories.aspx while uploading jpg
file to host
haber iletisinde sunlari said:
what part of the error message is unclear?



Yasin said:
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.RaisePostBackEvent(String
eventArgument) +107

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5102
 

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

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top