Pozdrav kolege, treba mi hitna pomoc vezana za Upload u ASP.net, a radi se o slijedecem: normalno odradim upload i na root radi uredu ali cim postavim stranicu na server i kad hocu da upload-am javi mi gresku tipa
Server Error in '/' Application.
Access to the path '...\1.bmp' 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 '...\1.bmp' 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 10: {
Line 11: String strFileName = System.IO.Path.GetFileName(myUpoad.FileName);
Line 12: myUpoad.SaveAs(Server.MapPath("" + strFileName));
Line 13: this.lblText.Text = strFileName + " Uploaded.<br>";
Line 14: }
Source File: ...\Default3.aspx Line: 12
Stack Trace:
Cini mi se kao da je u pitanju zastita neka, kako to odklonuti.
Ako bi ko pomogao i ako treba platiti moze se i privatno javiti na broj +387 62 193 534, voljan sam i platiti posto mi je hitno i veoma vazno.
Hvala unaprijed