When I run my app from IIS I'm being blocked when attempting to run the File Explorer's Ajax calls. When I run it natively it has no problem with this Ajax call but I need it to be hosted because of the authorization functions. Do I need to set something in the IIS server for this to work correctly?
It doesn't seem to be a problem and works without any Ajax error when I deploy it to a Windows Server. Guess it's only a Windows 10, IIS Express issue.
Must have authentication disabled for it to not have the Ajax errors and it only seems to work with anonymous users :(
Is there a way to use it with Windows passthrough authentication?
It's a blazor server app built from the syncfusion builder with authentication enabled.
This isn't my application, I used the freshly installed Syncfusion (latest 19.....53) VS Template from VS2022.
Enable Anonymous Authentication on IIS - everything is fine.
Disable Anonymous Authentication on IIS - The above XMLHTTPRequest error is thrown.
I want to disable Anonymous Authentication in IIS so i can receive the Windows Authentication from the users. This is where the issue happens.
This is where the issue starts:
Hi John,
I'm facing the same issue and also interested in a solution by syncfusion. I cannot confirm that the problem doesn't exist on windows server. I'm getting the same failure. What exactly have you done to run the app without that error?
Regards,
Marco
You have to ENABLE ANONYMOUS authentication for your site in the IIS server if you want the file explorer to work. Which is what I don't want to do since I'm using Windows authentication which doesn't work if you enable anonymous authentication but it might work for you.
Hi,
is there an update on this? A solution for this issue is very urgent because of customer's needs. Without that feature there is no secured application possible. An absolute "no go" for him and therefore i cannot complete his project.
Is there a known workaround without anonymous enabled option?
Regards,
Marco
I already got fired from my project for the same reason. I don't care anymore. Hopefully they'll fix it for you.
Hi,
as it seems that we won't get any help from MS in this case, I ask you for a hint to solve this problem.
I need SSO for my project (passthrough a active directory user). Is there any other approach to get this work without windows authentication?
What is the best practice to do that?
Besides I cannot believe that we are the only one who are facing this issue. That is a common case to secure an windows application, isn't it?
I am appreciate for any help.
Thanks and regards,
Marco
Hi Indhumathy ,
in the meanwhile I found a working solutions referring to your GitHub example. In fact it is possible to trigger a WebApi Call with windows authentication enabled if you configure the HttpClient service that way:
services.AddHttpClient("", cc => { }).ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler() { UseDefaultCredentials = true });
services.AddScoped(sp => sp.GetRequiredService<IHttpClientFactory>().CreateClient(""));
If you set a breakpoint in the HomeController method, you will see that the method will be triggered.
The question now is how I can set this configured HttpCient Service to the FileManager HttpClientInstance.
In my opinion that could be a solutions for the authentication issue.
Can you please help me with that?
Thanks and regards,
Marco
Hi Indhumathy,
At my end the HttpClient call is working without any modification of your code. I also recorded a video to demonstrate this. It is attached to this post.
You will see that your sample works exactly the way it should. I don't know why it isn't working at your end. Please try it again. It is working with windows authentication enabled or disabled. It doesn't matter.
I have checked that in some other samples without any issues. So finally I can say that the snipped should work. But how can I set that configured HttpClient to the FileManager.
Thanks for your help so far.
Regards,
Marco
Hi Marco,
I faced similar issue on the file manager component. Couldn't get the solution to work with Windows Auth enabled in the IIS.
As a workaround, deployed another app (App2) on the server(Anonymous access) with only FileManagerController and App1 pointing to the App2 URL to complete the file operations.
You can modify the FileManagerController so that only authorised users can request on the handler.