Request.ApplicationPath not consistent

C

CKKwan

Dear All,

Using VS2008 on Vista (IIS7). Request.ApplicationPath return something
like "http://localhost:50440/"

When deploy into Server 2003 (IIS6), found that
Request.ApplicationPath is returning "c:\\Inetpub\..."

May I know what has gone wrong?

Thanks in advance.
 
P

Peter Bromberg [C# MVP]

localhost:50440 is not an IIS application path it's a built-in development
server (e.g. Cassini) path.
Peter
 
J

Juan T. Llibre

re:
!> When deploy into Server 2003 (IIS6), found that Request.ApplicationPath is returning "c:\\Inetpub\..."

Using Windows 2003 Server with IIS 6.0, it works fine.

See the sample at :

http://asp.net.do/test/apppath.aspx

apppath9.text = "Request.ApplicationPath is : " & Request.ApplicationPath

The result of that is : "Request.ApplicationPath is : /test"

re:
!> May I know what has gone wrong?

Maybe a typo, and you actually used Request.PhysicalPath or Request.PhysicalApplicationPath ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top