.NETGURU
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




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification