IIS Express not serving static files to Firefox - firefox

I'm using Visual Studio 2013 with IIS Express 8 to develop an application for a local Intranet. This application was built using ASP.NET MVC 4 in Visual Studio 2012 and later migrated to 2013. I had been using Visual Studio Development Server until I migrated to VS2013 with no issues.
After the migration, the application compiles, runs and authenticates fine, but it's not serving Static Files - it just returns an HTTP 500 response with no further details. See image below:
This also happens to Images and CSS files.
What can I check to solve this? Any suggestions?
UPDATE:
The application works fine in Local IIS (version 8).
It works in IIS Express on other PCs.
UPDATE 2:
After further testing, I found out that this only happens to Mozilla Firefox (it works fine in Internet Explorer and Google Chrome) - I didn't notice before because I always use FF. Currently using version 29.
Any ideas?

Finally! I was able to solve this issue with the help of this question.
This was happening because Firefox by default has Windows Integrated Authentication turned off. It doesn't make any sense to me why it works fine in regular IIS or in dynamic files (controller actions, WebApi, etc.), but that's a mystery for another day.
To enable Windows Integrated Authentication I followed this steps:
Type about:config in Firefox's address bar (nav bar)
Search for network.automatic-ntlm-auth.trusted-uris
Double click on network.automatic-ntlm-auth.trusted-uris
Add http://localhost to the list (paste that if it's empty)
After that I just hit F5 in Firefox and everything worked as expected.
This issue is poorly documented, so I wonder if nobody else uses Firefox with MVC to develop web applications using Windows Integrated Authentication?

Have you had a look at this ?
ASP.NET MVC application gives Internal Server Error only when viewed in Firefox
It doesn't explain why it works on IIS but there is a firefox doesn't support Integration Authentication out of the box.

The only thing that seems applicable to your situation is a problem with the install of IIS Express since this is an similar issue to something seen in previous IIS Express versions. I would either re-install it or see if your version of Windows can host IIS 8 in which you would just enable static content.
If this was just a matter of not having static content turned on or permissions for static content, you'd get a 404 or 401 error respectively. Hope this helps...

I'd look in the machine events viewer under application and system to see what the issue is.
Does the IIS serve anything up in the same folder such as .txt files, .html, jpg images?
It could possible be file or folder permission and/or the anonymous user being used to access them under IIS.
My first point would be event viewer though for more detailed information on the 500 error.

Related

Visual Studio Browser Link not working in Firefox

I'm using Visual Studio 2015 and Browser Link doesn't work with Firefox.
IE and Chrome work perfectly with Browser Link.
Just got a new machine, but that didn't help either.
I tried the prerequisites mentioned in the browserlink dashboard (for static files, enable debugging) and I use IIS express, so .NET 4.0 is there.
Are there any more settings needed in Firefox?
In the network view, I just don't receive a response from the server, 0 bytes transferred.
Network trace:
Found it, the main website was running on 44300, browserlink seems to run on 44399 (although that port isn't visible in IIS express)
Browse to https://localhost:44399 gave me the Firefox "This Connection is Untrusted" screen, where I needed to trust("confirm security exception") the self signed IIS certificate (just like what I had done on the https://localhost:44300 site)
So it seems Firefox remembers trusted certificates per port number, not per DNS/IP/Name like IE and Chrome seem to do.
Now the browserlink is working and downloading the files.
I don't have IIS running locally, but ran into a similar problem running the app locally with Visual Studio 2019.
The suggestion by Erik fixed the problem for me as well. Browsing to https://localhost:44399/ and accepting the certificate worked in Firefox Developer.
Some more details from Microsoft regarding self-signed certificates:
https://learn.microsoft.com/en-us/iis/extensions/using-iis-express/handling-url-binding-failures-in-iis-express

How to Publish an Umbraco Intranet?

I have just completed an Umbraco intranet using WebMatrix. Now I want to publish it to our server so that everybody can see and use it. WebMatrix can only do Web Deploy or FTP, so I opened the project in Visual Studio 2013 to publish it there. I was able to publish it to my desktop, where I have attempted to get it running here before uploading to the server. So in IIS I 'Add a Website' and set up the project, using port 101. I tried it both on my desktop and then moved it to wwwroot and in both cases IE says 'This page can't be displayed'. I am using the CE database with Umbraco 7.2.4.
Help please. I've been at this for days now.... I've tried the umbraco forum and google and got nowhere. :(
Tony
If you have remote desktop access to your web server, you don't actually need to rely on web publishing. You can just build the website in release mode, and then copy all the folders from the web project onto the webserver.
On the web server you can manually set up an IIS website and set up host names etc. You shouldn't need to deploy it using visual studio, this way is much safer
In IIS, you should set up a new website, using port 80 on your HTTP binding.
From the sounds of the error, IIS is not looking at the right physical path.
You should use the Microsoft guide on How to set up your first IIS Web Site as a starting point.

Deploying Umbraco 7.1 to Azure

I created an Umbraco site with Visual Studio by creating an empty web project and installing the Umbraco 7.1 nuget package. During the set up portion, I created an Azure database. Next, I just created an azure website and deployed the code via Visual Studio publish.
Everything works fine on my local machine. The front end of the site seems to work fine on the azure website. However, I am not able to edit anything in back office. I can log in, but none of the button on the left hand side show up. See the attached screen shot.
This is my first experience with Umbraco so any help at all is appreciated.
Wow, I feel stupid. All I had to do was clear my cookies and everything started working. I guess it wrote a cookie that it didn't like when I ran it locally. I don't see how it could even try to access the cookie via the live site.
Anyway, it's working fine now...

Hosting/Publishing MVC3 on IIS6

So to be specific, I'm using a windows server 2003 (that means iis 6). I've already installed ASP.NET MVC 3 RTM and .NET 4.
I've tried a few guides already.I've tried Haacked's guide too, then navigated to the root.
eg.
localhost/MyWebApp which showed Directory Listing denied (permission related problem probably not relevant to my actual problem).
Visiting another view, localhost/MyWebApp/Home.mvc/Index, showed 404 error page.
Is there anything I'm missing? I don't have any visual studio installed on the server but should I have used the Web Platform Installer instead?
Is your app working correctly when you deploy it from visual studio to local IIS?
The "Home.mvc" looks a little odd - with the default routes that would imply a controller named "Home.mvcController", which is not valid.
The other obvious thing to check is that "MyWebApp" is set up as a web application using a .NET 4 app pool rather than just being a directory.

Visual Studio 2010 nasty caching Cassini? Must manually stop service

I've spent waaaay too much time trying to figure this out. I'm running Windows 7 and Visual Studio 2010 in a VMware Fusion virtual.
When I debug my website project, Cassini (aka ASP.NET Web Development Server) starts and the site shows in my default browser (IE). I stop the debugger, make some tweaks to my C# code, and start the debugger again. The website starts up in IE and the site displays, but its using the code base from when I initially debugged NOT including any tweaks in code between the initial debug/build and subsequent debugs/builds.
The only way I can get code changes to build and run in the browser properly is if I manually stop the ASP.Net Web Development Server from the tray and then run debug.
Has anyone encountered this? Not sure if its caused by VS2010 or the environment being a virtual on a Mac.
Manually stopping Cassini after every debug is really starting to suck.
Thanks.
Check if Visual Studio is set to recompile the projects when there are changes.
Check that Tools > Options > Projects and solutions > Build and run > On run, when projects are out of date is set to Always build.
Perhaps you will have a more pleasant experience with IIS 7.5 Express as a replacement for Cassini.
From that page:
IIS Express is a lightweight,
self-contained version of IIS
optimized for developers. IIS Express
makes it easy to use the most current
version of IIS to develop and test
websites. It has all the core
capabilities of IIS 7 as well as
additional features designed to ease
-- website development including:
-- It doesn't run as a service or
require administrator user rights to
perform most tasks.
-- IIS Express works well with ASP.NET and PHP applications.
-- Multiple users of IIS Express can work independently on the same
computer.
Here's an article to help you get started.
Figured this out. I had mapped my Visual Studio 2010 folders to a VMware Fusion share in order to make my .NET projects accessible from Mac world (for copying graphics files into the projects, etc.). Evidently there was some type of permission issue or something that did not result in any sort of alert that was causing the problem.
I remapped all VS folders (Project, Website, etc.) into the standard Documents folder of my user instance and everything began working as expected.
Thanks for the help.

Resources