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 653409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:22:44+00:00 2026-05-13T22:22:44+00:00

I am looking to generate some CSS files dynamically in my Content folder. At

  • 0

I am looking to generate some CSS files dynamically in my Content folder.

At the moment, this folder has an ignore route (routes.IgnoreRoute("Content/{*wildcard}");) and, I’d like that to remain, as I don’t need/want most of my content folders to go into the MVC request lifecycle.

Example:

 routes.MapRoute(
  "DynamicCSS",
  "Content/Css/Dynamic/{guid}.css",
  new { controller = "Site", action = "GenerateCSS" },
  new { guid = @"^([0-9a-fA-F]){8}([0-9a-fA-F]){4}([0-9a-fA-F]){4}([0-9a-fA-F]){4}([0-9a-fA-F]){12}$" }
);

//If the file has already been generated, IIS should just return the file, saving a request in MVC.
routes.RouteExistingFiles = true; //was formerly false

//Ignore routes
routes.IgnoreRoute("Content/{*wildcard}");

I have a couple questions/concerns about this setup:

  • Will this work? Routes in ASP.NET MVC are lazy, but I don’t know if the ignore routes are checked first. There’s no documentation (I’ve Googled!) on this form of usage.
  • Are there any security implications to consider when switching on RouteExistingFiles? I don’t want IIS to pick up any of my Model/Views folders by directly referencing them.

Many thanks for any suggestions.

Edit:

After further research, I have found an article on my first issue.

  • 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-05-13T22:22:45+00:00Added an answer on May 13, 2026 at 10:22 pm

    Scott Hanselman got a blog post “Plug-In Hybrids: ASP.NET WebForms and ASP.MVC and ASP.NET Dynamic Data Side By Side” in which he talked about his too. http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx

    Hope this helps,

    Ray.

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

Sidebar

Related Questions

I'm looking for a way to generate pdf files from html In order to
I'm looking to generate a single HTML file from the content of multiple HTML
Back in the old days, Help was not trivial but possible: generate some funky
So I'm using jQuery's AJAX function to read some XML for me and it's
I'm looking for a HTML editor that kinda supports templated editing or live snippets
We're not doing real web development. We get our HTMLs from our designers, and
I would like to design a web app that allows me to sort, browse,
Below is one item in my page, which consists of the div containing two
I am a current web2py user, but find I still go back to Django

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.