The server is not reflecting the recent changes made

I created an MVC 5 application that runs perfectly when launched via Visual Studio. After publishing it to the server for the first time, everything worked fine. However, after making some CSS corrections and republishing the entire project, the website still displays the old CSS file. I have deleted all files from the server and tried multiple times, but the issue persists. Despite the fact that the changes are present in the CSS file on the server.

I suspect that this problem is related to MVC bundling because when I inspect the source code, it shows that it is accessing a different file that is not even located on the server:

<link href="/Content/cssmain?v=Ikj7NnMg3q9kTHR7ynWOJDQFGMZl3mtVMi_2EkOJxc41" rel="stylesheet"/>

How can I instruct Visual Studio to minify my CSS file again?

I have attempted cleaning and rebuilding, but without any success.

Edit: The configuration of my bundle appears as follows, and all files are stored on the server in the Content folder.

bundles.Add(new StyleBundle("~/Content/cssmain").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/site.css",
                  "~/Content/ilightbox.css",
                  "~/Content/bannerscollection_zoominout.css"));

Thank you very much.

Answer №1

It seems like the issue may be related to MVC bundling because upon inspecting the source code, it appears to be accessing a file that is not even stored on the server:

Could this be due to the CDN location? External CSS library (either yours or from a third party)? I'm unsure about what you meant by "not located on server."

Yes, it looks like ASP.net Bundling is at work here - make sure to review your Global.asax, App_Start/BundleConfig, or _AppStart files to confirm that the bundle configuration is correctly set up to point to the appropriate locations for your CSS and scripts.

Answer №2

Are you the only one encountering issues with loading the old css file, or is it affecting others who visit the site as well?

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is causing the discrepancy in CSS line-height when text spans multiple lines?

Can anyone explain why there is extra space above the first paragraph in this HTML and CSS code, but not the second or third? The line-height is consistent for all three paragraphs. How can I adjust it so that there is equal spacing around all three paragr ...

Accessing Data from a Dynamic Control in an Asp.Net Web Page

I am facing an issue with a dynamically created bill of material where each line item is a dynamic user control. These user controls have a textbox for quantity entry. However, when I click the submit button, all the controls disappear from the page and it ...

The inline-table display is not functioning properly when the content width is limited

The challenge I'm facing involves designing CSS for a web application centered around photo uploads displayed as polaroids. Each photo is encased in white padding, with extra padding at the bottom and the design adapts responsively. If a user adds a ...

Switching from hover to click on the menu

I am struggling with adjusting the function to trigger on 'click' instead of 'hover'. I have attempted changing 'hover' to 'click' and using 'toggle' but have not seen any positive outcomes. $('#menu ...

Enhancing forms with unique membership options

I am managing a website that relies on the asp.net membership tables (ASP 3.5 site). To streamline user management, I plan to upload user data from an Excel sheet directly into the membership tables using a form. After using a simple app to process the Exc ...

Issues with POST data not being received by MVC 4 APIController

Although this issue has been addressed numerous times, I am still unable to pinpoint the error! Here is a straightforward JS script that sends data back to the ApiController. function WebCall(url,parameterObject, callBackFunction) { this.callbackfunction ...

Utilizing Date Model Binding in ASP.NET Core Framework

While working on an ASP.NET Core Web API, I encountered an issue with binding DateTime values. Specifically, I have two properties - minimumDate and maximumDate - for filtering a certain resource. These properties are part of a Filtering object that is po ...

How to avoid shadow bleed when using positioned absolute elements?

I'm facing a challenge in developing a dropdown feature. The issue arises when I attempt to display an absolutely positioned container of items upon hovering, as the shadow from this container overlaps with the dropdown itself. Here's a simulatio ...

Tips for concealing elements beyond div boundaries

First and foremost, I want to mention that my focus is on studying frontend development, so I could really use some assistance with a task. I am looking to create a tab slider where the content on the left and right will flank it, ensuring the tab slider ...

Utilize jQuery on DOM elements created dynamically

I'm attempting to craft a masonry display using dynamically generated div blocks. Here is the structure I am working with: <div id="grid" class="panel"> <div id="grid"> <div id="posts"> <script src="htt ...

Extended Animation Tech

Can you explain the purpose of this code snippet? I received it from a developer, but I'm not sure about the functionality of the animationExtender. <asp:Panel ID="Panel2" runat="server" Width="300px" BackColor="Gold"> <div id="paren ...

Tips for inserting data into two tables using specified parameters

I am working with two different entities in my project. public class ProductOption { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int OptionId { get; set; } [Required] [MaxLength(40)] ...

missing object error

My task is to create a function that will deactivate the cmdButton7 button when the checkMultiple checkbox is selected, and then reactivate it once the sum variable equals 100 using vbscript and asp.net. Here's the approach I attempted: Sub disableB ...

What is the best way to align these text elements beside the images?

I am in need of the following: ====== =img1= Description ====== ====== =img2= Additional Info ====== Existing HTML setup: <div id="division-id"> <a href="[href]"><img src="images/img1.png"></a> <p>Description< ...

What is the process for adding a foreign key to the Reference table?

How do I insert a foreign key when filling up web service data? First, I create two tables: tblpersonal: studid int (primary key, identity increment) fname varchar(50) mname varchar(50) lname varchar(50) tblcontact contactid int (primary key, identi ...

How can the parent div adjust its height to match the tallest child div?

Currently working on a web project where I have a div named "page", housing two other divs - one on the left called "navigation" and the one on the right named "content". I am aiming to set the height of the "page" div to match the height of the tallest di ...

The Entity Framework One-to-One or Zero-to-Self Relationship

I've been grappling with this issue for days now, even though I feel like I've tackled it before. What I'm trying to achieve is quite simple - a user can have multiple relationships with other users nested within itself. public class Applic ...

The perplexity surrounding the functionality of th and tr tags is causing confusion in

Below is the code snippet I have in my HTML table. <table> <tbody> <thead> <tr> <th align="right" colspan="4"> <span class="font-style-bold">SCHEDULE OF RATES</span> ...

html / CSS Center image in div with primary image as background

I am encountering a unique issue that I haven't come across in my search so far. My objective is to create an HTML page where each background image div represents one page for clean printing. .thirdBackgroundPage { background-image: url("images/fir ...

The popup image on my main project is not functioning correctly, despite working perfectly in my test project

I am working on creating a pop-up image for my internship project. When the user clicks on an image, I want it to display in a larger size with a background and opacity. However, the code I have implemented so far is not functioning properly. Please ignore ...