I'm trying to get an asp.net 4.5 web site working on a new server (windows 2008 server with 4.5 installed) and when i run the site, everything works fine, except the javascript is not working, when I view details in the browser it appears that two items
are not found - 404 error.
I am new to 4.5 so I don't know how the bundling stuff works and if there is anything you have to set in IIS to make it work. I just know that locally, it works, and also if I publish it to a test web site on windows azure. It seems something
is missing with my server.
actually encountered the solution to the problem by trying to solve "my IIS7.0 doesnt run Session_OnStart() from global.asax". In short, in order to resolve the problem I had to re-add the Session module. Out of the box, there is a Session module registered
as a managed one and with type "System.Web.SessionState.SessionStateModule". I then thought: Don't all these types require the assembly name, and don't all MS-published assemblies get a strong name + GAC and the whole thing, meaning I should see also public
token and such? Well, in order to test this I added the following to my web.config as children of configuration/system.webServer/modules:
After the modification I re-published and voilá!, Session_OnStart() started to work.
But anyway, back to the main problem of bunding: imran_ku07 said "make sure the module is there". He also had me list all modules with some code, which I did, and I thought it demonstrated the module was there. Well, apparently that dynamic module is like points in "Who's line is it anyway" (Google it up if you're not as old as me). Long story short I also added the following as child of configuration/system.webServer/modules:
The funny thing here is: That works! That made my bundling work for the first time in IIS7 + Windows Server 2008. And I don't know why because that type of incomplete type description is what seems to have caused my Session problem in the first place!
So I guess I don't have a 100% clear answer, I can just say that the above lines in web.config solve those issues. Hopefully that's good enough for most.
sam.psys
Member
6 Points
11 Posts
Asp.net 4.5 msajaxjs and webformjs not found, browser looking for bundles
Feb 26, 2013 02:48 AM|LINK
Hello,
I'm trying to get an asp.net 4.5 web site working on a new server (windows 2008 server with 4.5 installed) and when i run the site, everything works fine, except the javascript is not working, when I view details in the browser it appears that two items are not found - 404 error.
/bundles/MsAjaxJs?v=J4joXQqg80Lks57qbGfUAfRLic3bXKGafmR6wE4CFtc1
/bundles/WebFormsJs?v=q9E9g87bUDaS624mcBuZsBaM8xn2E5zd-f4FCdIk2cA1
I am new to 4.5 so I don't know how the bundling stuff works and if there is anything you have to set in IIS to make it work. I just know that locally, it works, and also if I publish it to a test web site on windows azure. It seems something is missing with my server.
Please help.
sam.psys
Member
6 Points
11 Posts
Re: Asp.net 4.5 msajaxjs and webformjs not found, browser looking for bundles
Feb 26, 2013 09:11 PM|LINK
sam.psys
Member
6 Points
11 Posts
Re: Asp.net 4.5 msajaxjs and webformjs not found, browser looking for bundles
Feb 26, 2013 10:46 PM|LINK
This worked for me -
http://forums.asp.net/post/5279687.aspx
But can someone explain to me what is going on?
Ilikeit
Member
294 Points
76 Posts
Re: Asp.net 4.5 msajaxjs and webformjs not found, browser looking for bundles
Mar 04, 2013 06:42 AM|LINK
Hi,
@webJose has explained very clear in:
actually encountered the solution to the problem by trying to solve "my IIS7.0 doesnt run Session_OnStart() from global.asax". In short, in order to resolve the problem I had to re-add the Session module. Out of the box, there is a Session module registered as a managed one and with type "System.Web.SessionState.SessionStateModule". I then thought: Don't all these types require the assembly name, and don't all MS-published assemblies get a strong name + GAC and the whole thing, meaning I should see also public token and such? Well, in order to test this I added the following to my web.config as children of configuration/system.webServer/modules:
<remove name="Session" /> <add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />After the modification I re-published and voilá!, Session_OnStart() started to work.
But anyway, back to the main problem of bunding: imran_ku07 said "make sure the module is there". He also had me list all modules with some code, which I did, and I thought it demonstrated the module was there. Well, apparently that dynamic module is like points in "Who's line is it anyway" (Google it up if you're not as old as me). Long story short I also added the following as child of configuration/system.webServer/modules:
The funny thing here is: That works! That made my bundling work for the first time in IIS7 + Windows Server 2008. And I don't know why because that type of incomplete type description is what seems to have caused my Session problem in the first place! So I guess I don't have a 100% clear answer, I can just say that the above lines in web.config solve those issues. Hopefully that's good enough for most.
sam.psys
Member
6 Points
11 Posts
Re: Asp.net 4.5 msajaxjs and webformjs not found, browser looking for bundles
Mar 04, 2013 05:16 PM|LINK
Explains what solved the issue, not really why.