NetworkError: Fialded to send on XMLHTTPRequest: Failed to load - using IIS

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?


23 Replies

JO John November 27, 2021 10:37 AM UTC

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.



JO John November 29, 2021 08:15 AM UTC

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?



KR Keerthana Rajendran Syncfusion Team November 29, 2021 02:44 PM UTC

Hi John, 

Thanks for contacting Syncfusion support.  

We understood that you are facing some difficulties with Blazor File Manager component while hosting in Windows10, IIS server. We would like to mention that we have not used any AJAX request and HttpClient call is used in Blazor to perform file operations in File Manager component. 

To replicate the exact scenario, we request you to share the following details. 

  1. Type of Blazor project (Client, Server or WebAssembly).
  2. .Net version and Syncfusion package version used.
  3. Elaborate on the authentication scenario in your end.
  4. If possible, share some code blocks of authentication performed or steps/reference blogs to check this from our end.

Please revert with the requested information to assist you promptly. 
  
Regards, 
Keerthana R. 



JO John November 30, 2021 01:14 PM UTC

It's a blazor server app built from the syncfusion builder with authentication enabled. Screenshot 2021-11-30 050822.jpg



SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team December 1, 2021 02:26 PM UTC

Hi John, 
 
Thanks for the shared details. However, we would like to confirm the way through which you have created your application with Syncfusion component. Please confirm whether you have followed the below UG link to create your application? 
 
 
Else if you have followed any other help link for creating our Syncfusion application then please share those details. It may help us to validate and provide a better solution at the earliest. 
 
Regards, 
Shameer Ali Baig S. 



JO John December 1, 2021 06:29 PM UTC

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.  



JO John December 1, 2021 06:33 PM UTC

This is where the issue starts:



SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team December 2, 2021 05:43 PM UTC

Hi John, 
 
Thanks for sharing the issue replication details. 
 
We were able to replicate your reported problem at our end with the provided authentication steps. We need some additional time to identify the exact cause of this issue since it occurs specific to IIS authentication scenario. So, we will update you with further details on or before 8th December 2021. 
 
We appreciate your patience. 
 
Regards, 
Shameer Ali Baig S. 



MS Marco Saeed replied to John December 7, 2021 03:46 PM UTC

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



JO John December 7, 2021 05:22 PM UTC

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.



SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team December 8, 2021 03:15 PM UTC

Hi John, 

Thanks for your patience. 

We have confirmed that the reported issue with File Manager only occurs when the Authorization code is included in Blazor application. We face similar issue with Http Client call in default Blazor application as well. We have raised queries regarding this Http Client issue in general forums. We will track those forums to proceed further on this issue. We will also reach you, if we get any solution regarding this issue. 

We request you to track the general blog for updates regarding this issue. 


Regards, 
Shameer Ali Baig S. 




MS Marco Saeed December 15, 2021 04:29 PM UTC

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



JO John December 15, 2021 10:58 PM UTC

I already got fired from my project for the same reason. I don't care anymore. Hopefully they'll fix it for you.



KR Keerthana Rajendran Syncfusion Team December 16, 2021 01:30 PM UTC

  
Dear customers, 
 
Sorry, we cannot help further in this case due to the limitations of the Blazor framework. We have raised a query on GitHub for a fix and tracking it closely for the solution. 
 
 
We will inform you once we get an update from them. 
 
Regards, 
Keerthana R.  



MS Marco Saeed January 6, 2022 07:30 AM UTC

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



IL Indhumathy Loganathan Syncfusion Team January 7, 2022 02:39 PM UTC

Hi Marco, 
 
We are closely tracking the GitHub link for updates on windows authentication. Meanwhile, we have prepared a Blazor server application with authentication by following the steps in the below blog. 
 
 
Please find the sample from below link. 
 
 
In the sample, we have rendered Blazor File Manager, which will be visible to authorized users (logged in) only. Check the below blog to understand about Blazor server authentication. 
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Indhumathy L 



MS Marco Saeed January 31, 2022 11:09 AM UTC

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



IL Indhumathy Loganathan Syncfusion Team February 1, 2022 03:19 PM UTC

Hi Marco, 
 
Currently we are validating the requirement with the shared details for Blazor File Manager component. We will update you further details on or before February 4, 2022. We appreciate your patience. 
 
Regards, 
Indhumathy L 



IL Indhumathy Loganathan Syncfusion Team February 4, 2022 04:00 PM UTC

Hi Marco, 
 
We have checked the sample with the shared code snippets but unable to trigger the HttpClient call at our end. We have recorded the behavior in the below video. 
 
 
Please modify the tried-out solution at your end in the below sample which would help us to further validate with our File Manager component. 
 
 
Regards, 
Indhumathy L 



MS Marco Saeed replied to Indhumathy Loganathan February 4, 2022 07:44 PM UTC

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



Attachment: AuthorizationSampleVideo_db5aa303.zip


KR Keerthana Rajendran Syncfusion Team February 8, 2022 04:26 PM UTC

  
Hi Marco, 
 
We checked your sample in another machine and yes, the suggested solution works for HttpClient call but the same doesn’t work with File Manager component. We are validating the feasibility to resolve this with high priority and we will get back to you with further details on or before February 11, 2022. 
 
Regards, 
Keerthana R. 



IL Indhumathy Loganathan Syncfusion Team February 11, 2022 02:47 PM UTC

Hi Marco, 

Thanks for your patience. 

We have considered providing support to customize the HttpHandler of the Blazor File Manager component. By using this support, you can modify HttpClient using the HttpHandler to achieve Windows authentication for the Blazor File Manager. This feature will be included in any of our upcoming releases. Generally, we will plan any feature implementation based on customer request count, feature rank, and wish list plan. 

You can track the feature status through the below link, 
 
 
Regards, 
Indhumathy L 



AK Andrew Kapuduwa replied to Marco Saeed May 10, 2022 06:40 AM UTC

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.


Loader.
Up arrow icon