Rettigheder på IIS
Jeg har lavet et galleri til min hjemmeside. Det er lavet på den måde, at det leder en mappe igennem for undermapper, som bliver overskrifter på den enkelte billedesamling. Når en bruger har valgt en mappe med billeder, kommer der en popup hvor alle billederne i mappen kan blive vist én efter én.Grunden til at jeg gør det på denne måde er, at jeg gerne gerne skulle kunne uploade en mappe med billeder, hvorefter den figurerer på siden. Det virker glimrende indenfor mit projekt. Men hvis jeg uploader en mappe med billeder, som var tiltænkt, får jeg følgende fejl:
--------------------------
Access to the path "c:\inetpub\wwwroot\TestApplication\images\Festbilleder" 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\wwwroot\TestApplication\images\Festbilleder" 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 write 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.
--------------------------
Her har jeg prøvet at uploade en mappe der hedder "Festbilleder". Men jeg får denne rettighedsfejl. Hvordan læser jeg problemet? Så vidt jeg kan se, får alle mapper, som jeg opretter fra selve VS.NET de rettigheder jeg har givet min application i IIS. Men det skulle jo også gerne fungere for de uploadede mapper. Hvordan løses problemet?
