The following code should fix the problem. This code replace everything in the Global.asax file.
<%@ Application Language="VB" %>
<script runat="server">
Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)
AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString
If (Roles.RoleExists("Administrators") = False) Then
Roles.CreateRole("Administrators")
End If
If (Roles.RoleExists("Friends") = False) Then
Roles.CreateRole("Friends")
End If
' Set our user count to 0 when we start the server
Application("ActiveUsers") = 0
End Sub
Sub Session_OnStart(ByVal sender As [Object], ByVal e As EventArgs)
Session.Timeout = 10
Session("Start") = Now
Application.Lock()
Application("ActiveUsers") = CInt(Application("ActiveUsers")) + 1
Application.UnLock()
'SiteSettingsManager.UpdateSiteSettings(1, "Default")
End Sub
Sub Session_OnEnd(ByVal sender As [Object], ByVal e As EventArgs)
Application.Lock()
Application("ActiveUsers") = CInt(Application("ActiveUsers")) - 1
Application.UnLock()
End Sub
Function AppendQueryString(ByVal o As [Object], ByVal e As SiteMapResolveEventArgs) As SiteMapNode
If (Not (SiteMap.CurrentNode) Is Nothing) Then
Dim temp As SiteMapNode
temp = SiteMap.CurrentNode.Clone(True)
Dim u As Uri = New Uri(e.Context.Request.Url.ToString)
temp.Url = (temp.Url + u.Query)
If (Not (temp.ParentNode) Is Nothing) Then
temp.ParentNode.Url = (temp.ParentNode.Url + u.Query)
End If
Return temp
Else
Return Nothing
End If
End Function
</script>
Member
130 Points
542 Posts
Re: Skins not changing from dropdown box on homepage
Sep 05, 2008 02:16 PM|jwadsworth|LINK
The following code should fix the problem. This code replace everything in the Global.asax file.
Extended Personal Site Starter kit