Bad Request With WCF Service in Cassini On Windows 7 Beta
Trying to run a WCF service in Cassini on your Windows 7 Beta (7000) machine and get this error?
The remote server returned an unexpected response: (400) Bad Request.
Unless you’re running your service with basic http binding or with security specifically set to None in your bindings, you will get this security-related error. This problem was confirmed by Microsoft and will (hopefully) be fixed in next Windows 7 release.
The options you got:
- Create and run your own service host with code (I’ve been doing this in my integration tests until I tried Cassini and got the error)
- Use IIS (which I’m going to go for)
- Self-host it with WcfSvcHost.exe (which I’ve not tried yet)
Note that you need to add quite a few features to get WCF running in IIS running on Windows 7. See my previous post about this.
Richard Fennell had the same problems as well as a few others out there brave enough to try out a beta operating system.