Ok,
I followed this tutorial: http://www.codeproject.com/Articles/26106/Handle-Session-Timeouts-on-DotNetNuke-Through-an-H
i changed the code to this:
public void Init(HttpApplication application)
{
app = application;
//app.BeginRequest += new EventHandler(Application_BeginRequest);
app.PreRequestHandlerExecute += new EventHandler(app_PreRequestHandlerExecute);
}
protected void app_PreRequestHandlerExecute(Object sender, EventArgs e)
{
HttpRuntimeSection runTime = (HttpRuntimeSection)WebConfigurationManager.GetSection("system.web/httpRuntime");
//Approx 100 Kb(for page content) size has been deducted because the maxRequestLength proprty is the page size, not only the file upload size
int maxRequestLength = (runTime.MaxRequestLength - 100) * 1024;
//This code is used to check the request length of the page and if the request length is greater than
//MaxRequestLength then retrun to the same page with extra query string value action=exception
HttpContext context = ((HttpApplication)sender).Context;
if (context.Request.ContentLength > maxRequestLength)
{
PortalSettings portalSettings = (PortalSettings)app.Context.Items["PortalSettings"];
TabInfo tabInfo = portalSettings.ActiveTab;
//if this tab is not "SessionTimeout" tab
if (tabInfo.TabName != "RequestLengthExceeded")
{
TabController tabController = new TabController();
tabInfo = tabController.GetTabByName("RequestLengthExceeded", portalSettings.PortalId);
string pageUrl = Globals.NavigateURL(tabInfo.TabID, false, portalSettings, "", portalSettings.CultureCode);
app.Context.Response.Redirect(pageUrl);
}
}
}
Now i don't get the error above but:
---------------------------Dutch---------------------------------------
De verbinding werd geherinitialiseerd
De verbinding met de server werd geherinitialiseerd tijdens het laden van de pagina.
* Misschien is de website tijdelijk niet beschikbaar of overbelast. Probeer het
over enkele ogenblikken opnieuw.
* Controleer uw netwerkverbinding indien u geen enkele pagina kunt laden.
* Verzeker u ervan dat Firefox toegang heeft tot het web als uw
computer of netwerk is beveiligd door een firewall of proxyserver.
-------------------------------------------------------------------------
Roughly translated it says:
The connection has been re-initialized while loading the page.
- Maybe the website is not available, try it again in a few seconds
- Check your network connection in case you cant open any pages
- Be sure firefox has acces to the web if your protected by a firewall or proxy server
None of this applies to my case.
Please help :-)