mojoPortal – Setting up a local MS SQL Server connection

Posted by craig Saturday, May 09, 2009 11:04:36 AM
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional, Second Edition (Beginning from Novice to Professional)

It took me several tries to get the Mojoportal working locally.  Configuring MS SQL server can be a bit tricky, this is from the MSDN:

STEP 1: Enabling TCP/IP

First we must tell SQL Server Express to listen on TCP/IP, to do this perform the following steps:

  1. Launch the SQL Server Configuration Manager from the "Microsoft SQL Server 2008" Program menu
  2. Click on the "Protocols for SQLEXPRESS" node or the specific instance name of choice.
  3. Right click on "TCP/IP" in the list of Protocols and choose, "Enable"
  4. Restart the MSSQL server service(s).
  5. With PowerShell do: PS C:\ > stop-service mssql* -force
  6. With PowerShell do: PS C:\> start-service 'MSSQL$SQLEXPRESS'

Then the key line in the config file in my case was:

<add key="MSSQLConnectionString" value="Server=MyHome-PC\SQLEXPRESS;Database=mojo;TRUSTED_CONNECTION=TRUE" />

MyHome-PC should be replaced  with your Pc name, and note the key TRUSTED_CONNECTION=TRUE parameter which is quite different from the default settings in the provided web.config from mojo portal.

ASP.NET 3.5 Unleashed
Copyright 2009 AnyTime
Comments are closed on this post.