More in this section

Forums / Developing with Sitefinity / Shared Hosting, Application Impersonation

Shared Hosting, Application Impersonation

2 posts, 0 answered
  1. Joseph
    Joseph avatar
    7 posts
    14 Oct 2008
    16 Oct 2008
    Link to this post
    Has anyone dealt with the changes involved in configuring the latest version of Sitefinity to run in a shared hosting environment, namely HostMySite?

    I've been struggling for weeks with one issue after another. Presently, I recieve the following error message during setup after the database configuration screen:

    Server Error in '/' Application.  
    Attempted to perform an unauthorized operation.   
    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: Attempted to perform an unauthorized operation.   
    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:   
    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: Attempted to perform an unauthorized operation.]  
       System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl) +716  
       System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext) +415  
       System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections, Object exceptionContext) +24  
       System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections) +15  
       System.Security.AccessControl.FileSystemSecurity.Persist(String fullPath) +105  
       System.IO.File.SetAccessControl(String path, FileSecurity fileSecurity) +27  
       System.Configuration.Internal.WriteFileContext.DuplicateTemplateAttributes(String source, String destination) +67  
       System.Configuration.Internal.WriteFileContext.DuplicateFileAttributes(String source, String destination) +74  
       System.Configuration.Internal.WriteFileContext.Complete(String filename, Boolean success) +61  
       System.Configuration.Internal.InternalConfigHost.StaticWriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions) +229  
       System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions) +21  
       System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext) +18  
       System.Configuration.Internal.DelegatingConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext) +22  
       System.Configuration.UpdateConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext) +76  
       System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll) +1732  
       System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll) +92  
       System.Configuration.Configuration.Save() +10  
       Telerik.Cms.Web.DatabasePane.DoWork() +849  
       Telerik.Cms.Web.StartupWizard.wizard_NextButtonClick(Object sender, CmsWizardNavigationEventArgs e) +111  
       Telerik.Cms.Web.UI.CmsWizard.OnNextButtonClick(CmsWizardNavigationEventArgs e) +78  
       Telerik.Cms.Web.UI.CmsWizard.OnBubbleEvent(Object source, EventArgs e) +326  
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37  
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118  
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135  
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10  
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13  
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175  
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565  
    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

    The application runs under our user account rather than the ASPNET user but I haven't been able to come up with the right configuration to clear this issue. Maybe I'm barking up the wrong tree.

    Any insight would be most appreciated.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    16 Oct 2008
    Link to this post
    Hi Joseph,

    It is an ASP.NET security error. Try adding ASP.NET to the folder permissions. Make sure that Aspnet_wp.exe is running.

    I hope this helps.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered