Request.ApplicationPath not consistent

  • Thread starter Thread starter CKKwan
  • Start date Start date
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.
 
localhost:50440 is not an IIS application path it's a built-in development
server (e.g. Cassini) path.
Peter
 
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 ?





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
Back
Top