Saturday, July 17, 2010

Bad request on Report Server

After upgrading to a new domain, all our request to the Report Server start failing. The only thing we got back was the very useful ‘Bad Request’ error message in our browser.

It took us some time to find out that the problem was related to the Kerberos authentication that was introduced in the new domain. This helped us tracking the issue and brought us to the following page on the MSDN website;

An extract:

On a report server that is configured for Negotiate or Kerberos authentication, a client connection to the report server will fail if there is a Kerberos authentication error. Kerberos authentication errors are known to occur when:

  • The Report Server service runs as a Windows domain user account and you did not register a Service Principal Name (SPN) for the account.

  • The report server is configured with the RSWindowsNegotiate setting.

  • The browser chooses Kerberos over NTLM in the authentication header in the request it sends to the report server.

You can detect the error if you enabled Kerberos logging. Another symptom of the error is that you are prompted for credentials multiple times and then see an empty browser window.

You can confirm that you are encountering a Kerberos authentication error by removing < RSWindowsNegotiate /> from your configuration file and reattempting the connection.

After you confirm the problem, you can address it in the following ways:

  • Register an SPN for the Report Server service under the domain user account. For more information, see How to: Register a Service Principal Name (SPN) for a Report Server.

  • Change the service account to run under a built-in account such as Network Service. Built-in accounts map HTTP SPN to the Host SPN, which is defined when you join a computer to your network. For more information, see How to: Configure a Service Account for Reporting Services.

  • Use NTLM. NTLM will generally work in cases where Kerberos authentication fails. To use NTLM, remove RSWindowsNegotiate from the RSReportServer.config file and verify that only RSWindowsNTLM is specified. If you choose this approach, you can continue to use a domain user account for the Report Server service even if you do not define an SPN for it.

Because we wanted to keep using NTLM, we removed the RSWindowsNegotiate line from the RSReportServer.config. Afterwards everything worked just fine.

No comments: