Monday, March 28, 2011

Unnecessary context scrolling in VS 2010 fixed in VS2010 SP1!!

I published a blog post last year regarding the unnecessary context scrolling in Visual Studio 2010 here: http://www.simonrhart.com/2010/04/turning-off-context-menu-scrolling-in.html

This has been fixed in SP1 of VS2010 and can be downloaded here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5

A list of things that has been updated can be found here: http://support.microsoft.com/kb/983509

This particular fix applies to this: https://connect.microsoft.com/VisualStudio/feedback/details/533342




I tested this fix against the VS2010 SP1 beta (above) as it does seem to be fixed, so well done Microsoft!

Management_Install.ps1 cannot be loaded because the execution of scripts is disabled on this system



You might have seen the above when attempting to install the BizTalk ESB Management Portal on a 64-bit operating system.

This particular error has been talked about a lot in the community with the solution but I wanted to detail here in a little bit more detail.

It requires Visual Studio 2010 to compile the code so this is for a development environment:

  1. Start the Windows Powershell command window from the following path: C:\Windows\syswow64\WindowsPowerShell\v1.0\Powershell.exe
  2. Edit the Management_Install.ps1 script and alter the line that sets the VS environment variable to this: $env:VS="${env:ProgramFiles(x86)}\Microsoft Visual Studio 10.0\Common7\IDE"
  3. Run: set-executionpolicy unrestrictedBold
  4. Run the Management_Install.bat from the current powershell command window (don't forget to include current directory i.e. .\Management_Install.bat (notice the .\)
The above should successfully use Visual Studio to build the Management Portal. Of course a better way of doing it would be to use something other than Visual Studio like pure MSBuild.

I need to write something that is suitable for a production environment, so when I do I'll post it here.

Thursday, March 24, 2011

Error: Cannot import wsdl:portType

I recently published a post on fixing an error you might get using the WCF SVCUTIL.exe utility when creating WCF service contracts from WSDL documents here: http://smart421.wordpress.com/2011/03/24/error-cannot-import-wsdlporttype/

Thursday, March 17, 2011

Deploying View... ERROR: The BAM deployment failed. Internal error: The operation terminated unsuccessfully.

I wrote a blog post recently on how to overcome the issue of not having the BAMStarSchema database when attempting to deploy the BAM ESB exceptions definition files as part of a Microsoft BizTalk 2010 ESB Toolkit 2.1 installation. This post can be found here: http://www.simonrhart.com/2011/02/bam-star-schema-database-has-not-been.html

After you get past that and you have a BAMStarSchema database you might then see the following error:

Deploying Activity... Done.
Deploying View... ERROR: The BAM deployment failed.
Internal error: The operation terminated unsuccessfully.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcDatetime', Name of 'ExcByApplication_ExcDatetime'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Month' attribute
of the 'ExcByApplication_ExcDatetime' dimension from the 'BAMAnalysis' database
was being processed.
Server: The operation has been cancelled.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_Application', Name of 'ExcByApplication_Application'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Application' att
ribute of the 'ExcByApplication_Application' dimension from the 'BAMAnalysis' da
tabase was being processed.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcFaultDescription', Name of 'ExcByApplication_ExcFa
ultDescription' was being processed.
Errors in the OLAP storage engine: An error occurred while the 'FaultDescription
' attribute of the 'ExcByApplication_ExcFaultDescription' dimension from the 'BA
MAnalysis' database was being processed.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcDatetime', Name of 'ExcByApplication_ExcDatetime'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Year' attribute
of the 'ExcByApplication_ExcDatetime' dimension from the 'BAMAnalysis' database
was being processed.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcDatetime', Name of 'ExcByApplication_ExcDatetime'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Day' attribute o
f the 'ExcByApplication_ExcDatetime' dimension from the 'BAMAnalysis' database w
as being processed.

This essentially means that the SQL Server user account is not added to the 'db_datareader' role in order to read the BAMStarSchema database.

Simple soultion to fix this is to add the SQL Server service user to that role for the BAMStarSchema database. I this is a development machine, I am running SQL Server under the NT AUTHORITY\NETWORK SERVICE account, so the SQL to fix this could look like the following:

use BAMStarSchema

EXEC sp_addrolemember 'db_datareader', 'NT AUTHORITY\NETWORK SERVICE'

Of course you could do this via SQL Management Studio if you wanted too.

Happy BizTalking!

Wednesday, March 16, 2011

TFS Workbench: An 'WebException' exception occured during the report list load process

Have you seen the following error recently after loading TFS Workbench:

An 'WebException' exception occured during the report list load process. Error Message: The request failed with HTTP status 401: Unauthorized.

If you don't know what TFS Workbench is, take a look at the above link. It is a great tool for managing work items and running SSRS reports in Team Foundation Server. It works with a range of Team Project process templates, I happen to be using Scrum for Team System for TFS 2010.

If you are getting the above error which is really annoying, you'll see the Report Viewer button at the bottom of TFS Workbench grayed out as per the screen shot below:



The annoying thing about that error is that I get a HTTP TFS challenge when I load TFS Workbench because my client is not running within the same domain as the development environment - which is a fairly common scenario - although not ideal sometimes we have no choice.

When I get this challenge I enter my DOMAIN\username and password, hit return and I am authenticated successfully. I know this because I am able to see my team projects in TFS Workbench. The HTTP 401 error tells me the client is able to resolve the reporting services server as if it wasn't, I would get a HTTP 404 error instead. (I added a CNAME record to the DNS server).

So I *think* what is happening is the code is applying the current credentials for the reporting services authentication web service call but not for the TFS Web Service calls.

Perhaps the code looks something like this:

ReportingServicesClient client = new ReportingServicesClient(); client.Credentials = System.Net.CredentialCache.DefaultCredentials;

Who knows, I don't have the code nor have I decompiled it so I don't know...

The solution is to simply add the name of the machine running reporting services along with the password to the Windows Credential Manager (new feature in Windows 7 and Windows Server 2008).

You can load the Credential Manager from Control Panel:




Then click on the Add Windows Credential hyperlink and enter your details in the dialog that pops up:



When you click OK, reload TFS workbench as the TFS Workbench should now resolve the correct credentials for the reporting services server in the Windows Credential store instead of using the default credentials which should fix this issue.


Saturday, March 05, 2011

The local computer is not a member of a windows failover

Don't make the same mistake as I did recently which was installing the wrong edition of Windows Server 2008 R2 in order to make use of Failover Cluster services.

I installed Standard edition of Windows Server 2008 R2 but in order to make use of the Failover Cluster services and managment snap-in, you need either Windows Server 2008 R2 Datacentre or Windows Server 2008 R2 Enterprise.

Attempting to install SQL Failover Cluster in standard edition will give you the following error message during the validation process: The local computer is not a member of a windows failover

This document describes the whole administration process: http://technet.microsoft.com/en-us/library/cc731844(WS.10).aspx

Thursday, March 03, 2011

In Seattle at the MVP Summit 2011


Well I have to say what a great event this year at the MVP Summit 2011. As always Microsoft has done a great job to give us the best experience they possibly can.

This is my 3rd summit and they just keep getting better and better like a fine wine....

Of course I am under NDA so what goes on in Redmond stays in Redmond! It was also a pleasure to catchup with some old friends.

Tuesday, March 01, 2011

Using the Guard pattern to simplify code contracts

I've just published a post on my other blog regarding implementing the Guard pattern in your .NET apps and where Microsoft is taking this approach...

Read it here: http://smart421.wordpress.com/2011/03/01/using-the-guard-pattern-to-simplify-code-contracts/