Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to publish my website to deployment server.Which includes changes to global.asax file's application_start.which registers a bundle to load/compress js/css files.it works fine with local solution and IIS 7 version on server.

But when I deploy same application to server with IIS 6 bundled resources are not loaded after login to the page.I suspect problem with global.asax as this file makes a call to the bundle class to register bundled resources.

When I look at the global.asax file.Global.asax file is present in both root directory of publised folder and global.dll files are present in bin folder.

I dont understand the reason that why it is not updating the global.asax file in server(IIS 6).

Due to this issue i am not able to deploy it to server.I have been trying to resolve this problem.but left with failure.


Any Configuration in IIS 6 is required to solve this issue with global.asax or bundling and minification on IIS 6.?

Thanks,
Syed
Posted
Updated 10-Feb-15 0:54am
v3
Comments
Kornfeld Eliyahu Peter 9-Feb-15 2:49am    
Bundling and minification are not features of IIS but of the .NET framework...
[no name] 9-Feb-15 2:59am    
Then what is the problem with bundling in IIS 6 when it works fine in IIS 7.do you have any idea.
Kornfeld Eliyahu Peter 10-Feb-15 6:56am    
.NET version?
What happening? Do you have errors?
[no name] 10-Feb-15 7:01am    
.net version 4.0.if seed in browser console.it is not finding bundled resources.
thats it is showing the error as "$ is undefined".

It works fine with IIS 7
Kornfeld Eliyahu Peter 10-Feb-15 7:40am    
'$ is undefined' is a JavaScript error and means that jQuery didn't loaded as expected...Can you see the exact line on which the error is...
(and if you want me to see your response you should reply to my comment and not adding comment to your own question)

1 solution

It sounds like ASP.NET isn't being called for requests to your bundle URL.

According to this MSDN blog post[^], extensionless URLs should work in IIS6, given the following conditions:
  • The registry value HKLM\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\EnableExtensionlessUrls is not defined, or is set to "1";
  • v4.0 aspnet_filter.dll is registered as an ISAPI filter;
  • v4.0 aspnet_isapi.dll is script mapped to ".axd" at the web site level;
  • v4.0 aspnet_isapi.dll is marked as "Allowed" in the ISAPI Restriction list;
  • The web site has read and script permission enabled;

More details on Phil Haacked's blog[^].

If it doesn't work, you'll probably need to add a wildcard application mapping[^] for ASP.NET to your site. This will route every request through the ASP.NET pipeline, which can lead to performance problems. It can also lead to unexpected behaviour, since static files will now be subject to the ASP.NET access rules.

Another option would be to add an extension to your bundle URL which is already mapped to ASP.NET - .axd would be a good choice.
 
Share this answer
 
Comments
[no name] 11-Feb-15 2:29am    
I am calling bundle file as ~/styles/Blankmaster.css for css bundle and ~/Scripts/BlankMaster.js
Richard Deeming 11-Feb-15 7:33am    
So the extensionless URL handling doesn't apply.

Since you're using extensions which aren't registered to be handled by ASP.NET, IIS6 will be looking for a static file in the specified path. The file doesn't exist, so IIS is returning a 404 error.

You'll either need to add a wildcard application mapping; map the .css and .js extensions to ASP.NET; or change the extensions to .axd (or any other extension already registered to ASP.NET).
[no name] 11-Feb-15 8:58am    
can u please provide some steps to add a new extension types to iis 6 server.
[no name] 12-Feb-15 0:07am    
Thanks Richard.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900