SF 5.0 IIS6 Issues
I just upgraded a 4.4 site to 5.0. Once I got it running on my local Windows 7 machine, I uploaded it to our dev server which is running on II6. Initially everything was good except that all of my static files were not being shown. I was getting the following error after loading an individual static file:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
|
<
configuration
>
<
system.web
>
<
httpModules
>
<!-- All other module declarations that are in the web.config file //-->
<
add
name
=
"IIS6ClaimsFix"
type
=
"SitefinityWebApp.Code.HttpModules.IIS6SessionAuthenticationModule, SitefinityWebApp"
/>
</
httpModules
>
</
system.web
>
</
configuration
>
Hello Richard,
Thank you for sharing your knowledge with the community! This is indeed useful information which will help people to resolve similar issues.
All the best,
Victor Velev
the Telerik team
Hi there. I've been struggling with this issue as well. The biggest impact it has had on me has been the inability to get some js and css files to load. I ended up adding a HTTP handler for both of these types to point them to the static file handler and was able to get them to load.
<add verb="*" path="*.css" type="System.Web.StaticFileHandler">
I hope this helps others.
E.J.
I'm having this issue as well. I see it on .js files and .css files. I'm also getting "failed to execute URL" when I try to access the backend (http://mysite/sitefinity)
Julie,
I ran into the exact same issue with the back end site as well. I was able to get in with http://www.mysite.com/sitefinity/ Note the trailing slash.
That being said, earlier today I remigrated my site from 3.7 to 5.0 directly, and skipped 4.4. I then added in the two lines for .css and .js and the problem with the backend site went away.
I would also think that you could try getting rid of the wildcard application map. I took it out for a while, had no issues, but there could be something else in there that needs it.
I also have a ticket open with Telerik about this. I'll post any updates.
Good luck.
E.J.
Ok, that has to be one of the silliest errors I've seen yet. Thank you, however, for the workaround. Telerik, if you're listening, anything to add? 1) Have you identified this as a "bug" and 2) any thoughts on when we might see a fix. Oh, and 3) are there any other related problems the three of us just haven't noticed yet that we should be on the lookout for?
Thank you for this fix. I had this problem orginally with favicon.ico, but then it really bit me with a javascript file.
Edmund,
I am also facing problems related to static file contents. The solution edmund provided is working but it just takes your worries related to contents only, your pages contents will be loaded perfectly, but [Failed to Execute URL] exception is still there if user is not logged in.
Hi,
This bug is biting us hard. I was hoping 5.0 SP1 would fix it, but it doesn't. Our layout images no longer work. Looks like we're gonna have to stay on 4.3...
Fixed my site by adding this to my web.config:
<
add
verb
=
"*"
path
=
"*.css,*.js,*.jpg,*.jpeg,*.gif,*.png"
type
=
"System.Web.StaticFileHandler"
/>
Thanks Richard, your solution fixed the issue for me.
+1 for Richard. Fixed me up too.
This issue is still there in 5.1.3210 ?
This will work
<
add
verb
=
"*"
path
=
"*.css,*.js,*.jpg,*.jpeg,*.gif,*.png"
type
=
"System.Web.StaticFileHandler"
/>
Had the exact same issue and this fixed it without an HTTPModule
<
add
verb
=
"*"
path
=
"*.css,*.js,*.jpg,*.jpeg,*.gif,*.png"
type
=
"System.Web.StaticFileHandler"
/>
Hi guys.
I had this same issue, and indeed adding the line
<
add
verb
=
"*"
path
=
"*.css,*.js,*.jpg,*.jpeg,*.gif,*.png"
type
=
"System.Web.StaticFileHandler"
/>
to my web.config cleared the problem.
I however am not that experimented in playing around in my Web.config file, and was wondering what that line did exactly. Can this be a "security hole" of some kind?
I don't ask for a complete, detailed explanation, but just the rough lines to make sure I don't shoot myself in the foot doing this.
Of course, if Telerik could fix this at the source, it would help a lot!
Thanks,
Olivier
You are basically telling IIS to process any file with the extensions, mentioned in the path property, with the System.Web.StaticFileHandler. This handler just process the files as static files rather than having Sitefinity process them.
Thanks Richard for the fast reply - this is great news :)
...abd it brings a new question.
Since the specified files are now processed as static files, can I assume this will/may also speed things a bit?
Sorry but I was off just a bit. It is not to prevent Sitefinity from handling the request, but to bypass the ASP.NET Claims Authentication in regards to IIS6.
OK Thanks for the additional info.
With this last piece of info I understand better what it does.
Cheers,
Olivier
Richard, your awesome!
I had to add a few things to my web.config on one of my sites to get Richard's solution to work because of an object reference not found error. Try adding some
<
configSections
>
<
section
requirePermission
=
"false"
name
=
"microsoft.identityModel"
type
=
"Microsoft.IdentityModel.Configuration.MicrosoftIdentityModelSection, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
</
configSections
>
<
httpModules
>
<
add
name
=
"ClaimsPrincipalHttpModule"
type
=
"Microsoft.IdentityModel.Web.ClaimsPrincipalHttpModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
<
add
name
=
"IIS6ClaimsFix"
type
=
"SitefinityWebApp.Code.HttpModules.IIS6SessionAuthenticationModule, SitefinityWebApp"
/>
</
httpModules
>
<
modules
runAllManagedModulesForAllRequests
=
"true"
>
<
add
name
=
"ScriptModule"
preCondition
=
"managedHandler"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
<
add
name
=
"Sitefinity"
type
=
"Telerik.Sitefinity.Web.SitefinityHttpModule, Telerik.Sitefinity"
/>
<
add
name
=
"IIS6ClaimsFix"
type
=
"SitefinityWebApp.Code.HttpModules.IIS6SessionAuthenticationModule, SitefinityWebApp"
/>
</
modules
>
<
microsoft.identityModel
>
<
service
>
<
claimsAuthenticationManager
type
=
"Telerik.Sitefinity.Security.Claims.SFClaimsAuthenticationManager, Telerik.Sitefinity"
/>
<
securityTokenHandlers
>
<
add
type
=
"Telerik.Sitefinity.Security.Claims.SWT.SWTSecurityTokenHandler, Telerik.Sitefinity"
/>
</
securityTokenHandlers
>
<
audienceUris
mode
=
"Never"
></
audienceUris
>
<
federatedAuthentication
>
<
wsFederation
passiveRedirectEnabled
=
"true"
issuer
=
"http://localhost"
realm
=
"http://localhost"
requireHttps
=
"false"
/>
<
cookieHandler
requireSsl
=
"false"
/>
</
federatedAuthentication
>
<
issuerNameRegistry
type
=
"Telerik.Sitefinity.Security.Claims.CustomIssuerNameRegistry, Telerik.Sitefinity"
>
<
trustedIssuers
></
trustedIssuers
>
</
issuerNameRegistry
>
<
issuerTokenResolver
type
=
"Telerik.Sitefinity.Security.Claims.SWT.WrapIssuerTokenResolver, Telerik.Sitefinity"
/>
</
service
>
</
microsoft.identityModel
>
Since many shared hosting servers likely still use IIS 6, perhaps building this into Sitefinity instead of a moderate percentage of your clients having to do a run around on google for 2 hours to find the solution would be in order? Seems like a relatively moderate "hotfix" type of solution that wouldn't be that difficult to implement.