Tilføj hostheader til site på iis'en
HejJeg er i gang med at lave et cms-system som skal kunne opdatere iis'en med de host header den enkelte kunde bruger. Problemer er på min win Xp maskine kan jeg godt få lov til at opdatere iis'en ved hjælp af "impersonate" af en bruger med administrative rettigheder. Men på produktionsserveren en win 2003 server kan dette ikke lade sig gøre. Jeg får følgende fejl.
Access 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 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.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[UnauthorizedAccessException: Access is denied.]
WebIIS.createSite.AddHostHeader(String hostHeader, String websiteID) +188
WebIIS.createSite.Button2_Click(Object sender, EventArgs e) +60
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
Jeg er 100 % sikker på den bruger jeg impersonater har administrative rettigheder. Kan det have noget med at gøre at Microsoft have hævet sikkerhedsniveauet således dette ikke længere er muligt på en win 2003 server?