Context.Response.Outputstream is not available when a custom textwriter is used - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Context.Response.Outputstream is not available when a custom textwriter is used

  • Context.Response.Outputstream is not available when a custom textwriter is used
  • In Sitefinity web app, i am using a mvc widget. In the mvc widget, i am trying to access context.Response.Outputstream which is throwing an error: "Outputstream is not available when a custom textwriter is used". 

     

    Can anyone help on why we are facing this issue in an MVC widget?

     

    Thanks

    Harshitha Kavindra

  • Hi Harshitha.

    Can you please provide more information why you need to use Outputstream. I don't know way how to access Outputstream from MVC widget. May be i will suggest better way for your goal. 

  • I receive a web request in my mvc widget via httpPost and i am trying to send the response via http post and hence i need output stream to send the content of response to the requesting client. I am accessing the outputstream using the following code:

    System.Web.HttpContext.Current.Resposne.Outputstream

     

    Thanks

    Harshitha Kavindra