Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Server error when installing GA in ReadOnly mode site

Found in

EPiServer.GoogleAnalytics 1.10.0

Fixed in

EPiServer.GoogleAnalytics 1.10.0

(Or a related package)

Created

Nov 04, 2016

Updated

Nov 09, 2016

State

Closed, Won't Fix


Description

Steps to reproduce

1. Add the <add key="episerver:DatabaseMode" value="ReadOnly" /> under <appSettings> to the MVC site's web.config file.
2. Install the GA 1.10.0.
3. Build the project.
4. Browse the site.

Expected: Site is shown properly.
Actual: Server error is thrown.

Server Error in '/' Application.
Database writes are blocked since the application is set to ReadOnly mode. ReadOnly mode is set either by the 'databaseMode' attribute on the 'episerver.dataStore' section or by the 'episerver:DatabaseMode' setting under the 'appSettings' section.
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.NotSupportedException: Database writes are blocked since the application is set to ReadOnly mode. ReadOnly mode is set either by the 'databaseMode' attribute on the 'episerver.dataStore' section or by the 'episerver:DatabaseMode' setting under the 'appSettings' section.

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:

[NotSupportedException: Database writes are blocked since the application is set to ReadOnly mode. ReadOnly mode is set either by the 'databaseMode' attribute on the 'episerver.dataStore' section or by the 'episerver:DatabaseMode' setting under the 'appSettings' section.]
EPiServer.Data.Providers.Internal.ReadOnlySqlDatabaseHandler.ExecuteTransaction(Action action) +62
EPiServer.Data.Dynamic.<>c_DisplayClass24_0.<InternalCreate>b_0() +530
EPiServer.Data.Cache.Internal.LocalCache`2.Add(TKey key, Boolean cacheNullValues, Boolean overwriteExistingValue, Func`1 getAction, Action`2 setAction) +185
EPiServer.Data.Cache.Internal.LocalCache`2.Add(TKey key, Boolean cacheNullValues, Boolean overwriteExistingValue, Func`1 action) +142
EPiServer.Data.Dynamic.StoreDefinition.InternalCreate(String storeName, IDictionary`2 typeBag, StoreDefinitionParameters parameters) +240
EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStoreFactory.CreateStore(String storeName, IDictionary`2 typeBag, StoreDefinitionParameters parameters) +106
EPiServer.Data.Dynamic.Internal.<>c_DisplayClass13_0.<GetStore>b_0() +201
EPiServer.Data.Cache.Internal.LocalCache`2.Add(TKey key, Boolean cacheNullValues, Boolean overwriteExistingValue, Func`1 getAction, Action`2 setAction) +185
EPiServer.Data.Dynamic.Internal.EPiServerDynamicDataStoreFactory.GetStore(Type type) +200
EPiServer.GoogleAnalytics.Services.SettingsRepository.GetGlobalSettings() +10
EPiServer.GoogleAnalytics.Helpers.CacheHelper.GetOrCreate(Func`1 resultFactory, String cacheKey) +234
EPiServer.GoogleAnalytics.Services.SettingsRepository.GetSiteSettings(String siteId) +18
EPiServer.GoogleAnalytics.Services.Accessors.GetTrackerSettings(SettingsRepository repository, SiteDefinition siteDefinition) +64
EPiServer.GoogleAnalytics.Web.Tracking.LoginTracker.OnPreRequestHandlerExecute(Object sender, EventArgs e) +79
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92