I have a wcf service that has a method which returns List after collecting information from SQL Server 2008 based database. While working in developement mode there is absolutly no problem, but when I run the service on IIS and try to access the method that is getting information from the database, the browser returns: “bad request 400”. When I call a method that is not working with databases it succeeds.
I am really desperate – I serached and searched, tried different things but nothing worked.
Thank you,
It’s almost assuredly a permissions problem. Without knowing your specific setup, here are some things to look for:
Unless you are using impersonation or have specified a specific user at your site level in IIS, it’s likely one of the above.
My guess is that you are using Windows Authentication to connect to your SQL Server database and you have not specified an App Pool Identity. My advice is to use a specific account for your app pool (domain\username) and then give that account the proper database permissions.
You also should configure tracing to capture the real exception.