Saturday, July 4, 2009

IIS Hosting for WCF Service - Issue when Domain Name is used

Last week we ran into some issues with hosting of WCF Service in IIS 6.0. The issue was when we try to browse the service file (e.g https://MySubDomain.MyDomain.com/MyVirtualFolder/MyService.svc) in browser everything looks fine. However the WSDL definition URL mentioned beside svcutil.exe was displaying https://MyComputerName/MyVirtualFolder/MyService.svc

We did some Google search and found the solution in parts at various place. I though it would be good to put together this information at a single place so that it would be helpful to anyone facing the similar issue.

One important point to note here is that the web site where service is hosted is SSL enabled.

Resolution to this issue is stated in steps below:

#1: Make sure Service Behaviour tag in web.config is configured as mentioned below. Notice the keywords in Bold.

<behaviors>
    <serviceBehaviors >
        <behavior name="ExcelClientServiceBehavior" >
            <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
            <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
    </serviceBehaviors>
</behaviors>

#2: The issue might still persist is the Header Name is not properly associated with the Site Identifier. Here our observation was even though in IIS you can see that the Host Header Value displaying your domain name, but still we were getting the issue.

  • Open Command Prompt (Start ->  Run -> cmd)
  • Go to the folder for adsutil.vbs (C:\Inetpub\AdminScripts)
  • Run the below mentioned command
  • cscript.exe adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:<host header>"

Replace <host header> with domain name e.g MySubDomain.MyDomain.com as mentioned in above example.

Replace <site identifier> with your web site identifier. For Default Web Site it is generally 1.

image

We can run the same command with different identifiers for each web site.

Hope you find this post useful.

If anyone has any correction to be made in this post, let me know and I will correct them ASAP.

Wednesday, May 6, 2009

Using functions from FSharp.PowerPack.dll

While working with F# in either Visual Studio or F# interactive if we try to use functions like print_string will give a compile time error.

This can be avoided by either adding reference to current session in F# interactive window by typing:

> #r "FSharp.PowerPack.dll";;

This way we will be able to execute the code using functions defined in PowerPack.dll however in visual studio it will still show the compile time error.

For resolving this we can put the same statement below #light keyword.

#light
#r "FSharp.PowerPack.dll"

This will not display the error message however a warning message will still be displayed stating the compatibility with OCaml.

image

This will work fine till the time we are working in .fsx file however will give error once you try to build your application. For resolving this FSharp.PowerPack needs to be added to Project Reference which can be found in .Net tab.

image

Friday, April 24, 2009

Blog Title Changed to "Technology Discussions by Ajay Singh"

This blog was initially started to share the thoughts on the PerformancePoint Server product from Microsoft. However with the recent announcement of PPS Planning being discontinued and Monitoring getting integrated to SharePoint, I thought it would be better to have a generic title for the blog. So I changed the blog title to "Technology Discussions by Ajay Singh" from "PerformancePoint Server Information by Ajay Singh".

 

This doesn't mean that I will stop posting the information about PerformancePoint Services. Its just that I may post information related to other technologies as well (which I have already started doing :) )

Thursday, April 23, 2009

Issue with SubSelect in MDX Query generated by Excel 2007 with Analysis Services 2005

I am using Excel 2007 for connecting to SSAS 2005 (AdventureWorksDW) cube and created a very simple report on perspective "Financial Reporting" where Account (Net Income) is taken on row, Column has Scenario (Actual and Budget) and Fiscal Year (FY 2002) and measure selected is "Amount". Now with this setup (case 1.1) report runs fine and displays the data correctly. However when we move the Scenario to Filter axis (Case 1.2) the Excel shows data only for Actual scenario and Budget data is not considered in the aggregation.

 

However when we create the same report in a Excel file (which is saved in 2003 compatibility mode) the data gets aggregated and the result is displayed as per the expectation.

 

Points that needs to be considered are:

  • Pivot table version used in both cases will be different
  • Usage of SubSelect (introduced from AS2005 SP2) in Excel 2007 version

 

Excel 2007:

Case 1.1: Scenario on Columns

Report Output:

image

MDX Generated:

SELECT NON EMPTY CrossJoin(Hierarchize({[Scenario].[Scenario].[Scenario].Members}), Hierarchize({DrilldownLevel({[Date].[Fiscal Year].[All Periods]})})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON COLUMNS , NON EMPTY Hierarchize({[Account].[Accounts].[Account Level 01].Members}) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,[Account].[Accounts].[Account Number],[Account].[Accounts].[Account Type],[Account].[Accounts].[Accounts] ON ROWS  FROM (SELECT ({[Scenario].[Scenario].&[1], [Scenario].[Scenario].&[2]},{[Date].[Fiscal Year].&[2002]}) ON COLUMNS , ({[Account].[Accounts].&[47]}) ON ROWS  FROM [Adventure Works]) WHERE ([Measures].[Amount]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS

MDX Output:

image

 

Case 1.2: Scenario on Filter Axis (Scenario member selection is still 'Actual' and 'Budget' both)

Report Output:

image

MDX Generated:

SELECT NON EMPTY Hierarchize({DrilldownLevel({[Date].[Fiscal Year].[All Periods]})}) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON COLUMNS , NON EMPTY Hierarchize({[Account].[Accounts].[Account Level 01].Members}) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,[Account].[Accounts].[Account Number],[Account].[Accounts].[Account Type],[Account].[Accounts].[Accounts] ON ROWS  FROM (SELECT ({[Date].[Fiscal Year].&[2002]}) ON COLUMNS , ({[Account].[Accounts].&[47]}) ON ROWS  FROM (SELECT ({[Scenario].[Scenario].&[2],[Scenario].[Scenario].&[1]}) ON COLUMNS  FROM [Adventure Works])) WHERE ([Measures].[Amount]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS

MDX Output:

image

 

Excel 2007 in 2003 Compatibility Mode:

Case 2.1: Scenario on Columns

Report Output:

image

MDX Generated:

SELECT NON EMPTY CrossJoin(Hierarchize(Except({AddCalculatedMembers(Except({AddCalculatedMembers([Scenario].[Scenario].[Scenario].members)}, {[Scenario].[Scenario].[Budget Variance %],[Scenario].[Scenario].[Budget Variance],[Scenario].[Scenario].&[3]}))}, {[Scenario].[Scenario].[Budget Variance %],[Scenario].[Scenario].[Budget Variance],[Scenario].[Scenario].&[3]})),Hierarchize(Except({AddCalculatedMembers(Except({AddCalculatedMembers(DrilldownLevel({[Date].[Fiscal Year].[All Periods]}))}, {[Date].[Fiscal Year].&[2007],[Date].[Fiscal Year].&[2005],[Date].[Fiscal Year].&[2004],[Date].[Fiscal Year].&[2003]}))}, {[Date].[Fiscal Year].&[2007],[Date].[Fiscal Year].&[2005],[Date].[Fiscal Year].&[2004],[Date].[Fiscal Year].&[2003]}))) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON COLUMNS , NON EMPTY Hierarchize(Except({AddCalculatedMembers(Except({AddCalculatedMembers([Account].[Accounts].[Account Level 01].members)}, {[Account].[Accounts].&[95],[Account].[Accounts].&[1]}))}, {[Account].[Accounts].&[95],[Account].[Accounts].&[1]})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON ROWS  FROM [Adventure Works] WHERE ([Measures].[Amount]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS

MDX Output:

image

 

Case 2.2: Scenario on Filter Axis (Scenario member selection is still 'Actual' and 'Budget' both)

Report Output:

image

MDX Generated:

WITH   MEMBER [Scenario].[Scenario].[XL_QZX] AS 'Aggregate({[Scenario].[Scenario].&[2],[Scenario].[Scenario].&[1]})' SELECT NON EMPTY Hierarchize(Except({AddCalculatedMembers(Except({AddCalculatedMembers(DrilldownLevel({[Date].[Fiscal Year].[All Periods]}))}, {[Date].[Fiscal Year].&[2007],[Date].[Fiscal Year].&[2005],[Date].[Fiscal Year].&[2004],[Date].[Fiscal Year].&[2003]}))}, {[Date].[Fiscal Year].&[2007],[Date].[Fiscal Year].&[2005],[Date].[Fiscal Year].&[2004],[Date].[Fiscal Year].&[2003]})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON COLUMNS , NON EMPTY Hierarchize(Except({AddCalculatedMembers(Except({AddCalculatedMembers([Account].[Accounts].[Account Level 01].members)}, {[Account].[Accounts].&[95],[Account].[Accounts].&[1]}))}, {[Account].[Accounts].&[95],[Account].[Accounts].&[1]})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON ROWS  FROM [Adventure Works] WHERE ([Measures].[Amount],[Scenario].[Scenario].[XL_QZX]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS

MDX Output:

image