Posted on 17/12/2013 08:58:15
Hi Nicolai,
I'll post you the full stack trace in the end of this response. It's partially correct that default.aspx casues the error.. When debugging I see that the error is caused in the 'Application_Error' sub of the global.asax. This contains the following code;
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
Dynamicweb.Frontend.GlobalAsaxHandler.Application_Error(sender, e)
End Sub
Since the error isn't catched here the execution of the code continues untill it reaches the default.aspx. There the 'new PageviewControl'-function catches and throws the error. So the actual error is thrown here..
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Output.Controls.Add(New PageviewControl())
End Sub
The page continues to work without the querystring parameter in it, but as soon as I add it (regardless of the variation used) it throws this particular error. All of the query strings below where tested and are throwing this error;
- c=1
- m=1
- m=kiosk
- mode=kiosk
Helper is a C# class with a set of methods which does nothing more then setting a cookie to the current response;
public static void SetCookie(string key, string value, DateTime expires)
{
try
{
var cookie = new HttpCookie(key, value) {Expires = expires};
HttpContext.Current.Response.Cookies.Add(cookie);
HttpContext.Current.Request.Cookies.Add(cookie);
}
catch (Exception err)
{
Logger.ErrorException("An error occured while setting cookie cookie with the key: " + key + " and value: " + value, err);
}
}
The strange thing also is that when debbuging we can get passed the SetCookie method, so this definately isn't causing the problem..
The first thing that occured to us as well is that there is/was an item type called 'http'. But this definately isn't the issue because there isn't an item type with this name available in the solution. I've tried adding a table to the database with the name 'ItemType_Http' and this caused the error to change, so it definately seems to be looking for an ItemType somehow...But it only does this when the QS-parameter is added and it is a non-existing item type..
We also ruled out the database user, it's DB owner at the moment. Do you have any other suggestions? Perhaps you can check and test the solution? I've shipped it over to your support regarding another issue mentioned in case CAS-101837-7GWDY4