> > Well, what happens when you try to redirect the user?
>
> When I push the login button, I'll see no error message. I'm sure that
> my input is correct because that is handeled by my code, it will
> display something in the lblOutput when something is wrong or input
> isn't correct.
>
> the address bar is:
http://localhost/login.aspx?ReturnUr...ectedPage.aspx
> but it doesn't redirect or authenticate the user so I'll be stuck on
> the login page.
The gist of it looks ok. I wouldn't do it exactly the same: I would use a
visual component rather than creating the command component at runtime, I
would use one SQL query that returns the username and role where username =
(username) and password = (password) rather than two queries and I would use
a datareader to look at the dataset. But the approach you took should work.
From the url, it has tried to redirect but has been redirected back to the
login page.
Do you have any code in your global.asax? This might be relevant if you do.
Also, in your web.config, you use ' path="\" ' in your authentication. Try
path ="~\" instead, to make it relative to the web application root.
HTH
Lauchlan M