Friday, January 16, 2009

Bad request = Access denied

Consuming services can get you "Bad request" error. The problem can be permissions on the service.

I made a WCF service to be consumed by Biztalk. The service is hosted by IIS and there was no problem running the BizTalk WCF Service Consuming Wizard to create schemas, port types and bindings.

The error came when trying to access the service by posting a request to it. Then I got "400 Bad request".

The problem was related to permissions. I forgot to switch application pool on my web application. After selecting the proper pool, running by correct user, I restarted IIS and everything worked fine.

No comments: