J
JC Foust
Hello
I'm in the finishing stages of a new CMS site and we've recently discovered a tear-out-my-hair authentication problem. Essentially, what I have is a news site. We list articles on the index page requiring registration. What I need to do is this
When a user clicks on an article headline/url i need to check and see if they have our cookie. If they don't, they need to be redirected to our login page. Now, the login page is legacy ASP, plain and simple. THAT page works if I manually go to it and login (cookie gets set and all).
The problem is that I cannot get the individual article page (aspx page) to check for cookies and redirect to the ASP page. I've googled this until my fingers bleed and I completely understand forms authentication, but my little red-headed-stepchild procedure will not work. Can anyone help??
Here's the latest inline code I've tried (feel free to laugh, I'm nearly a neophyte here)
<script runat="server" language="vb"
Sub Page_Load(Sender As [Object], e As EventArgs
Dim myCookieName As HttpCookie = Request.Cookies("yourein"
'Check to make sure the cookie exist
If myCookieName Is False The
Response.Redirect("/mysite/login/login.asp"
End I
End Su
</script
Thanks so much
J
I'm in the finishing stages of a new CMS site and we've recently discovered a tear-out-my-hair authentication problem. Essentially, what I have is a news site. We list articles on the index page requiring registration. What I need to do is this
When a user clicks on an article headline/url i need to check and see if they have our cookie. If they don't, they need to be redirected to our login page. Now, the login page is legacy ASP, plain and simple. THAT page works if I manually go to it and login (cookie gets set and all).
The problem is that I cannot get the individual article page (aspx page) to check for cookies and redirect to the ASP page. I've googled this until my fingers bleed and I completely understand forms authentication, but my little red-headed-stepchild procedure will not work. Can anyone help??
Here's the latest inline code I've tried (feel free to laugh, I'm nearly a neophyte here)
<script runat="server" language="vb"
Sub Page_Load(Sender As [Object], e As EventArgs
Dim myCookieName As HttpCookie = Request.Cookies("yourein"
'Check to make sure the cookie exist
If myCookieName Is False The
Response.Redirect("/mysite/login/login.asp"
End I
End Su
</script
Thanks so much
J