IIS integrated pipeline mode error

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/15/2012 9:22:18 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

IIS integrated pipeline mode error

Joe,

I have did a recent pull of mojoPortal code from the repository, but now I am unable to navigate my site using the VS built in web server. I can get to the "default" page and any administration pages, but any of the CMS pages always return the following error:

Server Error in '/' Application.

This operation requires IIS integrated pipeline

 

mode.

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.PlatformNotSupportedException: This operation requires IIS integrated pipeline

 

mode.

Source Error:


Line 356:                        queryStringToUse = "?" + queryStringToUse;
Line 357:                    }
Line 358:                    app.Context.Server.TransferRequest(realPageName + queryStringToUse, true);
Line 359:
Line 360:                }

Source File: C:\Users\kerry.doan\Documents\Visual Studio 2010\Projects\mojoPortal\Web\Components\UrlRewriter.cs    Line: 358

Stack Trace:


[PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.]
   System.Web.HttpServerUtility.TransferRequest(String path, Boolean preserveForm, String method, NameValueCollection headers) +3050038
   System.Web.HttpServerUtility.TransferRequest(String path, Boolean preserveForm) +14
   mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app) in C:\Users\kerry.doan\Documents\Visual Studio 2010\Projects\mojoPortal\Web\Components\UrlRewriter.cs:358
   mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e) in C:\Users\kerry.doan\Documents\Visual Studio 2010\Projects\mojoPortal\Web\Components\UrlRewriter.cs:82
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

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

I did some research and noticed that you changed this code on 6.8.2012. I did more research to see if there was a setting I needed to change, but all of the suggestions (even some from this site from previous issues with this error) I tried did not work. Then I ran across this recent blog post, and if you do a search on "integrated", on the third instance he states 'Since Server.TransferRequest only works with IIS version 7.0 or greater in Integrated mode, it does not work with the Visual Studio Development Server.'

Do you happen to experience the same thing? If not, do you have any suggestions... I am kind of at a loss and would like to continue some development on some custom modules that I am working on.

Thanks!

 

6/15/2012 9:43:17 AM
Gravatar
Total Posts 18439

Re: IIS integrated pipeline mode error

Hi Kerry,

You can solve this by adding this to your user.config:

<add key="UseTransferRequestForUrlReWriting" value="false"/>

However it is more ideal to use an integrated app pool.

I recently changed the url rewriter module to use Ser.ver.TransferRequest instead of Context.RewritePath but kept the old implementation using this config setting in case it caused anyone any problems.

The reason for the change is because with RewritePath, what happens is that the IIS log only sees the real url, ie it logs all cms pages as /Default.aspx?pageid=x rather than logging the friendly url, whereas with Server.TransferRequest (which was a new feature as of ASP.NET 3.5), it will log the friendly url in the IIS log.

Given the new European cookie laws and the growing use of do not track and private browsing sessions which aren't tracked by google analytics, its growing important again to be able to do server log analysis as an alternate means of measuring site traffic. I recently installed SmarterStats on my server and discovered this problem that the reports were not showing the friendly urls because the IIS logs did not have them. So I made this change to help going forward so that the IIS logs will have more useful information.

Best,

Joe

6/15/2012 9:47:32 AM
Gravatar
Total Posts 18439

Re: IIS integrated pipeline mode error

I just found that I can detect if an integrated pipeline is on use, so I can wrap that as another check around this.

I will have that in the repository later today.

Best,

Joe

6/15/2012 9:50:36 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: IIS integrated pipeline mode error

Joe,

Thanks! That works like a champ. I will keep it as a "development environment" config, but try not to use it in production.

Thanks again!

Kerry

6/15/2012 9:53:23 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: IIS integrated pipeline mode error

Joe,

We are posting at the same time and just saw your new post about the check for integrated pipeline. With that check, will the "UseTransferRequestForUrlReWriting" config property be needed any longer? Or keeping it just in case?

Thanks

Kerry

6/15/2012 9:58:39 AM
Gravatar
Total Posts 18439

Re: IIS integrated pipeline mode error

Once that check is in the repository you shouldn't need to use the config setting in your dev environement.

Best,

Joe

6/15/2012 10:02:33 AM
Gravatar
Total Posts 18439

Re: IIS integrated pipeline mode error

I've just pushed this change to the repository so if you get the latest you should not need to use that config setting.

Best,

Joe

6/15/2012 10:16:38 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: IIS integrated pipeline mode error

Updated with the latest from the repository and it works without the config value.

Thanks for the help and the quick turn around!

Kerry

6/15/2012 12:39:36 PM
Gravatar
Total Posts 18439

Re: IIS integrated pipeline mode error

Thank you for the beer!

Cheers,

Joe

You must sign in to post in the forums. This thread is closed to new posts.