Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8522583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:09:50+00:00 2026-06-11T07:09:50+00:00

I’ve installed VS 2012 and am successfully using it on some web projects, but

  • 0

I’ve installed VS 2012 and am successfully using it on some web projects, but something with it has caused my web service project to break. I’m still using VS 2010 on the web service project and have not opened it in 2012.

Everything compiles and works correctly except when it tries to create an instance of a class in my referenced weblog project, then it throws this error:

This method or property is not supported after HttpRequest.GetBufferlessInputStream has been invoked.

I can not find anywhere in the project where GetBufferlessInputStream is used explicitly.

If I jump over the weblog code, everything executes correctly.

I can’t find anyone else who has received this error to try and narrow it down, any ideas where to start?

Stack

   at System.Web.HttpRequest.get_InputStream()
   at OAS.Web.Log.WebEvent..ctor(EventType type, HttpContext context, String applicationName)
   at OAS.Web.Log.WebTrace..ctor(HttpContext context, String applicationName)
   at OAS.Web.AdvisorServices.Extensions.OperationLoggerParameterInspector.BeforeCall(String operationName, Object[] inputs) in C:\SourceControl\OAS\IM.NET3.0\Web\AdvisorServices\OAS.Web.AdvisorServices.Extensions\OperationLogger\OperationLoggerParameterInspector.cs:line 54

**EDIT – Bonus Question

Why are these Framework 4.5 properties affecting my 4.0 solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:09:51+00:00Added an answer on June 11, 2026 at 7:09 am

    Note : This issue has been fixed in .net 4.5.1. You can see the fix with 4.5.1. Once you have .net 4.5.1 add the following appSetting to switch back to the old behavior.

    <configuration>      
    <appSettings>
          <add key="wcf:serviceHostingEnvironment:useClassicReadEntityBodyMode" value="true" />
    </appSettings> 
    </configuration>
    

    Here is how you can create a HttpModule to force ReadEntityBodyMode to be “classic” : http://blogs.msdn.com/b/praburaj/archive/2012/09/13/accessing-httpcontext-current-request-inputstream-property-in-aspnetcompatibility-mode-throws-exception-this-method-or-property-is-not-supported-after-httprequest-getbufferlessinputstream-has-been-invoked.aspx

    To answer your other question (Why are these Framework 4.5 properties are effecting my 4.0 solution?):
    .net 4.5 is an in-place upgrade of .net 4.0. So even if your project is targeting 4.0, since VS 2012 installs 4.5 runtime, some of the 4.5 behaviors take effect.

    EDIT

    Blog Entry:

    In .net 4.5 WCF leveraged the buffer less input stream for scalability benefits. As a result when you try to access the HttpContext.Current.Request.InputStream property you may end up with the below exception, as the InputStream property tries to get you handle to the Classic stream as they both are incompatible.

    “This method or property is not supported after
    HttpRequest.GetBufferlessInputStream has been invoked.”

    If you had a WCF 4.0 app which worked perfectly but on upgrading your .net framework to 4.5 you notice the service failing on accessing this property, here is the way to work-around the issue:

    • Add a simple HttpModule in the same WCF project which will access the InputStream property for each request before WCF reads it so that it will enforce the HttpContext.Request.ReadEntityBody to be “Classic” and will ensure compatibility.

      public class WcfReadEntityBodyModeWorkaroundModule : IHttpModule    
      {    
          public void Dispose() { }
      
          public void Init(HttpApplication context) {    
              context.BeginRequest += context_BeginRequest;    
          }    
      
          void context_BeginRequest(object sender, EventArgs e) {
              //This will force the HttpContext.Request.ReadEntityBody to be "Classic" and will ensure compatibility..    
              Stream stream = (sender as HttpApplication).Request.InputStream;    
          }    
       } 
      
    • Register this module in your web.config by adding these lines in <configuration> <modules> setting.

      <system.webServer>
          <modules>
              <!-- Register the managed module -->
              <add name="WcfReadEntityBodyModeWorkaroundModule" type="MyAssembly.WcfReadEntityBodyModeWorkaroundModule, MyAssembly" />
          </modules>
      
    • If you are using an app pool in classic mode, you will need to add the module to this section in the web.config:

      <system.web>
          <httpModules>
              <add name="WcfReadEntityBodyModeWorkaroundModule" type="MyAssembly.WcfReadEntityBodyModeWorkaroundModule, MyAssembly" />
          </httpModules>
      

    If your project cannot be modified, then you can write this Http module in a separate assembly, GAC it separately and register this module in the web.config.

    Now try accessing the service it should succeed for you!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.