Analysis Services database works with ASP.NET Development Server but NOT IIS

2.3k views Asked by At

I have an ASP.NET application which needs to connect to Analysis Services database. All components are on the same machine:

  • Web application
  • IIS
  • Visual Studio 2008
  • SQL Server 2008

My domain account (DOMAINNAME\MyWindowsUsername) is an administrator on the SQL Server and also in "Administrators" group on the local machine.

Web application uses Windows Authentication and identity impersonate="true".

My IIS Windows Authentication settings (I have also tried other combinations but no success...):

  • Extended Protection: Off
  • Enable Kernel-mode authentication: true
  • Enables Providers: NTLM


When I use web application on ASP.NET Development Server (deployed from Visual Studio) then everything works ok. My domain account and corresponding database roles are recognized correctly, and security is working as defined in database roles.

But, when I deploy the same web application (without any changes in code) to IIS I get error (in browser):

An error was encountered in the transport layer. The peer prematurely closed the connection.



In SQL Profiler (for IIS case when connection fails) I get only these two events:

Audit Login MyWindowsUsername DOMAINNAME

Audit Logout MyWindowsUsername DOMAINNAME

It seems Analysis Services recognizes the impersonated account, but still the connection breaks.

I have noticed that ASP.NET Development Server runs under DOMAINNAME\MyWindowsUsername while IIS under LocalSystem (the default setting). I tried to play with the accounts, adding various system/network account as Analyis Services administrators (just to understand the logic behind this), but also with no success (always the same error).

1

There are 1 answers

1
Lex Li On BEST ANSWER

You must use delegation to pass on the user credential from the web browser to SSAS,

http://msdn.microsoft.com/en-us/library/ff647404.aspx

ASP.NET Development Server simply runs under your log on account, which prevents you from noticing this issue earlier.