SourceMap 404 Chrome, FireFox Vs Edge - asp.net

I have a web app with angularjs and asp.net.
I have implemented StackTrace.js but I'm having issue with the source map.
My source mapping is made with the ASPNetBundling https://github.com/benmccallum/AspNetBundling
My bundling is made this way
- new Bundle (angular and other framework js)
- new ScriptWithSourceMapBundle(all the angular directive that need to be mapped)
Now the problem is if i put my StackTrace.js in a "ScriptWithSourceMapBundle" it works well on Chrome and Firefox. Edge generate a bunch of 404 sourceMappingURL not found.
If i put the StackTrace.js in the "Bundle" instead, Edge is fine but Chrome and Firefox generate the 404 sourceMappingURL not found error.
The StackTrace.js got the min.js and min.js.map included too in the project.

Related

404 error - File or directory not found. This is happening with certain pages when using Chrome Web Browser

I've been hired into a company that uses ASP.NET for all of their external and internal sites. I'm not too familiar with ASP.NET.
I'm currently working on a external site that runs perfectly in Internet Explorer.
When using the site on chrome, I have certain pages that give me the 404 - File or directory not found.
What can I do to help prevent this error code from showing up when using this site the chrome?
From your description, I understand that your site is a legacy site that is compatible with the IE browser but it is not working properly with modern browsers.
The 404 error information generally informs us that something is not found but if the site works fine in the IE browser then it could be possible that the issue is something else. In that case, this is too little information to predict the cause of the issue.
You may need to provide detailed information about which exact piece of code has the issue. Which version of the Asp.Net project and which kind of project(Web application, web API, etc.) it is. You may need to modify your code or project to make it work with modern browsers including Google Chrome.
At present, if you don't want to make any changes in your code then you could try to use the IE mode in the MS Edge browser to load your legacy site.
You could configure the IE mode manually or using the group policy.
To quickly check it, Launch the Edge browser. Paste edge://settings/defaultBrowser in the address bar and press the Enter key. Add your page to the Internet Explorer mode pages. Visit your site, it should load properly in the IE mode in the Edge browser.

ASP.NET Web Forms - FontAwesome CDN Fallback Not Working

In my ASP.NET Web Forms project, i am using bundling and minification. I want to use Fontawesome CDN with fallback support but problem is that only CDN is working and as a fallback my downloaded local Fontawesome is not working.
I am using StyleBundleFallback
for stylebundle cdn fallback.
I have checked that i am referencing fontawesome correctly.
Although Bootstrap 5 is working fine but only fontawesome is not working.
Here is my code:
bundles.Add(new StyleBundle("~/webfont", fontico)
.IncludeFallback("~/Content/font-awesome/css/all.css", "sr-only", "width",
"1px"));
Above code is working fine because it is using correct cdn url. You can try to modify this url to make a fallback so that it should use local fontawesome file but it is not working.
As far as I know, this works the other way around. i.e. tries the CDN first, fails to a local version of the library if the CDN isn't available.

XML Parsing Error: no element found Location

When I work in my local host, it is working fine. No issues.
When I deployed my code to the server, This error occurs only to One page in my application. All other pages works fine.
I tested in IE, Chrome and Firefox browsers. In IE and Chrome, it is showing blank page. I checked in developer tools and found that there is no content. In Firefox, it is showing the below error.
XML Parsing Error: no element found
Location: create.aspx
Line Number 1, Column 1:
^
The other thing I am using differently from other pages is the toolscript manager.
In other pages, I am using script manager.
What would be the reason behind this ?

CSS : Failed to load resource in chrome

I have a django site running locally. Everything seems ok except the CSS files that can not be loaded by Chrome. I can see a Failed to load resource error in the console.
The site is ok in firefox
The site is ok if I get the css not from the local server but from the production server
The css source can be viewed correctly
I have no special blocker plugin install
The css is rather big but I still have the issue if I use a very short file
I have similar issues with some js files (ckeditor)
It works of with some other css and js (admin css for example)
The django app has been developped with 1.0 and I am in the process of moving it to 1.4. The css and js files are served as media
Any idea?
Didn't find the real cause but the problem is solved. Maybe because it was served as media and now it is served as a static.

ASP.NET MVC does not catch styles when published

I have an ASP.NET MVC application that works fine when I run it on Visual Studio. But when I publish it, all the styles dont seem to work. Are there any general guidelines on why styles dont work for an MVC application when published because right now I have no clue on what is happenning??
Any ideas and suggestions are appreciated!
There are many reasons why your css styles might not show up.
Caching: Maybe your browser use a cached version of your css file(s). Check with fiddler or clear the browsers cache
Wrong relativ path to the css file(s): You should specify relative paths when including css files in your views (use Url.Content("~/...") for getting the right url). This is an issue when you use not the same path on your IIS and your IDE.
But the first check in any cas is to run fiddler and see
Is the browser requesting the right css file(s)
Is the server returning the file or a 404, 304, ... status code
It is possible that you have defined the styles in a new file and have not included the new css file in your project (in Visual Studio .net).
VS.Net does not publish those files which are not part of the project.
Get Firebug, inspect the element that should have the style applied and see what CSS is actually present.
Take a look at the CSS Panel and see the CSS files that are being linked (click the down arrow in the master.css as shown in the image below).

Resources