0

I am currently debugging an issue with one user unable to communicate with our auth servers. This issue is important to us because it's one user, which likely could stem to more users as we grow.

This is the method I use to debug his issue.

List<string> headers = new List<string>();
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.CookieContainer = new CookieContainer();
webRequest.AllowAutoRedirect = false;
using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse())
{
    headers.Add("Status Code: " + (int)webResponse.StatusCode);
    headers.Add("Status Desc: " + webResponse.StatusDescription);
    foreach (string key in webResponse.Headers.Keys)
    {
        if (!key.ToString().Equals("Location"))
        {
            var value = webResponse.Headers[key];
            headers.Add(key + ": " + value);
        }
    }
}
// Try-catch statements here, which print out "Error Message: " + ex.Message

The error I have been receiving when he requests our servers are:

enter image description here

Additionally, I have used differently HTTP(S) protocols and webRequest.XXXXX settings but to no avail - the errors are all in the 40X range.

enter image description here

I am aware that the 4XX class of status codes are intended for cases in which the client seems to have errored.

403 Forbidden indicates that the request was a valid request, but the server is refusing to respond to it.

407 Proxy Authentication Required indicates the client must first authenticate itself with the proxy.

One thing I am not entirely sure is, who the culprit to this issue? Is it:

  1. The user's firewall settings?
  2. The settings to our authentications servers rejecting this user?
  3. The request settings?

Someone in a previous thread suggested I ask the user to install Fiddler to sniff the requests and responses, but I am feeling uncomfortable having him configure the things that Fiddler asks you to accept in order to use some of its features, for example, HTTPS. Are there alternatives to how I can debug this?

theGreenCabbage
  • 121
  • 1
  • 6
  • has anyone ever logged in? if so, whats the difference between client platforms between who can and who can't log in? – au_stan Feb 18 '14 at 15:54
  • Hi @austin. Users that are able to connect, (all 400+ of them) receive `302`, which is the desired behavior because if you try to access that URL via a web browser, it will simply redirect you to the host - this is to prevent access. That URL is actually just a PHP script where our C# client `POST`s information to our servers. This is what it looks like: http://puu.sh/710xR/dba1bcaf27.png – theGreenCabbage Feb 18 '14 at 15:59
  • and the user is giving the correct credentials? you can use chrome/firefox to pick up the headers between the client and the web server – au_stan Feb 18 '14 at 16:05
  • The example I use above doesn't POST any thing - it simply requests some headers. There is nothing to authenticate, really. – theGreenCabbage Feb 18 '14 at 16:09

0 Answers0