Enable the use of CSS files for a Razor page on IIS

This.. is.. remarkably strange.

Just spent a good portion of maybe over an hour trying to wrap my head on this.

I have a project made with cshtml files. Using the Razor syntax.

The style is referenced the good old way



When I run it using IIS-Express, I have no problems whatsoever. It runs, renders and looks really nice.

THEN I deploy it on IIS (on Windows 8).


The problem was that it displays only the basic HTML, no script, no styling whatsoever.

So I try to open the CSS file on the browser, and nothing. Just nothing.


Make sure you check/enable Static Content.

This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s