.NET Framework 3.5 SP1 ??? HttpResponseMessageProperty ???? ??? SuppressPreamble ??? ?????? ?? ?? ?? ???????? ?? ?????

???? ?????? ???? ??????
???? ID: 979533 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

?? ???????? ?? ????? ??SuppressPreamble??? ???HttpResponseMessageProperty???? ??? Microsoft .NET Framework 3.5 ?????? ??? 1 (SP1)? SuppressPreamble ??? ?????? ??? ??? ?? ??? ?? ??? ??? ??TrueWindows ????? ????????? (WCF) ???? ??? ?? HTTP ??????????? ????? ?? ??? ??? ??? ???? ?? ???? ????:? ?? ????? ?? ????? ????????? ??????ContentType???, ??StatusCode???? When you set these properties, the HttpTransport channel does not have to set these properties again. Therefore, when a WCF client accesses the WCF service, the service can send a status notification to the client by using the current HTTP response message.

???:TheSuppressPreambleproperty works only when WCF services are running in ASP.NET compatibility mode.

???? ???????

???????? ???????

Windows Vista Service Pack 2 (SP2) or Windows Server 2008 SP2

To resolve this problem in Windows Vista SP2 or in Windows Server 2008 SP2, download and apply the hotfix that is described in Microsoft Knowledge Base article 9810001.???? ??????? ?? ???, Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ????? ????::
981001?? ???????? ????? Windows .NET Framework 3.5 SP1 ?? ??? Windows Vista SP2 ?? Windows Server 2008 SP2 ??? ????? ????????? ?? ??? ?????? ??

Windows 7 ?? Windows Server 2008 R2

Windows 7 ??? ?? Windows Server 2008 R2 ??? ?? ?????? ?? ?? ???? ?? ??? ??????? ???? ?? ????? Microsoft ???????? ???? ??? ?????? ???????? ?? ???? ????:
981002?? ???????? ????? Windows .NET Framework 3.5 SP1 ?? ??? Windows 7 ?? Windows Server 2008 R2 ??? ????? ????????? ?? ??? ?????? ??
????? ????? ??? ?? ????? ???? ???? ?? ?????? ??SuppressPreamble???:
public void GetData()
{
     HttpContext hc = HttpContext.Current;
     string str = @"<?xml version=""1.0"" encoding=""utf-8""?>";
     byte[] buffer = new byte[str.Length];
     buffer = ASCIIEncoding.UTF8.GetBytes(str);

     HttpResponseMessageProperty responseProperty = new HttpResponseMessageProperty();
     responseProperty.SuppressPreamble = true;
     OperationContext.Current.OutgoingMessageProperties[HttpResponseMessageProperty.Name] = responseProperty;

     hc.Response.StatusCode = 200;
     hc.Response.ContentType = "text/xml; charset=utf-8";
     hc.Response.ClearContent();
     hc.Response.OutputStream.Write(buffer, 0, buffer.Length);
     hc.Response.Flush();
}
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

???

???? ID: 979533 - ????? ???????: 06 ?????? 2010 - ??????: 2.0
???? ???? ???? ??:
  • Microsoft .NET Framework 3.5 Service Pack 1
??????: 
kbexpertiseadvanced kbsurveynew kbqfe kbmt KB979533 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:979533

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com