Last post May 22, 2014 03:19 AM by Angie xu - MSFT
May 16, 2014 10:57 AM|dvnandover|LINK
I developed a MVC4-Bootstrap3 site and it is working correctly when launched from visual studio but when the site is hosted in production environment (IIS7.5/Windows 2008 R2) it failed with 'jQuery is undefined' error message (see complete error message
below). Am i missing something here? How did it work in visual studio to begin with?
I hope to get some pointers from the experts in this forum.
When view the source file in production here is the bottom portion and it seems to indicate that jquery is there:
Here is my BundleConfig:
public static void RegisterBundles(BundleCollection bundles)
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
"Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Fri, 16 May 2014 14:17:57 UTC
Message: Object doesn't support this property or method
Message: 'jQuery' is undefined
Message: Object expected
Thank you in advance. Great forum
May 18, 2014 11:13 PM|Angie xu - MSFT|LINK
Welcome to asp.net forum.
'jQuery' is undefined error in production site
For this issue, you could use the Developer Tools (F12) within your browser to check the Console to see if any errors are occurring.
At the same time there are some suggestions to deal with this error, please refer to the discussion below.
'JQuery' is undefined
If you still has any concern, please let me know.
May 20, 2014 09:56 AM|dvnandover|LINK
When view using the Developer Tools (F12) There were no errors occured in the Console.
As you can see from the Bundleconfig.cs file that Jquery was listed in first.
Observation: If I published the project in Debug mode to the server then it is working fine. The error occurred only when i published the project in release mode. So Is this IIS issue? or Is it the publish tool of visual studio?
I am not sure how to get around the problem. It is frustrating.
Any other suggesttions?
May 22, 2014 03:19 AM|Angie xu - MSFT|LINK
If I published the project in Debug mode to the server then it is working fine. The error occurred only when i published the project in release mode. So Is this IIS issue? or Is it the publish tool of visual studio?
Thanks for your feedback.
Debug and Release are different configurations for building project. Generally use the Debug mode for debugging project, and the Release mode for the final build for end users. The Debug mode does not optimize the binary it produces (as optimizations can
greatly complicate debugging), and generates additional data to aid debugging. The Release mode enables optimizations and generates less (or no) extra debug data.
For this issue, we need look into it further.