Windows 8 + Visual Studio 2012 = jQuery issue?

Topics: General
Feb 25, 2013 at 9:05 PM
I've downloaded Orchard 1.6 and I opened it with Visual Studio 2012 on my Windows 8 Pro machine.
My VS settings specify to use my local Windows 8 IIS (version 6.2).
When I run it by pressing F5, the website shows up but the layout is very basic.

Trying to logon it works, but the VS debugger breaks with the error:
_0x800a1391 - JavaScript runtime error: 'jQuery' is undefined
Also the debug window is loaded with errors like this one:
_Exception was thrown at line 101, column 217 in
0x800a139e - JavaScript runtime error: SyntaxError

It looks very much like described in this thread:

However if I run the site with the built-in VS Development server, it just looks fine. So it must have something to do with the Windows 8 Pro IIS, but what could it be?
Feb 25, 2013 at 10:26 PM
How are you setting it up so that VS debugging is hooked up to the client side? Maybe you can just disable that and use the browser developer console (F12 brings up the dev console on most browsers) to debug js instead?
Feb 26, 2013 at 6:55 AM
I just specify 'Use local IIS server' in the project properties and press F5.

By the way, I don't need to debug js files, I just want to use my local IIS server to run Orchard when I press F5.
Feb 26, 2013 at 7:16 AM
Maybe a missing module in your IIS?
Feb 26, 2013 at 7:43 AM
I don't know, it is a standard out-of-the-box enabled IIS.
What modules are necessary for Orchard that are not default?

My homepage looks like this at the moment:

The log is empty, but when I log on the output window of Visual Studio shows this:

A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\somesite\963c2e45\afb38565\App_Web_wkl4yzrz.dll', Symbols loaded.
'w3wp.exe' (Managed (v4.0.30319)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml.Hosting\v4.0_4.0.0.0__31bf3856ad364e35\System.Xaml.Hosting.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Unhandled exception at line 159, column 6 in http://localhost/somesite/Admin
0x800a1391 - JavaScript runtime error: 'jQuery' is undefined
Feb 26, 2013 at 7:52 AM
In my experience there is no such thing as a standard IIS: there are many checkboxes in that windows features dialog, and it's easy to miss a crucial module such as static contents. I also have no idea why you'd see a javascript error in your server logs. Also note that there is nothing about Orchard in that output window. You may have better advice from the folks at
Feb 26, 2013 at 8:00 AM
I agree, I don't think this is a Orchard issue but I was hoping someone experienced this before.
Feb 26, 2013 at 9:48 AM
Edited Feb 26, 2013 at 9:49 AM
I found out that IIS is throwing a 500.21 on some of the files. like the CSS files

I still don't know what is causing it, but maybe someone recognizes it. It must be something IIS 8 is having trouble with.

2013-02-26 10:07:36 ::1 GET /somesite/Themes/TheThemeMachine/Styles/Site.css - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+10.0;+Windows+NT+6.2;+WOW64;+Trident/6.0) http://localhost/somesite/ 500 21 13 0
Feb 26, 2013 at 2:10 PM
I found out!

It was indeed a missing module in IIS.
The 'Common HTTP Feature', like it is mentioned in the enable Windows 8 features, to server 'Static Content' was not enabled.
Pretty obvious after all, but the error could be a bit more descriptive if you ask me.
Feb 26, 2013 at 4:05 PM
Edited Feb 26, 2013 at 4:05 PM
The problem is that if the IIS module is missing this becomes a config error, that happens before we have a chance to even execute a line of code. If the error could be made clearer, that would be a request for IIS. What is the text of the error currently? I thought it was something like "Handler "foo" has a bad module "bar" in its module list", which sounds fairly accurate.
Feb 26, 2013 at 9:46 PM
I wasn't as clear as I hoped to be, there is no blame in the direction of the Orchard team.

The 500.21 error wasn't clear to me and although the description probably was technically accurate, it wasn't of much help to me. I couldn't find a list of possible solutions besides running aspnet_regiis, but that is not that easy on a Windows 8 machine anymore....

I'm happy I can move on again.