When Using Iis Express No CSS Applied on a Remote Pc

When using iis express no css applied on a remote pc

The problem was connected with netsh and binding configuration in ISS Express. At first I setup it through my ip, and it resulted in confusing errors.

While searching for anything in the web I ran across Setting up IIS Express. All the same there, but it's suggested using pc name in netsh and iis applicationhost.config.

So, I added

netsh http add urlacl url=http://MyPCName:MyPort/ user=everyone

and

<binding protocol="http" bindingInformation="*:MyPort:MyPCName" />

and a miracle!! It worked.

As for the IE, I had to turn off the "Use Windows authorization" flag to make it work. Many thanks to Internet Explorer - Enable Integrated Windows Authentication. But nevertheless IE still asks for login and password, if an ip is used in url. If pc name is used it works silently.

Firefox either asks for login and password (and works if one enters valid credentials) or you should apply How To: Firefox and Integrated Windows Authentication (mentioned in my question) and then it works silently both with ip and pc name.

Hope this helps someone else.

EDIT

One remark: I had to launch VS2010 with administrtor permissions. If not, I still get HTTP 500 error based on the bad impersonation error. So, it looks like IIS Express, launched by VS2010 without administrator permissions under Windows 7, won't be able to work correctly.

As far as I understood, the clue is to give the appropriate permissions to IIS_IUSRS. But until that it's easier to launch VS 2010 with administrator privilages.

CSS, Images, JS not loading in IIS

It was windows permission issue i move the folder thats it inherit wrong permissions. When i move to wwwroot folder and add permission to iis user it start working fine.

Using IIS Server instead of IIS Express in Visual Studio 2015

The problem with loading the CSS and Images is likely because of the paths you have used, not with the web host.

"/Images/Image1.jpeg" always looks for an Image subfolder with an Image1.jpg in the same place as the current page.

"~/Images/Image1.jpeg" will look for an Images folder with an Image1.jpg starting from the site root. Using the tilde (~) is going to address other things as well (user controls, pages in folders, etc.

The same holds true for stylesheet hrefs. If you want to diagnose this kind of "resource failing to load" problem, you can use the developer tools (IE, Chrome, FireFox/FireBug, Safari all have them) and start a capture on the network tab. That will list a request to each resource (image, css, js, etc) and what the request path and HTTP status (404 - not found, 200 - OK, etc) is.

EDIT: Aside from the above which is directed to help you find the source problem of not loading CSS and Images, you will have to do a few things.

  • Create an application in your local IIS's Default Web Site that points to your project's root.
  • Make sure the Build and Start Options tabs are set correctly in the website project properties. Be sure to set the "Use custom web server" value with the URL you created in local IIS.

At that point you should be able to Start Debugging, but you should really consider conversion to a Web Application if you want a less fragile program and an easier development experience.

Key differences between WS/WAP - https://msdn.microsoft.com/en-us/library/dd547590(v=vs.110).aspx

Converting from WS to WAP - https://msdn.microsoft.com/en-us/library/aa983476(v=vs.100).aspx

Why is IIS 10 Server Display Localhost After Office 365 User Authentication

I Have Figure out the resolutions.

I was trying to deploy a Web Application such as ASP.net MVC Web Application to the IIS 10 server which was not possible; Rather than create a ASP.NET Web Pages (Razor) Site and deploy it to IIS server then worked just fine.

There was no need of changing my settings on IIS. Just As the website is publish successfully, I just Import the website to IIS server then boom, all works well.

I was Inspired but this link: Website Deploy in IIS

I hope this will help someone too some day.

Thank you everyone for your Help.



Related Topics



Leave a reply



Submit