Installation issue

Topics: Setup / Configuration
Oct 2, 2008 at 4:21 AM

I am currently using Vista Home Premium with SQL 2005 Express and VS 2008 SP1.

The pre-installation checklist all went ok but when I start the build and configure process it started failing.

The error messages were:

Installing DinnerNow
New-Object : Cannot find type [Microsoft.SqlServer.Management.Smo.Wmi.ServerAli
as]: make sure the assembly containing this type is loaded.
At C:\DinnerNow25\scripts\install\library.ps1:4 char:18
+     $sa = New-Object  <<<< Microsoft.SqlServer.Management.Smo.Wmi.ServerAlias
 ".","DinnerNow"
Property 'ConnectionString' cannot be found on this object; make sure it exists
 and is settable.
At C:\DinnerNow25\scripts\install\library.ps1:7 char:6
+     $sa.C <<<< onnectionString='MSSQL$SQLEXPRESS\sql\query'
Property 'ProtocolName' cannot be found on this object; make sure it exists and
 is settable.
At C:\DinnerNow25\scripts\install\library.ps1:8 char:6
+     $sa.P <<<< rotocolName='np'
Property 'ServerName' cannot be found on this object; make sure it exists and i
s settable.
At C:\DinnerNow25\scripts\install\library.ps1:9 char:6
+     $sa.S <<<< erverName='.'
You cannot call a method on a null-valued expression.
At C:\DinnerNow25\scripts\install\library.ps1:10 char:12
+     $sa.Create( <<<< )
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
Creating DinnerNow Workflow database...
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
Creating persistence tables...
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
Creating persistence stored procedures...
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
Creating Tracking tables...
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
creating Tracking stored procedures...
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
Create the ASPNETDB SQL Server database for the membership system

Start adding the following features:
Membership
Profile
RoleManager
Personalization
SqlWebEventProvider

...............
An error has occurred. Details of the exception:
A network-related or instance-specific error occurred while establishing a conne
ction to SQL Server. The server was not found or was not accessible. Verify that
 the instance name is correct and that SQL Server is configured to allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not open a conne
ction to SQL Server)

Unable to connect to SQL Server database.

Create the CardSpace tables...
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
Create the CardSpace stored procedures...
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL
Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to
the server. When connecting to SQL Server 2005, this failure may be caused by
the fact that under the default settings SQL Server does not allow remote
connections.
Configuring support for SVC files
Microsoft(R) Windows Communication Foundation Installation Utility
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2123]
Copyright (c) Microsoft Corporation.  All rights reserved.

Installing: Machine.config Section Groups and Handlers

Installing: System.Web Build Provider

Installing: System.Web Compilation Assemblies

Installing: HTTP Handlers

Installing: HTTP Modules

Installing: ListenerAdapter node for protocol net.tcp

Installing: Protocol node for protocol net.tcp

Installing: TransportConfiguration node for protocol net.tcp

Installing: ListenerAdapter node for protocol net.pipe

Installing: Protocol node for protocol net.pipe

Installing: TransportConfiguration node for protocol net.pipe

Installing: ListenerAdapter node for protocol net.msmq

Installing: Protocol node for protocol net.msmq

Installing: TransportConfiguration node for protocol net.msmq

Installing: ListenerAdapter node for protocol msmq.formatname

Installing: Protocol node for protocol msmq.formatname

Installing: TransportConfiguration node for protocol msmq.formatname

Installing: HTTP Modules (WAS)

Installing: HTTP Handlers (WAS)
ERROR ( message:Failed to add duplicate collection element "/DinnerNow". )
ERROR ( message:Failed to add duplicate collection element "/DinnerNow/Service".
 )
ERROR ( message:New mimeMap object missing required attributes. Cannot add dupli
cate collection entry
. )
processed file: C:\DinnerNow25\solution\DinnerNow - Web\DinnerNow.WebUX
Successfully processed 1 files; Failed processing 0 files
processed file: C:\DinnerNow25\solution\DinnerNow - Web\DinnerNow.WebUX
Successfully processed 1 files; Failed processing 0 files
processed file: C:\DinnerNow25\solution\DinnerNow - Web\DinnerNow.WebUX
Successfully processed 1 files; Failed processing 0 files
processed file: C:\DinnerNow25\solution\DinnerNow - Web\DinnerNow.WebUX
Successfully processed 1 files; Failed processing 0 files
Succeeded
Error: There are more than one matching certificate in the issuer's Root cert st
ore
Failed
processed file: C:\ProgramData\Microsoft\crypto\rsa\machinekeys\2e3f071db15f2d91
567bc036373e4ade_e4a50d07-e632-4376-8f77-0a5645cbb725
Successfully processed 1 files; Failed processing 0 files
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

C:\DinnerNow25\scripts\install\BindSSL.vbs(5, 1) (null): 0x8004100E

Building "IIS7 Handler"
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3053]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build Complete
Building "DinnerNow - ServicePortfolio.sln"
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3053]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Data\POXOrderItem.cs(52,22): warning CS0169: The field 'DinnerNow.Business.Data
.POXOrderItem.menuItemId' is never used
Data\POXOrderItem.cs(53,22): warning CS0169: The field 'DinnerNow.Business.Data
.POXOrderItem.restaurantId' is never used
Data\POXOrderItem.cs(54,24): warning CS0169: The field 'DinnerNow.Business.Data
.POXOrderItem.name' is never used
Data\POXOrderItem.cs(55,24): warning CS0169: The field 'DinnerNow.Business.Data
.POXOrderItem.imageLocation' is never used
Data\POXOrderItem.cs(56,25): warning CS0169: The field 'DinnerNow.Business.Data
.POXOrderItem.price' is never used
Data\POXOrderItem.cs(57,21): warning CS0169: The field 'DinnerNow.Business.Data
.POXOrderItem.quantity' is never used
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3
245: Could not resolve this reference. Could not locate the assembly "Microsoft
.VisualStudio.QualityTools.LoadTestFramework, Version=9.0.0.0, Culture=neutral,
 PublicKeyToken=b03f5f7f11d50a3a". Check to make sure the assembly exists on di
sk. If this reference is required by your code, you may get compilation errors.
C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Ta
rgets : warning : Activity 'sendActivity1' validation warning: Validation faile
d for parameter 'order'. All parameters for the send activity should have a val
id activity binding or a value specified.
C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Ta
rgets : warning : Activity 'sendActivity1' validation warning: Validation faile
d for parameter 'context'. All parameters for the send activity should have a v
alid activity binding or a value specified.
Build Complete
Building "DinnerNow - SideBar.sln"
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3053]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build Complete
Building "DinnerNow - Web.sln"
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3053]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build Complete
Building "DinnerNow - Kiosk.sln"
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3053]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build Complete
Building "DinnerNow - Management.sln"
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3053]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build Complete
Building "DinnerNow - LoadAgent.sln"
Microsoft (R) Build Engine Version 3.5.30729.1
[Microsoft .NET Framework, Version 2.0.50727.3053]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build Complete
Finished
Press any key to continue . . .

I have check to make sure the SQL instance name is SQLExpress, remote is allowed and mixed authentication is on.
The firewall have also been configured to let port 1433 and 1434 through and I have added the SQL instance into the exception in the firewall.

I am stuck at this point, the only other thing I would try is to install SQL 2008 Express but didn't want to go that route yet.

Anyone has any idea?

Thanks,

Coordinator
Oct 2, 2008 at 12:35 PM
For the first error, i.e.

New-Object : Cannot find type [Microsoft.SqlServer.Management.Smo.Wmi.ServerAli
as]: make sure the assembly containing this type is loaded.
At C:\DinnerNow25\scripts\install\library.ps1:4 char:18
+     $sa = New-Object  <<<< Microsoft.SqlServer.Management.Smo.Wmi.ServerAlias
 ".","DinnerNow"

did you install SQL Server 2008 Express as part of VS2008 SP1? I suspect the reason why you are getting this error is that in SQL Server 2008, the type Microsoft.SqlServer.Management.Smo.Wmi.ServerAlias has moved from Microsoft.SqlServer.Smo.dll to Microsoft.SqlServer.SqlWmiManagement.dll.

To verify this, using the Object Browser in VS, can you open Microsoft.SqlServer.SqlWmiManagement.dll and see whether it contains the type Microsoft.SqlServer.Management.Smo.Wmi.ServerAlias?

Thanks,
HabibH.
Oct 2, 2008 at 10:17 PM

thanks Habibh for the insight,

Currently I am still using SQL 2005 Express, and you brought up an interesting idea.  Maybe Microsoft.SqlServer.smo.dll wasn't installed when I installed SQL 2005 Express.

I'll double check this and let others know how it goes. 

Anyone else had a similar case and was able to resolve it?

Thanks,

Sammyman

Oct 9, 2008 at 4:56 AM
Hi Sammyma,

The error is because of the missing assembly. I too got the same error which got solved upon installed SQL 2005 client components. Check for the existence of the assembly in GAC as well before proceeding.

Also if you have SQL 2008 client, then  as HabiBh said, the class has been moved to SQLWmiManagement. In that case

  1. Edit the library.ps1
  2. Go to the function new-DatabaseAlias
  3. Instead of Microsoft.SqlServer.Smo use Microsoft.SqlServer.SqlWmiManagement. It will look like
function new-DatabaseAlias
{
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SqlWmiManagement") | out-null
    $sa = New-Object Microsoft.SqlServer.Management.Smo.Wmi.ServerAlias ".","DinnerNow"
   
    #Assume SQLExpress for now
    $sa.ConnectionString='MSSQL$SQLEXPRESS\sql\query'
    $sa.ProtocolName='np'
    $sa.ServerName='.'
    $sa.Create()
}

Thanks
NR. Harisutarsan

Nov 6, 2008 at 5:50 PM
@nrharisutarsan: I worked for me, thank you!