Page 404'ing when running a SQL statement then redirecting

Dagnte H'utha

New Member
I'm having a very strange error, I'm by no means great with ASP.NET, but I'm helping develop a single sign-on application and I'm having trouble redirecting the user. I'm going to keep it as simple as possible, this is how it works:1.) They come from another website, it passes a Single Sign-On object with their ID in it2.) On page load, we use that ID to look up in our database and grab their information and if they're missing information, they have to fill it out.3.) If they're missing no information, it inserts their ID to an active session table, and then it redirects them to the final websiteThe trouble is, I can do the SQL insert statement just fine when the page loads and it receives the data from the Single Sign-On object just fine; but when I run the SQL insert statement and then redirect them to another page the page just 404s. When the redirect is placed in there, we also get a Single Sign-On error, just saying that it couldn't complete. We register that the SQL statement ran, but they're not redirected; like said, it just 404s. Any reason why this would happen? Here is the general flow in code:\[code\]protected void Page_Load(object sender, EventArgs e){ SSOObject x = ServiceProvider.RecieveSSO(Request); userID = x.ID; SqlConnection conn = new SqlConnection(connString); conn.Open(); SqlCommand comm = ("INSERT INTO etc..."); comm.Parameters.AddWithValue("@ID", userID); comm.ExecuteNonQuery(); conn.Close(); comm.Dispose(); // It works fine up to here, but if I add this it 404's: Response.Redirect("http://ourwebsite.com/user/etc...");}\[/code\]Thanks in advance to anyone who gives this a go, it's been baffling me for a bit.Edit: Left out an important piece of information. If I comment out the SSO code and just hardcore the ID, the entire process works!
 
Top