dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.38k stars 10k forks source link

Blazor WebAssembly 3.2, Dll files are blocking by McAfee Web Gateway #23084

Closed mihaimyh closed 4 years ago

mihaimyh commented 4 years ago

It seems even after renaming .dll to another extension some (corporate) firewalls are still blocking them:

Capture Capture2

Is there any workaround for this except contacting the corporate admin team which will definitely won't unlock them?

javiercn commented 4 years ago

@mihaimyh thanks for contacting us.

You can try renaming the published output dlls as described here.

Please let us know if that solves your problem or if it still blocks the dlls. If that doesn't fix the problem, you can use a custom boot resource loader as described here where you have full control of the resource loading process.

mihaimyh commented 4 years ago

@javiercn I already renamed dlls like I mentioned initially. If you look closely to the screenshots the Microsoft.AspNetCore.Components.WebAssembly has the extension .myh instead of .dll

javiercn commented 4 years ago

@mihaimyh I missed the rename.

I would try creating a bundle with the file contents and use a custom boot resource loader to download the dlls.

mihaimyh commented 4 years ago

@javiercn I am not sure what do you mean with "custom boot resource", are there any docs for this?

javiercn commented 4 years ago

@mihaimyh you can alter the files in any way that let you get through the proxy, download them ahead of time and implement your own resource loader.

...

<script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script>
  Blazor.start({
    loadBootResource: function (type, name, defaultUri, integrity) {
      console.log(`Loading: '${type}', '${name}', '${defaultUri}', '${integrity}'`);
      switch (type) {
        case 'dotnetjs':
        case 'dotnetwasm':
        case 'dll':
            return await getDllContentsAsResponseObject(name, integrity);
        case 'timezonedata':
          return  `https://my-awesome-cdn.com/blazorwebassembly/3.2.0/${name}`;
      }
    }
  });
</script>
mkArtakMSFT commented 4 years ago

We will try to come up with a guidance on how to change the response format so that the antivirus and similar software products don't flag these going forward.

mihaimyh commented 4 years ago

@mkArtakMSFT Until then can you let us know if the guidance is based on @javiercn previous answer?

mihaimyh commented 4 years ago

Any update on this?

pranavkm commented 4 years ago

Given how infrequently we've seen this issue being reported, we're going to recommend using the solution listed in https://github.com/dotnet/aspnetcore/issues/23084#issuecomment-646027364 as a reasonable workaround. Please let us know if using that does not help and we might be able to provide further guidance.

ghost commented 4 years ago

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.