Why ASP.NET MVC Application is Unwantedly Loading Bootstrap Multiple Times - c#

My ASP.NET MVC 5 application is too heavy due to the application loading bootstrap and other CSS files unwantedly too many times.
How do you fix this?
Here's a screenshot of a fresh new ASP.NET MVC 5 Project:
On the screenshot you'll see that bootstrap.css has been loaded 9 times. Causing the page to be of total of 1,596.68 KB!
This happens to all my projects even if its fresh (no edits).
I hope you've come across this problem and have an idea how to fix it. Or is it a bug? Anyways, my IDE is Visual Studio 2013 Web Express with Update 4

This link seems to suggest that it is a bug with Firefox developer tools: https://bugzilla.mozilla.org/show_bug.cgi?id=978688
The suggested solutions is to upgrade the browser and do a cache reset, even though your projects are fresh, the css-files might be cached since before.

Related

ASP.NET Web API 2 minutes to load doc page on new project

I am trying to set up an ASP.NET (.NET framework v4.7.2) Web API. When I debug and try to access the values doc page (/Help/Api/GET-api-Values), it takes between 1.7 min and 2 min to load (time according to the network tab).
I have tried it with and without updating the NuGet packages. I have tried FF and Chrome. I have tried it on my SATA and my SSD. I have re-created the project several times. I cannot get this to go any faster and I have not made any changes or addition to the project at all, all I do is create the project and hit debug. I have checked my resources and I am hovering around 40% CPU and 33% memory so it's not a resource issue. I should also mention that going from the home page to the api list page (/Help) works fine.
Any help would be appreciated
Clean install (or moving to pro) was the solution.
I updated my VS and a SR developer helped me look at the issue during a mentoring session, we could not get it to work so after 40min he suggested a clean install and said to try my pro license while I was at it. I suspect it was the clean install rather then moving to pro but I can't say 100% it was one or the other though. Unless pro lets vs use multiple cores because on community edition it was using 1 core and maxing that core out so my cpu looked ok at a glance but a deeper dive showed issues.

ASP.Net Core 2.2 HTML/CSS Navigation Bar Issues in Identity/Pages/Manage

I have been having this issue for a while. Before I had decided to recreate my project in a more current ASP.Net Core version, I was having many issues with CSS not applying to the elements I had selected or issues with HTML document margins after publishing to my Ubuntu Server. Many times I have tried creating the project using Core 2.2.3 2.2.2, Core 3 which I had trouble due to the inability to create an Identity but I would not like to mention this issue and focus on Core 2.2.
I would like to address that I know it is not the following of these issues:
Cached CSS
Issue With Web Browser (Edge, Explorer, Chrome, and FireFox have been tested)
Issue with installed Core (I have reinstalled twice)
Project Issue (A minimum of 20 projects have been created trying to fix this)
Unless my methods of testing are incorrect, I am sure that these are the sources of the issue.
Having little experience in ASP.Net I have little to no clue what the issue could be but I have some ideas.
https://i.stack.imgur.com/5Ymv1.png
https://imgur.com/a/e97DSVb
(Excuse me for the incorrect usages of links, I am new to Stack Overflow)
Here is some of the information which could hint at something from the inspect element.
https://imgur.com/a/JUBT4kf
https://imgur.com/a/eHFe7Bd
I am lost, and I have been having this problem forever. Anything will help, thank you so much.

ASP.NET MVC 5 applications really slow to build

I'm getting into ASP.NET, and I'm using MVC 5 to build my applications while I follow some Pluralsight trainings. I noticed that in the video training the instructor's Visual Studio builds really fast, but in my computer, after I modify something, every time I build it usually takes from 90 to 120 seconds for the build to finish and I be able to navigate through my application on the browser.
My laptop isn't super old or slow, since it has a Core i5 with 4GB of RAM and an SSD. I've tried to set the MvcBuildViews attribute to false, but still the problem persists. I'm using Visual Studio 2015 Enterprise with Update 2.
Any ideas on what should be the problem?
Delete everything under
C:\Users\YOUR_USER_NAME\AppData\Local\Microsoft\WebSiteCache
Check here too
C:\Users\YOUR_USER_NAME\AppData\Local\Temp\Temporary ASP.NET Files\siteName
It seems like it was a problem with Visual Studio 2015 Update 2. Once I installed Updated 3 it got way faster to build. I noticed that now the IIS Express isn't closed between builds, so now when I build my MVC projects I usually see the result on the browser in less than 20 seconds.
This is not much of an answer that will solve this problem for you. But, I specifically run into this issue with ASP.NET applications. With one of our solutions we have nearly 60 projects and that takes WAY to long to fully build and debug inside a browser from VS.
How I solved this was to point one of our servers with IIS to the folder that my presentation project builds too. This way when the web project is built I can browse my IIS website and see the changes. The downside to this is I can't actively debug in VS easily.
As far as speeding up VS to build this faster with debugging I have had no luck with my experience. From messing with symbol loads, just my code settings, VS IIS settings, but nothing has truly fixed this for me.

Visual Studio 2010 local testing server stopped working

Just recently I tried to build my mvc 3 project, however the local server will not load in the browser, it just says that the web page cannot be displayed almost instantly on both IE9 and Firefox...
Strange thing is it was working fine not two weeks ago, I have tried searching google but have not come up with any solutions.
Does anyone know how to fix this?
Thanks,
Alex.
sometime MVC project have a infected build so try these step
try to rebuild , clean and do the disk clean then restart your system. maybe it's possible code work fine.
are you can show browser snapshot then i am sure what was matter with project you trying to run.
Ok after looking high and low I found this article Is Your ASP .Net Development Server Not Working?. It was some changes that were made to my hosts file by a seperate installer, after modifying my hosts file as suggested in the article it once again works.

Web site reports xxx does not exist in current context after upgrade to VS2008 Sp1

I just upgraded to VS2008 Sp1, and I have a weird issue going on. I get a lot of errors from my code behind pages indicating that a control doesn't exist in the current context and I am also getting an errors that the pages do not have methods.
It seems like ide is trying to compile the c# code without compiling the aspx code.
The site runs fine via both IIS and Visual Web Developer, and in fact when I open up the code behind page, all the errors go away. Anyone have any idea why VS2008 SP1 is behaving this way?
I am using C#, and the Web Site project mode.
Check to make sure you are targeting the correct version of the .NET Framework. You can view this in the properties of the Solution file.
VS2008 allows you to target multiple framework versions.
Also check the Web.config, I know there can be differences between VS Web Developer and VS Standard/Pro with the web config. Maybe copy a fresh web.config file into the project.
There is a KB Article and Hotfix for what sounds like might be my issue. I'll test this and update my answer if it was my specific problem but the behavior matches. I need to improve my google skills..should have found this via google.
This patch resolved my issue, weird

Categories