So, I have a problem with C# .net 8 and ReportServer 14.0.600.594. When I'm setting parameter I get a message error 'HTTP request is not allowed for client authentication scheme "Ntlm" '
I use C# .NET8.0 and ReportViewerCore.NETCore 15.1.1
using Microsoft.Reporting.NETCore;
using System.Net;
ServerReport report = new ServerReport();
report.ReportServerCredentials.NetworkCredentials = new NetworkCredential("f.toto", "abs12e44+-", "mydomain.local");
report.ReportServerUrl = new Uri("https://prodreportserver.myserver.cpù/reportserver");
report.ReportPath = "/MyReports_RH/Test";
report.SetParameters(new[] { new ReportParameter("dReference", "01/01/23") });
report.SetParameters(new[] { new ReportParameter("GuidGeneric", "77f23cb4-42f2-461a-8b92-b544c8782b40") });
byte[] pdf = report.Render("PDF");
string filename = String.Concat("c:\\tmp\\", Guid.NewGuid().ToString(), ".pdf");
System.IO.File.WriteAllBytes(filename, pdf);
when I set the first parameter I have this error 'HTTP request is not allowed for client authentication scheme "Ntlm" '
Into my rsreportserver.config I have :
<Authentication>
<AuthenticationTypes>
<RSWindowsNegotiate/>
</AuthenticationTypes>
<RSWindowsExtendedProtectionLevel>Allow</RSWindowsExtendedProtectionLevel>
<RSWindowsExtendedProtectionScenario>Any</RSWindowsExtendedProtectionScenario>
<EnableAuthPersistence>True</EnableAuthPersistence>
</Authentication>
I try to change authentication types or use ImpersonationUser
report.ReportServerCredentials.ImpersonationUser = System.Security.Principal.WindowsIdentity.GetCurrent();
but I have the same message. Why?
Thank for your help.