Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8449297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:39:47+00:00 2026-06-10T10:39:47+00:00

I have bin deployed an MVC4 application to my hosting provider, based on advice

  • 0

I have bin deployed an MVC4 application to my hosting provider, based on advice given here and one or two on-the-fly fixes, but the most immediately apparent problem is that the bundling for css doesn’t work. When I replace the bundle ref with explicit file refs, my css works again.

I am using a standard MVC4 RTM project template from VS2012. The provider is running IIS 7.5 and ASP.NET 4, and my previous MVC3 version of the same app worked fine. I am guessing I have grabbed a dependency somewhere of too low a version, and this might also contribute to my area based action link problem.

Technical symptoms are:

The line @Styles.Render("~/Content/css") renders as <link href="/Content/css?v=" rel="stylesheet"/>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:39:48+00:00Added an answer on June 10, 2026 at 10:39 am

    The CSS and Script bundling should work regardless if .NET is running 4.0 or 4.5. I am running .NET 4.0 and it works fine for me. However in order to get the minification and bundling behavior to work your web.config must be set to not be running in debug mode.

    <compilation debug="false" targetFramework="4.0">
    

    Take this bundle for jQuery UI example in the _Layout.cshtml file.

    @Styles.Render("~/Content/themes/base/css")
    

    If I run with debug="true" I get the following HTML.

    <link href="/Content/themes/base/jquery.ui.core.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.resizable.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.selectable.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.accordion.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.autocomplete.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.button.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.dialog.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.slider.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.tabs.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.datepicker.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.progressbar.css" rel="stylesheet"/>
    <link href="/Content/themes/base/jquery.ui.theme.css" rel="stylesheet"/>
    

    But if I run with debug="false". I’ll get this instead.

    <link href="/Content/themes/base/css?v=myqT7npwmF2ABsuSaHqt8SCvK8UFWpRv7T4M8r3kiK01" rel="stylesheet"/>
    

    This is a feature so you can easily debug problems with your Script and CSS files. I’m using the MVC4 RTM.

    If you think it might be an MVC dependency problem, I’d recommend going into Nuget and removing all of your MVC related packages, and then search for the Microsoft.AspNet.Mvc package and install it. I’m using the most recent version and it’s coming up as v.4.0.20710.0. That should grab all the dependencies you need.

    Also if you used to be using MVC3 and are now trying to use MVC4 you’ll want to go into your web.config(s) and update their references to point to the 4.0 version of MVC. If you’re not sure, you can always create a fresh MVC4 app and copy the web.config from there. Don’t forget the web.config in your Views/Areas folders if you do.

    UPDATE: I’ve found that what you need to have is the Nuget package Microsoft.AspNet.Web.Optimization installed in your project. It’s included by default in an MVC4 RTM app regardless if you specify the target framework as 4.5 or 4.0. This is the namespace that the bundling classes are included in, and doesn’t appear to be dependent on the framework. I’ve deployed to a server that does not have 4.5 installed and it still works as expected for me. Just make sure the DLL gets deployed with the rest of your app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just deployed a new MVC3 app to my hosting provider for the
I have BIN deployed my MVC 3 application to my local IIS7 server. It
I have an VSTO (outlook-addin) application that uses Unity. It is deployed to a
I have a web part and the dll is deployed to the bin of
I have a problem with site deployed on IIS6 sever. Here the problem, when
I have an application that I've developed. Currently it is deployed with all its
I use a shared hosting provider that doesn't have asp.net mvc3 installed. When deploying
I'm thinking how to arrange a deployed python application which will have a Executable
I have a solution that is deployed using ClickOnce. It consists of an application,
We have a web application that's deployed to many websites with only frontend changes,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.