Context.Response.Outputstream is not available when a custom

Posted by Community Admin on 04-Aug-2018 04:51

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

All Replies

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

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

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

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. 

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

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

This thread is closed