473,325 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Using Forms Authentication With URLRewrite

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
2 2310
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
4
by: Dave | last post by:
Hi, Is there anyway to mimic forms authentication's loginUrl and RedirectFromLoginPage functionality using Windows authentication? We are developing intranet sites using basic authentication...
2
by: thechaosengine | last post by:
Hi eveyone, If anyone could advise on the following I would be truly greatful: I have a fairly standard set up. An IIS 5.1 website set up with anonymous access allowed in all areas of the site...
6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.