SF 5.0 IIS6 Issues

Posted by Community Admin on 04-Aug-2018 23:40

SF 5.0 IIS6 Issues

All Replies

Posted by Community Admin on 06-Mar-2012 00:00

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:

Server Error in '/' Application.

Failed to Execute URL.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Failed to Execute URL.

Source Error:

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.

Stack Trace:

[HttpException (0x80004005): Failed to Execute URL.]
   System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl(String url, String method, String childHeaders, Boolean sendHeaders, Boolean addUserIndo, IntPtr token, String name, String authType, Byte[] entity, AsyncCallback cb, Object state) +2447893
   System.Web.HttpResponse.BeginExecuteUrlForEntireResponse(String pathOverride, NameValueCollection requestHeaders, AsyncCallback cb, Object state) +417
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +192
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8969412
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272 


I logged into the admin section to see if I could see if there was something I could change on my template and when I viewed the site after logging in, I was able to see all of the static files were now being loaded. I searched around and found a resolution for this. It seems that this is an issue with the ClaimsPrincipal  that was just introduced in the new Sitefinity 5.0. Apparently since I am having to map everything to the aspnet_isapi.dll for the extenionless urls to work, the ClaimsPrinciple was causing an error. Here is the forum post on the MSDN forums that talks about the problem and gives a solution through an HttpModule. Basically you have to override the OnPostAuthenticationRequest method of the SessionAuthenticationModule. Sitefinity is already doing this, but the error is in the use of static files on an IIS6 site. I added my module to the end of the module list in the web.config file to make it the last module called. I am hoping that this doesn't cause us any issues. Below is the markup I added to the web.config:
<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>

You can download the module here, and just extract it to your project, include it and rebuild. Then just add the module element to the web.config and you should be good.

Posted by Community Admin on 09-Mar-2012 00:00

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

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 15-Mar-2012 00:00

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.

Posted by Community Admin on 15-Mar-2012 00:00

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)

I tried installing your module, Richard, but while it would build I just ended up with an "object reference not set to an instance of an object" error.

Edmund, your solution worked to solve the javascript and CSS file issues, but I'm still stuck on the other. Any ideas?

Posted by Community Admin on 16-Mar-2012 00:00

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.

Posted by Community Admin on 16-Mar-2012 00:00

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?

Posted by Community Admin on 04-Apr-2012 00:00

Thank you for this fix.  I had this problem orginally with favicon.ico, but then it really bit me with a javascript file.

Posted by Community Admin on 16-Apr-2012 00:00

Edmund,

I noticed that you provided a solution for static files (.gif, .js) in IIS6, but I am wondering if there is a similar solution for the .asp file type.  We had some old .asp web pages and are using them to do 301 redirects to the new web pages in Sitefinity.  Any ideas?

Thanks in advance.

Craig

Posted by Community Admin on 24-Apr-2012 00:00

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.

Try to access backend portal i.e. http://<Domain>/sitefinity (You will still get yelllow page of death :))
Kindly see attached screenshot.

If any solution, let us know.

Thanks & regards,
palak

Posted by Community Admin on 24-Apr-2012 00:00

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...

Posted by Community Admin on 24-Apr-2012 00:00

Fixed my site by adding this to my web.config:

<add verb="*" path="*.css,*.js,*.jpg,*.jpeg,*.gif,*.png" type="System.Web.StaticFileHandler" />

Posted by Community Admin on 30-May-2012 00:00

Thanks Richard, your solution fixed the issue for me.

Posted by Community Admin on 30-Jul-2012 00:00

+1 for Richard. Fixed me up too.

Posted by Community Admin on 15-Aug-2012 00:00

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" />

but it would be nice if Telerik can declare this as a solution or in any other way tell us how we can do it?

Posted by Community Admin on 16-Aug-2012 00:00

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" />

Just add to the web.config and consider good.

Posted by Community Admin on 30-Aug-2012 00:00

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

Posted by Community Admin on 30-Aug-2012 00:00

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.

Posted by Community Admin on 30-Aug-2012 00:00

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? 

Posted by Community Admin on 30-Aug-2012 00:00

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.

So to answer your question, it really shouldn't change the performance.

Posted by Community Admin on 30-Aug-2012 00:00

OK Thanks for the additional info.
With this last piece of info I understand better what it does.

Cheers,
Olivier

Posted by Community Admin on 26-Sep-2012 00:00

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>

Posted by Community Admin on 15-May-2013 00:00

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.

This thread is closed