Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

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

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

Access to the path
'C:\Inetpub\vhosts\wonderfulreklam.com\subdomains\soganli\httpdocs\memory\r esim_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\r esim_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/" +

 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\r esim_yok.jpg'
is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   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)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaiseP ostBackEvent(String
eventArgument) +7
sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

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

what part of the error message is unclear?

browser error at  http://www.soganli.com/memories.aspx while uploading jpg
file to host
"bruce barker" <nos@nospam.com>, haber iletisinde sunlari

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc