After spending a very long time to build this site, i finally put it in
production. The prime reason for the delay was hosting which i was not
able to afford up until now.
Well everything seemed to work fine on my dev machine but once i put the
code in production, my URL rewriting logic failed. I was using Gaidar
solution. From what i observed the http module was not picking up on the
application load. So as a last minute change i used
UrlRewritingNet.UrlRewrite. I did not
have to change much of the thing for this to work. Its pretty straight
forward to setup and use.
First you have to add a config section
The next step is to define the http module ( This is where i think my
other solution fails)
Now you are ready to write the rules like so.
Well you would guess that this is all you do and everything works fine.
Even i thought so, but when i was testing this, i logged into my site
and the URL which i expected to be something like this
“http://vinay.qsh.eu/Post/1/something.aspx” had become
“http://vinay.qsh.eu/Post/1/something.aspx?ID=1”. This broke my page
because there are 2 parameters with the same id. It beats me as to why
this is being added on login/logout. It is not a postback issue as every
other postback is working fine.
How to fix this? This is what i have done.
Add a helper method to check whether if the URL is rewritten one or
Then use this function in the LoggedIn and LoggedOut events to manage
One more thing. To manage the Return URL, you’ll have to call the helper
function like so
I will be using this workaround until i find a fix.