[ almir_05 @ 06.09.2009. 13:37 ] @
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
[ pl4stik @ 06.09.2009. 14:14 ] @
Evo lepo pise ...

Citat:
almir_05:...

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.

...


znaci ASP.NET account treba da ima write dozvolu
[ almir_05 @ 06.09.2009. 14:36 ] @
Da znam da pise ali ne znam kako da to otklonim, dali je ko imao isti problem i kako ga je rijesio.
[ v.marko @ 20.10.2009. 19:29 ] @
probaj da dodas sva prava nad dirom na serveru na koji hoces da uploadujes
to bi trebalo da ti resi problem

pozdrav
Marko