Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Redirect all http requests to web application

Reply
Thread Tools

Redirect all http requests to web application

 
 
Brian Smith
Guest
Posts: n/a
 
      02-20-2004
Good afternoon.

How can I force all images and static html files within an ASP.NET Web
Application to be redirected if the user has not logged in yet via Forms
Authentication.

For example, I have a web application name TestWebApp with Forms
authentication set to redirect to logon.aspx.

If I request http://HOST/TestWebApp/anything.aspx , I am redirected to the
logon.aspx.
If I requset http://HOST/TestWebApp/anything.gif, the image is returned. But
I want it to go to logon.aspx.

Thanks.
Brian Smith



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      02-20-2004
Hi Brian,

You could write a custom HttpHandler class to do this. Map all of your
requests for the various file types to your HttpHandler, and it will handle
the requests. It can then Redirect, or whatever, in response to a request
for a Resource such as a Page, image, etc.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Brian Smith" <(E-Mail Removed)> wrote in message
news:uw8#YT$(E-Mail Removed)...
> Good afternoon.
>
> How can I force all images and static html files within an ASP.NET Web
> Application to be redirected if the user has not logged in yet via Forms
> Authentication.
>
> For example, I have a web application name TestWebApp with Forms
> authentication set to redirect to logon.aspx.
>
> If I request http://HOST/TestWebApp/anything.aspx , I am redirected to the
> logon.aspx.
> If I requset http://HOST/TestWebApp/anything.gif, the image is returned.

But
> I want it to go to logon.aspx.
>
> Thanks.
> Brian Smith
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested HTTP params on ruby HTTP requests Dave Garcia Ruby 5 06-05-2009 08:15 AM
logging all HTTP requests Andy Fish ASP .Net 9 06-07-2007 12:30 PM
web requests and mobile requests Fernando Arámburu ASP .Net 1 04-08-2005 07:13 PM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
Re: Http Module Problem: not all requests hit my module why? Jiong Feng ASP .Net 2 11-29-2003 05:14 PM



Advertisments