In my asp.net application I am using Forms authentication.Now I need to authenticate a webrequest that is in my code.I have managed to write a piece of code like this\[code\] string url = "http://localhost:200/min-konto.aspx"; Doc doc = new Doc(); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; byte[] data = http://stackoverflow.com/questions/14433210/Encoding.UTF8.GetBytes("email=myemail&password=mypassword"); request.ContentLength = data.Length; using (Stream stream = request.GetRequestStream()) { stream.Write(data, 0, data.Length); } HttpWebResponse reponse = (HttpWebResponse)request.GetResponse(); HttpContext.Current.Response.Write(reponse.StatusCode.ToString()); int id = doc.AddImageUrl(reponse.ResponseUri.AbsoluteUri);\[/code\]And I am using this "reponse.ResponseUri.AbsoluteUri" as my final authenticated url.But the authentication does not happens.Can any one give me a hint?