In .NET 3.5, I had the following code:
[WebService(Namespace = \"http://kitchenpc.com/schemas/\")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
The exception types are not serializable. Use FaultException instead.
throw new FaultException(..);
Ah, this was a stupid issue. The exception information only appears if you have:
<customErrors mode="Off" />
In your web.config (under <system.web>
). I'm actually not sure if this is a .NET 3.5 -> .NET 4.5 change in behavior, or if it got broke when I was re-writing my web.config build process using web.config transforms.
Does anyone know if there's a way to control this on a per web-service level? I'd rather not show full debug info on normal page requests.
Update:
I also came to the conclusion that throwing exceptions to communicate error information from a web service is really not a good design. In fact, I wrote a post on the subject on my blog for those interested.