By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,669 Members | 2,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,669 IT Pros & Developers. It's quick & easy.

Using Forms Authentication With URLRewrite

P: n/a
Hi,

In ASP.NET, i've written a class that handles URLRewrite. So that all
requests to say "default.aspx?id=2&basic=1" is returned as "basic.1/2.aspx".
It works beautifully...But but but....Using forms authentication the
authentification redirect somehow get redirected using the non-rewritten
url. That is....the redirect happens on the rewritten URL. Exampel:

I call "mysite.com/basic.1/2.aspx".
1. The URLRewrite rewrites the URL to "default.aspx?id=2&basic=1".
2. The Forms authentication kicks in and takes the rewritten URL as "calling
url".
3. After authentication I'm redirected back to "default.aspx?id=2&basic=1"
and not "mysite.com/basic.1/2.aspx".

Hope you understand my problem. Of course the system handles the urls, but
it looks odd. I need to be able to intercept the Forms authentication and
handle it the proper URL. Any ideas? Perhaps some event that I'm not
familiar with?

--
Thx,
Summa
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Just a thought are you using Redirect or RewritePath on your modified url?

Paul

"Summa" <su***@summarum.dk> wrote in message
news:c9***********@news.cybercity.dk...
Hi,

In ASP.NET, i've written a class that handles URLRewrite. So that all
requests to say "default.aspx?id=2&basic=1" is returned as "basic.1/2.aspx". It works beautifully...But but but....Using forms authentication the
authentification redirect somehow get redirected using the non-rewritten
url. That is....the redirect happens on the rewritten URL. Exampel:

I call "mysite.com/basic.1/2.aspx".
1. The URLRewrite rewrites the URL to "default.aspx?id=2&basic=1".
2. The Forms authentication kicks in and takes the rewritten URL as "calling url".
3. After authentication I'm redirected back to "default.aspx?id=2&basic=1"
and not "mysite.com/basic.1/2.aspx".

Hope you understand my problem. Of course the system handles the urls, but
it looks odd. I need to be able to intercept the Forms authentication and
handle it the proper URL. Any ideas? Perhaps some event that I'm not
familiar with?

--
Thx,
Summa

Nov 16 '05 #2

P: n/a
Hi,

"Paul Hatcher" <ph******@spamless.cix.co.uk> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
Just a thought are you using Redirect or RewritePath on your modified url?


Im using RewritePath....

I could, of course, somehow check to see if the user is authenticated and if
not: Just dont rewrite the URL. That would bring up the desired
behaviour...but its somehow not that elegant and I wanna keep all that logic
in the same Class (My Authenticator class). Perhaps from an event...?

--
Summa
Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.