Clicking on a tab gives me a URL with path missing
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngibuyspy' list.


John Nelson
Ok, what could have happened here...

Now that I've uploaded everything to my web hosting service my main page is
fine, but when I click on any links the URL is incomplete. For example, I
click on the first tab and instead of

http://www.myserver.com/desktopdefault.aspx?tabindex=1&tabid=8

I get

http://desktopdefault.aspx/?tabindex=1&tabid=8

How did I do that?

Thanks for your help!

John W. Nelson

Reply to this message...
 
    
June Tabadero
this is a problem when you install under the root web directory and using
the Request.ApplicationPath... there is a bug fix at aspsmith.com but doesnt
seem work very well when you try to access the site differently (e.g.
http://server1, http://10.1.1.1, http://www.site.com ) the first value that
gets assign to the Application("AppPath") will always be used...what i did
as a quick fix was to modify the solution and store the path in a session
variable and then replace all occurences of Request.ApplicationPath or

Application("AppPath") with Session("AppPath") then insert the following
lines of code in Global.Asax.vb

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)

' Build the Application Path

If Session("AppPath") Is Nothing Then

Dim sAbsUri As String = Request.Url.AbsoluteUri

Dim sRawUrl As String = Request.RawUrl

If Request.ApplicationPath = "/" Then

Session("AppPath") = Left(sAbsUri, Len(sAbsUri) -

Len(sRawUrl))

Else

Session("AppPath") = Left(sAbsUri, Len(sAbsUri) -

Len(sRawUrl)) & Request.ApplicationPath

End If

End If

End Sub

worked fine with me...

hope it helps..

JuneT

"John Nelson" <Click here to reveal e-mail address> wrote in message
news:684905@aspngibuyspy...
[Original message clipped]

Reply to this message...
 
 
System.EventArgs




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com