SaaS CMS has officially launched! Learn more now.

Accept-Language error


As administrator I get the mails that visitors are able to fill in if something goes wrong on the page. usually noone fills in anything and its upp to me to read the trace and figure out waht was wrong. But the other day I got a very descriptive error message from one user saying:

There is a bug in your web server configuration causing Server Error (500) to be returned for some pages if the "Accept-Language" header is not set.

the .net error message was this:

Error occured 2008-04-10 13:31:38
User IP
User Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080325 Fedora/ Firefox/
Referer (none)

Exception details: ArgumentNullException: Value cannot be null. Parameter name: collection
Stack trace:
[ArgumentNullException: Value cannot be null.
Parameter name: collection]
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at EPiServer.Globalization.ContentLanguage.LanguagePreferenceList(String priorityLanguage)
   at EPiServer.Globalization.ContentLanguage.SetCulture(String priorityLanguage)
   at EPiServer.Globalization.ContentLanguage.get_PreferredCulture()
   at EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternalInternal(UrlBuilder url, Object& internalObject)
   at EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternal(UrlBuilder url, Object& internalObject)
   at EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToInternal(UrlBuilder url)
   at EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 I tried to figure out what might have caused this (EPiServer or the IIS) and I think it has something to do with the language settings in EPiServer but Im not sure. Anyone who can shine some light on this.

Apr 11, 2008 8:34
This looks like a bug that we have fixed in EPiServer CMS 5 SP2. The work around until SP2 is to turn of the option "Detect language via browser's language preference" in the system settings in admin mode.
Apr 15, 2008 11:07
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.