I m trying to generate an SSRS report from .NET Core application and I m following this tutorial
But I m getting the following exception
吉大港山区申请未经客户认证计划Ntlm。 服务器接收的认证负责人是国家排雷中心。
删除全权证书和使用<代码> BasicHttp SecurityMode.None with HttpClientCredentialType.None
一切工作都很出色,但我需要为这项服务增加全权证书。
I know there are many answers to this error but I ve tried almost all of them but nothing is working for me
我在此尝试:
我试图添加<代码>。 棱晶 类型代码>改为Ntlm
,但我有同样的错误。
var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Ntlm;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
binding.MaxReceivedMessageSize = 10485760; //10MB limit
var rsExec = new ReportExecutionServiceSoapClient(binding, new EndpointAddress(SSRSReportExecutionUrl));
var clientCredentials = new NetworkCredential(SSRSUsername, SSRSPassword, ".");
if (rsExec.ClientCredentials != null)
{
rsExec.ClientCredentials.Windows.AllowedImpersonationLevel =System.Security.Principal.TokenImpersonationLevel.Impersonation;
rsExec.ClientCredentials.Windows.ClientCredential = clientCredentials;
}
Also I tried to replace HttpClientCredentialType.Ntlm
with HttpClientCredentialType.Windows
but I got this error
System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme Negotiate . The authentication header received from the server was NTLM
一些答复建议修改<代码>web.config文档,或使用微软服务配置编辑编辑编辑编辑编辑编辑编辑,但我没有发现这一档案或我的这个编辑,我认为这些档案已经存在。 NET framework, not . NET 核心,但我确信
我应当做些什么来纠正这一错误?