Home After switching Visual Studio to use local IIS server, image and style files not found
Reply: 0

After switching Visual Studio to use local IIS server, image and style files not found

user5374
1#
user5374 Published in September 19, 2018, 6:44 pm

I changed my website properties in Visual Studio 2010 to "Use local IIS Web Server" instead of the Visual Studio Development Server, and clicked "Create Virtual Directory".

Now my images and styles are not found when I view the website in localhost. The paths in the website are relative. The 404 message says the physical path is "C:\inetpub\wwwroot", which is not the application root. If I copy my image and style folders into "C:\inetpub\wwwroot" then the images appear.

Have I missed some configuration setting to ensure static files come from the application rather than the wwwroot?

share|improve this question
  • show how you include image and css files in your View. The proper way is to use Url.Content(...). – Igor Feb 22 '13 at 15:50

2 Answers 2

active oldest votes
up vote 3 down vote accepted
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.335266 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO