internal static string CreateDigestAuthChallenge(string realm) { string text = HttpUtility.CreateNonceValue(); string text2 = "MD5"; string text3 = "auth"; return(string.Format("Digest realm=\"{0}\", nonce=\"{1}\", algorithm={2}, qop=\"{3}\"", new object[] { realm, text, text2, text3 })); }