Default Document Fix

Posted By jcosmo Tue 26 Jan 2016
Add to Favorites0
Author Message
jcosmo
 Posted Tue 26 Jan 2016
Supreme Being

Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)Supreme Being - (10,459 reputation)

Group: Forum Members
Last Active: Tue 16 Feb 2016
Posts: 19, Visits: 117
I ran into an issue with admin login and main site logout running Kartris in a virtual directory. The main issue was the server didn't like that Kartris was posting back to a folder... there's an attempted fix for this in the Global.asax on line 80, but that fix is insufficient and produced a bug...

The existing logic takes requests to /admin and processes them as /adminDefault.aspx, which is invalid.

I replaced the logic with the following:
Dim strRawURL As String = Request.RawUrl.ToLower()
If strRawURL.EndsWith("/admin") Then
Response.Redirect(Replace(strRawURL, "/admin", "/Admin/_Default.aspx"))
ElseIf strRawURL.EndsWith("/admin/") Then
Response.Redirect(Replace(strRawURL, "/admin/", "/Admin/_Default.aspx"))
ElseIf strRawURL.EndsWith("/") Then
Response.Redirect(strRawURL & "Default.aspx")
End If


This resolved the admin login issue, and also resolved logout issues on the home page when the site is in a virtual directory and accessed through the default document.

Threaded View

Expand / Collapse

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top