Evening. Having a really frustrating problem that has stopped me working all day, but no amoutn of searching on the interwebz has come up with anything close.
VS2012 Professional V 11.0.50727.1 RTMREL, .NET framework 4.5.50709, logged in as me, an administrator on the machine
Take a fresh new basic MVC4 app, Razor engine. Add a controller called Home with very simple index view, using master layout that is provided.
Run with Debug said site. fine - produces page as you would expect.
Now add Identity and Access service with Local Development STS
Debug again - 401.2 error. Access is denied.
OK. So that is one annoying problem - any thoughts anyone?
Can solve that by removing <authenticaton mode=None> but why is that?
Leaving the authentication ="None" bit in, I switch to IISExpress for debugging.
Now the authentication bit is fine, but the bundles for jquery (both css and js) and modernizr fail to load - as modernizr is at the top of the page, it stops the page loading - this is how I noticed.
If I fire up a new browser session in another browser, then I can access teh scripts/css fine via the same url. Just not through the app that has the LocalSTS auth and IISExpress. Is it possible that this is interfering?
Actually, ASP.NET Development Server does not use <system.webServer<modules> section. I think the WIF needs to be update to also include these lines. Try to add this alsoe,
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
Marked as answer by imran_ku07 on Dec 05, 2012 03:47 AM
Trying to nail reproducablility for this and it seems to be a bit random.
Where I have got to is that I'm not sure its the Identity and Access thing that is the problem.
What I've noticed that it seems to be the case the it will only render the first bundle type - e.g SCriptBundle first declared, means taht ScriptBundle requests are served. StyleBundle first seems to mean that StyleBundles are served. Never both types.
the other requests just hang.
My only solution after all this time wasted is to manually reference the files I think.
mrmoosehead
0 Points
14 Posts
Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 27, 2012 08:22 PM|LINK
Evening. Having a really frustrating problem that has stopped me working all day, but no amoutn of searching on the interwebz has come up with anything close.
VS2012 Professional V 11.0.50727.1 RTMREL, .NET framework 4.5.50709, logged in as me, an administrator on the machine
Take a fresh new basic MVC4 app, Razor engine. Add a controller called Home with very simple index view, using master layout that is provided.
Run with Debug said site. fine - produces page as you would expect.
Now add Identity and Access service with Local Development STS
Debug again - 401.2 error. Access is denied.
OK. So that is one annoying problem - any thoughts anyone?
Can solve that by removing <authenticaton mode=None> but why is that?
Leaving the authentication ="None" bit in, I switch to IISExpress for debugging.
Now the authentication bit is fine, but the bundles for jquery (both css and js) and modernizr fail to load - as modernizr is at the top of the page, it stops the page loading - this is how I noticed.
If I fire up a new browser session in another browser, then I can access teh scripts/css fine via the same url. Just not through the app that has the LocalSTS auth and IISExpress. Is it possible that this is interfering?
Long day. time for wine now I think.
mrmoosehead
0 Points
14 Posts
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 28, 2012 09:52 AM|LINK
No-one got any thoughts? :(
ignatandrei
All-Star
134491 Points
21566 Posts
Moderator
MVP
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 28, 2012 11:02 AM|LINK
What's this?
mrmoosehead
0 Points
14 Posts
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 28, 2012 11:04 AM|LINK
VS2012 addin http://visualstudiogallery.msdn.microsoft.com/e21bf653-dfe1-4d81-b3d3-795cb104066e
Seems like other people are having trouble with it.
ignatandrei
All-Star
134491 Points
21566 Posts
Moderator
MVP
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 28, 2012 11:37 AM|LINK
Then ask there - it has an Q&A tab...
mrmoosehead
0 Points
14 Posts
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 28, 2012 11:45 AM|LINK
I asked here as I don't think there is much traffic to that page and was hoping someone on here may have had some experience with it.
Seems like it's all a bit too new.
ignatandrei
All-Star
134491 Points
21566 Posts
Moderator
MVP
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 28, 2012 12:45 PM|LINK
Please ask there first.
imran_ku07
All-Star
45785 Points
7698 Posts
MVP
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 28, 2012 05:52 PM|LINK
Add these lines,
<system.web> <httpModules> <remove name="FormsAuthentication" /> <add name="WSFederationAuthenticationModule" type="System.IdentityModel.Services.WSFederationAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <add name="SessionAuthenticationModule" type="System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </httpModules>Actually, ASP.NET Development Server does not use <system.webServer<modules> section. I think the WIF needs to be update to also include these lines. Try to add this alsoe,
<location path="bundles"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location> <location path="Content"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location>Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
mrmoosehead
0 Points
14 Posts
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 29, 2012 10:42 AM|LINK
Thanks, tried that. No joy.
Trying to nail reproducablility for this and it seems to be a bit random.
Where I have got to is that I'm not sure its the Identity and Access thing that is the problem.
What I've noticed that it seems to be the case the it will only render the first bundle type - e.g SCriptBundle first declared, means taht ScriptBundle requests are served. StyleBundle first seems to mean that StyleBundles are served. Never both types.
the other requests just hang.
My only solution after all this time wasted is to manually reference the files I think.
CruzerB
Contributor
5399 Points
1098 Posts
Re: Bundled Scripts / Css trouble with Identity and Access with Local STS / IISExpress
Nov 29, 2012 10:47 AM|LINK
Hi,
Mind to run your Visual Studio as Administrator?
My Technical Blog