PlatformNotSupportedException when accessing HttpReponse.Headers
am 02.04.2008 18:02:59 von newsgroup.poster
I encounter the following exception when accessing
HttpResponse.Headers after having installed .net 3.5 SDK:
[PlatformNotSupportedException: This operation requires IIS integrated
pipeline mode.]
System.Web.HttpResponse.get_Headers() +3300614
My server is windows 2003 (iis6), my dev environment is winxppro
(either iis5 or vswebdevserver).
I've saw description of this exception here
http://msdn2.microsoft.com/en-us/library/system.web.httpresp onse.headers.aspx#ddueExceptionsToggle
but I don't understand why it should apply because I don't use iis 7.
I'm working arround by hacking ContentType property appending required
headers, but I wonder if there is a way to fix this problem?
Thanks,
Gauthier Segay
Re: PlatformNotSupportedException when accessing HttpReponse.Headers
am 02.04.2008 18:09:15 von Mark Fitzpatrick
The feature you're looking for only works with IIS 7, that's why you're
getting the PlatformNotSupportedException. If you try to run this code on
IIS 6 you'll get this exact error because it's not available. The way you're
doing this is correct for the version of IIS you have available.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
wrote in message
news:938d7785-61af-491e-b8d0-5a18aaaca18b@e6g2000prf.googleg roups.com...
>I encounter the following exception when accessing
> HttpResponse.Headers after having installed .net 3.5 SDK:
>
> [PlatformNotSupportedException: This operation requires IIS integrated
> pipeline mode.]
> System.Web.HttpResponse.get_Headers() +3300614
>
> My server is windows 2003 (iis6), my dev environment is winxppro
> (either iis5 or vswebdevserver).
>
> I've saw description of this exception here
>
> http://msdn2.microsoft.com/en-us/library/system.web.httpresp onse.headers.aspx#ddueExceptionsToggle
>
> but I don't understand why it should apply because I don't use iis 7.
>
> I'm working arround by hacking ContentType property appending required
> headers, but I wonder if there is a way to fix this problem?
>
> Thanks,
>
> Gauthier Segay
Re: PlatformNotSupportedException when accessing HttpReponse.Headers
am 02.04.2008 18:19:24 von newsgroup.poster
I got confused because I sure have used headers with asp.net before,
but it seems I was wrong and always relied on this trick.
Thanks for your answer and clarification.
On 2 avr, 18:09, "Mark Fitzpatrick" wrote:
> The feature you're looking for only works with IIS 7, that's why you're
> getting the PlatformNotSupportedException. If you try to run this code on
> IIS 6 you'll get this exact error because it's not available. The way you'=
re
> doing this is correct for the version of IIS you have available.
>
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - Expression
>
> wrote in message
>
> news:938d7785-61af-491e-b8d0-5a18aaaca18b@e6g2000prf.googleg roups.com...
>
>
>
> >I encounter the following exception when accessing
> > HttpResponse.Headers after having installed .net 3.5 SDK:
>
> > [PlatformNotSupportedException: This operation requires IIS integrated
> > pipeline mode.]
> > =A0 System.Web.HttpResponse.get_Headers() +3300614
>
> > My server is windows 2003 (iis6), my dev environment is winxppro
> > (either iis5 or vswebdevserver).
>
> > I've saw description of this exception here
>
> >http://msdn2.microsoft.com/en-us/library/system.web.httpres ponse.head...
>
> > but I don't understand why it should apply because I don't use iis 7.
>
> > I'm working arround by hacking ContentType property appending required
> > headers, but I wonder if there is a way to fix this problem?
>
> > Thanks,
>
> > Gauthier Segay- Masquer le texte des messages pr=E9c=E9dents -
>
> - Afficher le texte des messages pr=E9c=E9dents -