Wednesday, January 03, 2007

Configuring SQL Server Analysis Services for HTTP access

I had been trying to configure SQL Server Analysis Services (SSAS) on IIS and it gave me enough trouble. At first glance it looked pretty simple and there is a detailed walk-through provided at microsoft website which took me step by step to the entire configuration process. Two separate tutorials are given for Windows XP and Windows 2003 Server each.

Though I followed the steps given in the tutorials something looked to be missing some where. I configured 5 Windows 2003 Servers and 2 Windows XP machines and was not able to make it work in any of them. On all those machines, I was getting an HTTP 500 Internal Server Error.

Unfortunately, those 2 articles were the only resources available on internet for configuring Analysis Services 2005 on IIS. I searched desparately on forums and google groups but could not get any useful help. From the forums and other online discussions, I realized that many people are able to configure their servers using the steps given in the above tutorials. Having said that, what am I doing wrong?

I reviewed my settings again and again for a dozen times and try to spot anything that may be looking fishy. But I could not find anything. From the various internet forums and discussions I understood that, when I navigate to http://localhost/olap/msmdpumb.dll I should get a message saying that "The syntax for 'GET' is incorrect!", if SSAS is correctly configured on IIS. I am always getting "Internal Server Error".

Today I thought of digging further into it and see if I could spot the problem. I assumed that because I get an HTTP 500 error, IIS is able to successfully hand over the request to msmdpump.dll. Something is going wrong within the msmdpump.dll and that is what I need to trace. First I thought it may be folder/virtual directory security or rights to access Analysis Server. I tried to give full access to the folder and changed the security attributes of virtual directory, but it still did not work. I kept getting HTTP 500 error code.

I then thought I may be able to get some error information from the event viwer. I could not think of any other way to get logging information from msmdpump.dll. The event viewer did not provide any information about the error.

The next hope was to check the IIS log. I enabled IIS log and checked the log file after sending a few requests to the web server. The log file showed the following entry.

#Fields: time c-ip cs-method cs-uri-stem sc-status
15:42:21 127.0.0.1 GET /olap/msmdpump.dll 200
15:43:54 127.0.0.1 GET /olap/msmdpump.dll 200
15:48:20 127.0.0.1 GET /olap/msmdpump.dll 200

The log files clearly showed that IIS is happy with the request as it sends out HTTP 200 response. I got too much confused here. IIS is sending out HTTP 200 response. But my browser shows up HTTP 500 error code. This clearly indicated that the error message I am getting is totally controlled by msmdpump.dll. I wanted to get maximum information about the error and thought of turning of friendly error messages on my browser.

I refreshed my browser and found the following response.

<soap:Envelope>
   <soap:Body>
      <soap:Fault>
         <faultcode>XMLAnalysisError.0xc10e0002</faultcode>
         <faultstring>Parser: The syntax for 'GET' is incorrect.</faultstring>
         <detail>
            <Error ErrorCode="3238920194" Description="Parser: The syntax for 'GET' is incorrect." Source="Unknown" HelpFile=""/>
         </detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

I realized that this is exactly what I wanted. The problem was only the way my IE7 displayed the HTTP response. Everything is configured correctly at my side, but I did not realize it.

I am not sure if any one else would have been into the same trap. If so, this post might help him/her.