Visual Studio 2015 IIS Express not loading assets such as CSS, JS, Images

0

I have a project, I build it in VS2015 and hit ctrl+F5 to start without debugging and launch the site in browser.

However non of my css, js, images are loading in chrome and edge?

In browser console I see:

GET http://localhost:2195/Content/app.css net::ERR_ABORTED 404 (Not Found)

In my layout file have the above defined as follows:

<link href="@Url.Content("~/Content/app.css")" rel="stylesheet" type="text/css" /> 

Below is what I have in the properties box of the development server:

Development Server

Always start when debugging: True
Anonymous Authentication: Disabled
Managed Pipline Mode: Integrated
SSL Enabaked: False
URL: http://loaclahost:2195/
Windows Authetication: Enabled

Any ideas as issue is only in browsers where i'm asked to enter my windows credentials?

When I enter the http://localhost:2195/Content/app.css directly in browser i get 404 error:

Module     IIS Web Core
Notification   MapRequestHandler
Handler    StaticFile
Error Code     0x80070002
Requested URL  http://localhost:2195/content/app.css
Logon Method   Negotiate

Why is the logon method showing as negotiate even though I've setup authentication to windows both in web.config and in the dev server?

* Update *

Installed jexus manager and added connection to site. Under actions > manage website, when i click start I get the following error see attached pic.

error

When I click on browse website I get dialogue saying this website is not running do you want to start it now. When I click yes I get the same error above and when I clikc ok on the error above I'm redirected to the site in browser and I'm able to navigate the site on localhost.

This is the report generated not much info that i haven't already provided before:

 Scan the folder U:\Visual Studio 2015\Projects\MyProject\MyProject for project files.
 1 project(s) are detected.
 * MyProject.csproj


 Project file: U:\Visual Studio 2015\Projects\MyProject\MyProject\MyProject.csproj.
 IIS Express configuration file: U:\Visual Studio 2015\Projects\MyProject\.vs\config\applicationHost.config.
 Analyze ASP.NET project.
 Extract web project settings.
 UseIIS: True
 AutoAssignPort: True
 DevelopmentServerPort: 2195
 DevelopmentServerVPath: /
 IISUrl: http://localhost:2195/

 NTLMAuthentication: False
 UseCustomServer: False
 CustomServerUrl: 

 SaveServerSettingsInUserFile: False
 UseIISExpress: true
 IISExpressSSLPort: 
 IISExpressAnonymousAuthentication: disabled
 IISExpressWindowsAuthentication: enabled
 IISExpressUseClassicPipelineMode: false
 UseGlobalApplicationHostFile: 
 Scan all bindings.
 IIS Express is used for this project.
 Binding localhost on *:2195 (http).
 A matching binding is found for http://localhost:2195/.
visual-studio
visual-studio-2015
localhost
iis-express
asked on Stack Overflow Dec 3, 2019 by adam78 • edited Jan 9, 2020 by Vadim Kotov

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0