Showing posts with label professional. Show all posts
Showing posts with label professional. Show all posts

Sunday, February 12, 2012

Connection Problem, MS Personal Website Starter Kit

I have had a local Website up and running based on the MS Personal Website Starter Kit using Visual Studio 2005 Professional and SQL Server Express.

I am now trying to get the databases to run on SQL Server 2005 Standard Edition but can't get the connection to work.

I have changed the connection string in the Web.Config file from:

connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"

To

connectionString="Data Source=.\scastle;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"

But am getting the following error:

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)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

Line 5: Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)

Line 6: AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString

Line 7: If (Roles.RoleExists("Administrators") = False) Then

Line 8: Roles.CreateRole("Administrators")

Line 9: End If

I am able to connect OK in both Server Management Studio (Server Name: SCastle, Windons Authentication) and clicking Connect to Database in Server Manager in Visual Studio (Server Name: (local)).

Have I got the connection string wrong or do I need to set up additional permissions in the database?

Thanks for your help.

Stephen

Hi,

the user instance feature only work with the Sql Server Express Edition. If you want to use the database with the Standard edition you will have to attach the database to the Server instance (to make it server controlled) and then change the connectionstring to the following (assuming that the local server holds an instance of the name scastle)

connectionString="Data Source=.\scastle;Integrated Security=True;Initial Catalog=YourDBnameafterattachment providerName="System.Data.SqlClient"

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

Jens

Thanks for the response. I have tried adding the following in line with your advice but still get the same error:

<connectionStrings>

<add name="Personal" connectionString="Data Source=.\scastle;Integrated Security=True;Initial Catalog=Personal" providerName="System.Data.SqlClient"/>

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data Source=.\scastle;Integrated Security=True; Initial Catalog=ASPNetDB"/>

</connectionStrings>

Any idea what is wrong?

Thanks

Stephen

|||You should then also check of you enbled remote connections (see the screencast on my site for more information)

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Thanks again Jens.

Problem has been solved by changing Data Source from ".\scastle" to "(local)".

Stephen

Friday, February 10, 2012

Connection Problem - MSDE 2000 on Peer to Peer Network

I have MSDE installed on one of my computers in my peer to peer network (all
computers XP Professional). All computers on the network can see each
other. However, I cannot use Query Analyzer or Enterprise Manager to
connect to MSDE except from the computer that contains MSDE.
Is it possible to connect to MSDE using Query Analyzer etc, in this
scenario.
ThanksI'll be honest, I have yet to work with MSDE but here are some links that
may help
http://support.microsoft.com/defaul...kb;en-us;319930
http://support.microsoft.com/defaul...kb;en-us;325003
HTH
Ray Higdon MCSE, MCDBA, CCNA
--
"Sid Sarin" <sidsarin123@.earthlink.net> wrote in message
news:zByYb.9378$W74.78@.newsread1.news.atl.earthlink.net...
> I have MSDE installed on one of my computers in my peer to peer network
(all
> computers XP Professional). All computers on the network can see each
> other. However, I cannot use Query Analyzer or Enterprise Manager to
> connect to MSDE except from the computer that contains MSDE.
> Is it possible to connect to MSDE using Query Analyzer etc, in this
> scenario.
> Thanks
>|||By default, MSDE 2000 SP3 only has shared memory (LPC) enabled. To allow
connections from remote machines you have to enable TCP and/or named pipes
through the server network utility (svrnetcn.exe).
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.