Question about the Request Object

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
 
C

Craig Deelsnyder

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.
 

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

Top