0

I have been testing my MVC 4 application using Visual Studio Development Server. Now i have deployed it to IIS 8, the application works but client styling no longer works and the images are also not loaded.

I have been searching all day and not have been able to fix the issue.

3 Answers 3

2

Ha! This is a fun one I had before ;-)

On your system you need to enable delivery of static content for internet information server. Go to control panel, add remove windows features and check STATIC CONTENT under the web services tree.

Et voila, static content (images and css) being delivered to your browser.

Sign up to request clarification or add additional context in comments.

Comments

1

View the source of the page and see if the paths match up to the locations specified. If not - then that is your problem.

How did you deploy it to IIS 8? you show no code on how you are referencing the images/styling in addition to what your deployment directory is.

Comments

0

I would recommend using the publish feature in VS, as this will include all files and images. if you can publish directly to the web server the easier it will be, if not publish to a folder (locally) and then copy up to the server.

As Ahmed said check your paths and make sure you code is not pointing to c:\your project\your app\content\images but ../content/images for example.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.