Thursday, March 22, 2012

Classifieds Starter Kit in SQL Server 2005

Hello,

I am trying to get Classifieds Starter Kit work in SQL Server 2005. I did following:

1. Create DBs; The sql scripts came with the starter kit in the App_Data folder.

2. To create aspnetdb: aspnet_regsql.exe -E -S localhost -A mr

3. Open SQL Server Configuration Manager. Select "SQL Server 2005 Network Configuration | Protocols for MSSQLSERVER" then enable the protocols 'TCP/IP' and possibly 'Named Pipes'

4. My connections string <add name="classifiedsConnection" connectionString="Data Source=MyServerName;;User ID=user;Password=pass;Initial Catalog=ClassAds" providerName="System.Data.SqlClient" />

I still get the following error when I debug the application:

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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

How can I resolve this problem?

Looking at the steps that you have gone through you have set up the system to use the SQLExpress system with the database already attached to the engine, but have set up the location of the database files to use the sql express system as a user instance. To fix it you will have to either attach the database files to the engine using the comand line or the SQL Express management studio, or change your connection string to attach the files at run time.

|||

Thanks for the reply, I am new in this, can you give me an example how I can do it?

No comments:

Post a Comment