English 中文(简体)
SSRS报告。 NET 核心 吉大港定居地的申请未经客户认证制度批准。
原标题:SSRS report with .NET Core, The HTTP request is unauthorized with client authentication scheme Ntlm

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 核心,但我确信

我应当做些什么来纠正这一错误?

最佳回答

这是对我的工作,我删除了<编码>具有约束力。

BasicHttpBinding binding = new BasicHttpBinding();
binding.MaxBufferPoolSize = 0;
binding.MaxReceivedMessageSize = 5242880;
binding.TextEncoding = System.Text.Encoding.UTF8;
binding.TransferMode = TransferMode.Buffered;
binding.UseDefaultWebProxy = true;

binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;

var rsExec = new ReportExecutionServiceSoapClient(binding, new EndpointAddress(SSRSReportExecutionUrl));
rsExec.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
rsExec.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
问题回答

据我所知,网络上的大多数案件都是使用国际数据系统部署的,使用Windows Authentication进行了核实。 如果你重新使用国际数据系统,那么只有改动Windows Authentication才能并尝试遵循以下步骤:

如果它不去做,就在使用之前尝试使用Kerberos和登记SPN。

对于那些“没有蓝色”问题的人来说,使用者的密码很有可能已经过期。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签