Why is ASP.NET FormsAuthentication cookie not authenticating user?

I have a site that uses the default SqlMembershipProvider and FormsAuthentication. I can use the built-in Login Controls and/or programmatically call all the methods to authenticate a user and get the same result – the user is authenticated and a cookie is created, but the cookie does not appear to be valid since I can’t get into any page that requires authentication.

How to check whether the URL is valid or not

I have one textbox in that user enter the URL, but if want to check that URL while page rendering then what to do? Here is my code: protected void btnRender_Click(object sender, EventArgs e) { string strResult = string.Empty; WebResponse objResponse; WebRequest objRequest = System.Net.HttpWebRequest.Create(urltxt.Text); objResponse = objRequest.GetResponse(); using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) { … Read more