While building a bunch of ASMX 2.0 + WSE 3.0 demos during my UG presentation last week, I ran into an interesting but annoying issue (especially during a talk). I had built an ASMX 2.0 service interface and a class that implemented the interface. I was demonstrating how once you use the various Web service attributes on an interface, the ASMX runtime will not let you use any Web service attributes on the derived class that impact the service contract. You can, however, use the Web service attributes that control the processing behavior (such as [WebMethod(BufferResponse=true)]) on the derived class. I was showing how all this works and I added a few of these WebMethod behavior properties on my service class.
Then later in the demo, I hosted the service class in a console app over TCP (using SoapReceivers) and the host program ran just fine. But whenever I'd try to invoke it, I kept getting a "Server unavailable…please try again later" fault in the response. I thought for sure something was wrong with my configuration, or the proxy class I was using, but no, it was the fact that the service class had BufferResponse=true set on the WebMethod. I haven't had time to go through the various [WebMethod] behavior properties to see exactly which ones cause this type of problem in a custom hosting scenario, but this is definitely something to watch out for once you leave world of ASP.NET.
Posted
Oct 25 2005, 02:21 PM
by
Aaron Skonnard