Sitefinity 4.0 SecurityConfig.config access denied

Posted by Community Admin on 03-Aug-2018 14:58

Sitefinity 4.0 SecurityConfig.config access denied

All Replies

Posted by Community Admin on 22-Mar-2011 00:00

This is our first Sitefinity site deployment.  Our web server is Windows 2003 Service Pack 2.  We have added the NETWORK SERVICE account to entire application with read/write; we have added the ASPNET machine account to entire application; the web site is configured for Anonymous Access and our Everyone account has read/write to all folders on the site.  We still have this problem on our application.  Any ideas?  Also, .NET 4.0 is installed on the server.

Access to the path 'E:\CentraSpecialtyHospital\App_Data\Sitefinity\Configuration\SecurityConfig.config' 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 'E:\CentraSpecialtyHospital\App_Data\Sitefinity\Configuration\SecurityConfig.config' 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 and IIS 7, and the configured application pool identity on IIS 7.5) 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: Access to the path 'E:\CentraSpecialtyHospital\App_Data\Sitefinity\Configuration\SecurityConfig.config' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9726046
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) +1142
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +83
   System.Xml.XmlWriterSettings.CreateWriter(String outputFileName) +142
   System.Xml.XmlWriter.Create(String outputFileName, XmlWriterSettings settings) +23
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.GetConfigurationWriter(ConfigSection section) +117
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.SaveSectionInternal(ConfigSection section) +58
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.SaveSection(ConfigSection section) +87
   Telerik.Sitefinity.Configuration.ConfigManager.SaveSection(ConfigSection section) +25
   Telerik.Sitefinity.Security.SecurityManager..cctor() +344

[TypeInitializationException: The type initializer for 'Telerik.Sitefinity.Security.SecurityManager' threw an exception.]
   Telerik.Sitefinity.Security.SecurityManager.GetCurrentUser() +0
   Telerik.Sitefinity.Configuration.UserPolicyHandler.GetPolicyNames(ConfigProvider configProvider, ConfigSection section) +27
   Telerik.Sitefinity.Configuration.ConfigElement.GetValueFromPolicy(ConfigPolicyHandler handler, ConfigProperty prop, Object& value) +101
   Telerik.Sitefinity.Configuration.ConfigElement.GetPolicyValue(ConfigProperty prop, Object& value) +87
   Telerik.Sitefinity.Configuration.ConfigElement.get_Item(ConfigProperty prop) +56
   Telerik.Sitefinity.Configuration.ConfigElement.get_Item(String propertyName) +68
   Telerik.Sitefinity.Localization.Configuration.ResourcesConfig.get_Providers() +17
   Telerik.Sitefinity.Localization.ResourceManager.get_ProvidersSettings() +22
   Telerik.Sitefinity.Data.ManagerBase`1.GetProvidersSettings() +10
   Telerik.Sitefinity.Data.ManagerBase`1.Initialize() +507
   Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +24
   Telerik.Sitefinity.Localization.ResourceManager..ctor() +21
   Telerik.Sitefinity.Localization.Res..cctor() +21

[TypeInitializationException: The type initializer for 'Telerik.Sitefinity.Localization.Res' threw an exception.]
   Telerik.Sitefinity.Localization.Res.RegisterResource() +0
   Telerik.Sitefinity.Abstractions.ObjectFactory.RegisterIoCTypes() +980
   Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +83
   Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +24
   System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
   System.Web.HttpApplication.InitModulesCommon() +80
   System.Web.HttpApplication.InitModules() +43
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Posted by Community Admin on 22-Mar-2011 00:00

Hi Brenda,

The account that runs you application pool is not granted with read/write permissions over the App_Data. You are getting a general ASP.NET permissions error ( which also says that the account you use does not have needed permissions).

Best wishes,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 22-Mar-2011 00:00

Our AppPool Account does have permission.  I attached screen shots of the AppPool account and the permission it has at different locations.  The web site is completely open at this time.  All accounts have Read & Execute, List, and Read permission.  What additional information can I send to you that will help trouble shoot this issue?  Please advise.

Posted by Community Admin on 23-Mar-2011 00:00

Hi Brenda,

As Ivan mentioned you need to give the account read and WRITE permissions to the app_data folder, as per your screenshots and comments the account doesn't have the required "write" permissions it needs. Break the inheritance on the app_data folder and then allow the account to also write and you should be good to go.

Cheers,
Phill

Posted by Community Admin on 23-Mar-2011 00:00

thanks - fixed that and it now works.  Completely missed the write - was focusing on read/execute.  Just an oversight.  Thanks again.

This thread is closed