Question about the Request Object

  • Thread starter Thread starter Roshawn Dawson
  • Start date Start date
R

Roshawn Dawson

Hi,

I'm having a tiny problem using the Request object. I have a web app
named Testing and it contains a .aspx page named Test. When using the
Request.Path property or the Request.RawUrl property, I get the
following value:

/Testing/Test.aspx

Note that this is on a development machine. If I were to place this app
on a production server, would I still get the same value if using
either Request.Path or Request.RawUrl?

What I'd like to get is this:

/Test.aspx

Or, simply enough, am I using the wrong property of the Request object?

Thanks,
Roshawn
 
Hi,

I'm having a tiny problem using the Request object. I have a web app
named Testing and it contains a .aspx page named Test. When using the
Request.Path property or the Request.RawUrl property, I get the
following value:

/Testing/Test.aspx

Note that this is on a development machine. If I were to place this app
on a production server, would I still get the same value if using
either Request.Path or Request.RawUrl?

What I'd like to get is this:

/Test.aspx

Or, simply enough, am I using the wrong property of the Request object?

Thanks,
Roshawn

Depends on how your other server is setup; basically these properties
return the part of the url after the host name, to the page you
requested. So in your case I assume your dev web server is running this
app in a virtual directory called Testing.

You'd have to setup the other server with a website in IIS at the root of
your application, and map the domain/header name to it.
 
Back
Top