Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用C语言编写Tomcat摘要#_C#_Authentication_Tomcat_Digest Authentication_Unauthorized - Fatal编程技术网

C# 使用C语言编写Tomcat摘要#

C# 使用C语言编写Tomcat摘要#,c#,authentication,tomcat,digest-authentication,unauthorized,C#,Authentication,Tomcat,Digest Authentication,Unauthorized,身份验证被接受,结果很好,但在任何时候,我在同一代码中将参数添加到URL时,都会得到错误:远程服务器返回错误:(401)Unauthorized 我尝试了几种形式的摘要身份验证,但没有解决问题,下面是我使用的一些形式的代码 CredentialCache mycache = new CredentialCache(); mycache.Add(uri, "Digest", new NetworkCredential("admin", "admin")); req.Credentials = my

身份验证被接受,结果很好,但在任何时候,我在同一代码中将参数添加到URL时,都会得到错误:远程服务器返回错误:(401)Unauthorized

我尝试了几种形式的摘要身份验证,但没有解决问题,下面是我使用的一些形式的代码

CredentialCache mycache = new CredentialCache();
mycache.Add(uri, "Digest", new NetworkCredential("admin", "admin"));
req.Credentials = mycache;