UseCultureOverride causes Null connection string error on shared hosting

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
5/21/2014 8:57:32 AM
Gravatar
Total Posts 7

UseCultureOverride causes Null connection string error on shared hosting

I want to have a domain-based multiple-site in Spanish and English. The site is on shared hosting so my site is in a folder.

I'm using the full sources, published the site locally, cleaned up the published files and ftp'd to the server. Everything runs fine:

System Information:
mojoPortal Version 2.4.0.3 MSSQL
Operating System Microsoft Windows NT 6.0.6002 Service Pack 2
ASP.NET Info v4.0.30319 Running in Partial Trust

I set the domains up and setup the second site and both domains resolve correctly to their respective site.

Then, to force each site to use Spanish and English I followed the instructions at http://www.mojoportal.com/forcing-a-specific-language
and I added these four lines to the web.config (ensuring they didn't conflict with any existing appsettings):

  <add key="UseRelatedSiteMode" value="true">
  <add key="UseCultureOverride" value="true">
  <add key="site1culture" value="en-US">
   <add key="site2culture" value="es-ES">
    
This results in the following error:
    
Server Error in '/eng' Application.
Value cannot be null.
Parameter name: connectionString
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.ArgumentNullException: Value cannot be null.
Parameter name: connectionString

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:
[ArgumentNullException: Value cannot be null.
Parameter name: connectionString]
   mojoPortal.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, SqlParameter[] commandParameters) +297
   mojoPortal.Data.DBTaskQueue.DeleteCompleted() +31
   mojoPortal.Web.WebTaskManager.StartOrResumeTasks(Boolean appWasRestarted) +407
   mojoPortal.Web.Global.StartOrResumeTasks() +423
   mojoPortal.Web.Global.Application_Start(Object sender, EventArgs e) +283
[HttpException (0x80004005): Value cannot be null.
Parameter name: connectionString]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9865825
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
[HttpException (0x80004005): Value cannot be null.
Parameter name: connectionString]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9880168
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18067

There is nothing else in the Mojoportal log. After testing it seems it is the UseCultureOverride appsetting that is causing the error.

I'm completely stumped! Any ideas?

5/21/2014 9:50:09 AM
Gravatar
Total Posts 18439

Re: UseCultureOverride causes Null connection string error on shared hosting

looks to me like your setting elements are not properly closed.

you have:

 <add key="UseRelatedSiteMode" value="true">
  <add key="UseCultureOverride" value="true">
  <add key="site1culture" value="en-US">
   <add key="site2culture" value="es-ES">

but they should be like this:

 <add key="UseRelatedSiteMode" value="true" />
  <add key="UseCultureOverride" value="true" />
  <add key="site1culture" value="en-US" />
   <add key="site2culture" value="es-ES" />

5/21/2014 10:33:09 AM
Gravatar
Total Posts 7

Re: UseCultureOverride causes Null connection string error on shared hosting

I can't believe I missed that surprise

Thanks Joe!

You must sign in to post in the forums. This thread is closed to new posts.