HTTP GET works in browser, but doesn't with HTTPWebRequest

Title explains it. I am trying to change the password of a webpage programmatically using HTTP Web Request. When I do it through Google Chrome (pasting the uri in the address bar), the password change works. Here is the header I get when I inspect in Chrome.

Remote Address:
Request URL:
Request Method:GET

Authorization:Digest username="admin", realm="Secure Access", nonce="f3c6fcd9a549a42e9aac22818cb0f5ad", uri="/cgi-bin/check_user.cgi?Type=basic&Current=78-62-118-112-106-108-56&Password=98-96-102-96-106-96", response="cd17523a279f044d086b5bd0245eda0e", qop=auth, nc=0000001b, cnonce="9bd719c27efd9721"

When I try to do it programatically, I receive the OK (200) code, but the password change does not work. Here's my code.

System.Uri uri2 = new Uri(string.Format("https://{0}/cgi-bin/check_user.cgi?Type=basic&Current=78-62-118-112-106-108-56&Password=98-96-102-96-106-96", ip));
                        HttpWebRequest request2 = (HttpWebRequest)WebRequest.Create(uri) as HttpWebRequest;
                        request2.Accept = "text/html";
                        request2.Credentials = new NetworkCredential("admin", "M@ster1");
                        request2.Method = WebRequestMethods.Http.Get;
                        HttpWebResponse response2 = (HttpWebResponse)request.GetResponse();



Used fiddler as suggested, and it turns out it was the user-agent header. And thank you for correcting the typo L.B. :)

Need Your Help

Binding List<DataTime> to DataGrid Header

wpf list datetime data-binding datagrid

Hi I have list of days in given month and I would like to bind this list to datagrid control.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.