Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Monday, March 19, 2012

Could not open a connection to SQL server error on Vista

Hey,

After install Visual Studio 2005 (with SQL sever express) on recent Vista build, trying to connect to a local sse database file from Data Source Window (accessible from Data/Show data source window) gives this error:


Microsoft Visual Studio

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

OK

No issues if we install Visual Studio 2005 on WinXP or W2k3.

Is there any configuration we need to set on vista to allow sql connection?

Thanks,

Mei

Not having tried Vista I don't know if there are special issues there, but by default SQL Server instances are installed with the external interfaces disabled. Use SQL Server Configuration Manager to enable the protocols (if they are not enabled already). This can also be done with the SQL Server Surface Area Configuration tool.

If this does not help, see my blog (www.betav.com\blog\billva)

|||

You will have to enable SQLBrowser service.

See more details here:

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

|||

I have the same problem. If you have found a solution to the problem, then let me know.

Kindly

Peer Larsen, DK

Could not open a connection to SQL server error on Vista

Hey,

After install Visual Studio 2005 (with SQL sever express) on recent Vista build, trying to connect to a local sse database file from Data Source Window (accessible from Data/Show data source window) gives this error:


Microsoft Visual Studio

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

OK

No issues if we install Visual Studio 2005 on WinXP or W2k3.

Is there any configuration we need to set on vista to allow sql connection?

Thanks,

Mei

Not having tried Vista I don't know if there are special issues there, but by default SQL Server instances are installed with the external interfaces disabled. Use SQL Server Configuration Manager to enable the protocols (if they are not enabled already). This can also be done with the SQL Server Surface Area Configuration tool.

If this does not help, see my blog (www.betav.com\blog\billva)

|||

You will have to enable SQLBrowser service.

See more details here:

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

|||

I have the same problem. If you have found a solution to the problem, then let me know.

Kindly

Peer Larsen, DK

Sunday, March 11, 2012

Could not load file or assembly 'System.Data.SqlServerCe'...

I am trying to use SQL Mobile 2005 with Visual Studio 2005. I have a simple sql mobile db i created and am trying to test connectivity to the DB in a simple app. I added the reference to the SqlServerCE and the verison # that is shown in properties is 3.0.3600.0, but when i look at the physical DLL in explorer (found at C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0) the version # is 3.0.5206.0, so when i compile and run the test, I get :
System.IO.FileLoadException: Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) > System.IO.FileLoadException: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).

I have uninstalled visual studio and reinstalled thinking I had a driver issue because I had beta products installed, but I get the same result. I am at a loss of what to do about this.
Hi Mike,

Which project you are working on?
PPC2003/PPC2005/SPH2005/WCE42/WCE50/WIN32

Also is it the device or emulator?

Can you try installing VS 2005 on a very clean machine (no uninstalls and installs) and see if it repros. Basically we want to figure out whether it is a setup issue or a functional issue.

Thanks,
Laxmi NRO, MSFT, SQL Mobile, Microsoft Coporation|||I seemed to have narrowed down the issue. I am using PPC 2005 btw.
The above error occurs if I am using the built in Unit Testing in Team Edition. If i strip out that stuff and just have a simple connection object (outside a test harness) it works fine. Has anyone been able to do TDD using win mobile and sql mobile 2005?|||

UT is not supported for devices, so the answer is no.

|||

Ilya Tumanov wrote:

UT is not supported for devices, so the answer is no.

well that is garbage. anyway, for this example i wasn't testing anything using mobile, just a simple sql mobile connection.|||

Hi,

I have developed a project for Pocket PC 2003 and when i install that to device HP 2200, then its shows error.

Error: File or Assembly : system.data.sqlserverce version 3.0.3600.0 Token No." " or one of its dependencies not found.

Please tell me how can i remove this error. I am using .Net 2.0 pocket pc 2003 for developing the project. Please send me the answer as soon as possible and at my ID thats given below......................................

Thanks

Shalabh Gupta

shalabhgupta16@.hotmail.com

shalabhgupta16@.yahoo.com

Could not load file or assembly

I am receiving the following message when I try to create an SSIS project in Visual Studio 2005 Team Suite:

Could not load file or assembly "Microsoft.AnalysisServices.Controls" Version=9.0.242.0, Culture=neutral, Public Key Token = 89845dcd8080cc91 or one of it's dependencies. Strong name validation failed (Exception from HRESULT: 0x8013141A)

Thank you

Larry Geiger

Have you installed the Workstation Components in addition to the Integration Services on this machine?

Thanks.

|||

Hi Bob

I installed the client programs on the Visual Studio Foundation Server DVDs and the Visual Studio Team Services programs. When I start up VS it says that I have SSIS, SSAS, and SSRS installed.

Thanks

Larry Geiger

|||It is just that these projects are registered in VS, but to actually use them you would need to install appropriate pieces of the SQL Server product.

Saturday, February 25, 2012

Could not establish connection to database

I am having a great deal of difficulty connecting my version of visual web developer 2005 express to the AspNetSqlProvider as stated in the tutorials online at the web developer center. I keep getting the error below.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

When I run the utility I still get a connection error using the hostname of my computer and windows authentication.

The setup failed message is as below also:-

"Setup failed.

Exception:
Unable to connect to SQL Server database.

-
Details of failure
-

System.Web.HttpException: Unable to connect to SQL Server database. > 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
End of inner exception stack trace
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"

I have tried some of the suggestions on the forum with no result

Please can you help

Do you in fact have a SQL Server installed?

If you installed SQL Server Express, the 'computer name' to use is probably [ .\SQLEXPRESS ]

Have you tried [ (local) ]

If you have NOT installed SQL Server, you can download (and then install) a free copy of SQL Server 2005 Express here.

|||

Thanks for the reply.

I do have SQL Server Express installed since I can open the configuration tool

|||

Arnie,

Thanks for the info again. I tried it using the aspnet_regsql tool and got a successfult database creation so that worked fine. The only problem now is that the Web Admin tool within Visual web Developer it is saying that the server path is

[Hostname]\John Brindle rather than [Hostname]\SQLEXPRESS which is what it needs to be I guess. Do you know how I change this so I can get a good connection test using the tool and thus be able to use the database with Visual Web Developer?

Regards

John

|||

I am facing the same problem but I have not installed SQL Server 2005 Express Edition

I have SQL Server 2005 Enterprise edition.

I have tried using the aspnet_regsql utility that creates the aspnetdb but I am unable to see its instance in tha app_dev folder

and I am unable to connect to it ...

Any suggestions ?

|||Sorry have no suggestions. My problem seems tro be more basic than even getting the database created which I can now do by specifiying [Hostname of my pc]\SQLEXPRESS as the server path. MY problem is I cannot do a test connection to the database and thuis use it.|||

I have the same problem, I'm using Windows Vista Home Premium, I can establish a connection from the Database Explorer but when using the ASP.NET configuration I get the message:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I have ran the aspnet_regsql and changed the host to <pcname>\sqlexpress but get the same exact error. Weird because I don't have that problem with my XP machine at work. Any suggestions?

thanks

|||

Ok, I found the solution for not beeing able to use SQL on the webdeveloper. The issue is that SQL Server (express or full version) does not allow user instances to be run by default, when trying to use the security option in webdeveloper a database file (.mdf) is created and a new user instances outside the server is created.

Ok, enough explanation, the solution: open sql management studio and open the master database, make a new query and type sp_configure 'user instances enabled','1' execute this , then type reconfigure and execute this too so the changes take effect. For more information on sp_configure you can read http://msdn2.microsoft.com/en-us/library/ms188787.aspx if you wish to list all the configuration then execute sp_configure without any parameters.

Hope it helps and good luck.

|||

AngelX, my last hope before I call Microsoft.

I'm running Vista and SQL 2005 Developer.

I don't have ' user instances enabled' to set?

Regards

Phil

|||

Phillip,

Open the Microsoft SQL Server Manager Studio (in my case I have the Manager Studio Express version), connect to you database and make a new query with your current connection, then execute the following sp_configure, in the query result tab a list like the following should appear:

Name

Minimum

Maximum

Config_value

Run_value

allow updates

0

1

0

0

clr enabled

0

1

0

0

cross db ownership chaining

0

1

0

0

default language

0

9999

0

0

max text repl size (B)

0

2147483647

65536

65536

nested triggers

0

1

1

1

remote access

0

1

1

1

remote admin connections

0

1

0

0

remote login timeout (s)

0

2147483647

20

20

remote proc trans

0

1

0

0

remote query timeout (s)

0

2147483647

600

600

server trigger recursion

0

1

1

1

show advanced options

0

1

0

0

user instances enabled

0

1

1

1

user options

0

32767

0

0

If you see the list then you're in business, type sp_configure "user instances enabled", 1 and execute this, then execute reconfigure so the changes take effect.

Hope it helps.

Could not establish connection to database

I am having a great deal of difficulty connecting my version of visual web developer 2005 express to the AspNetSqlProvider as stated in the tutorials online at the web developer center. I keep getting the error below.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

When I run the utility I still get a connection error using the hostname of my computer and windows authentication.

The setup failed message is as below also:-

"Setup failed.

Exception:
Unable to connect to SQL Server database.

-
Details of failure
-

System.Web.HttpException: Unable to connect to SQL Server database. > 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
End of inner exception stack trace
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"

I have tried some of the suggestions on the forum with no result

Please can you help

Do you in fact have a SQL Server installed?

If you installed SQL Server Express, the 'computer name' to use is probably [ .\SQLEXPRESS ]

Have you tried [ (local) ]

If you have NOT installed SQL Server, you can download (and then install) a free copy of SQL Server 2005 Express here.

|||

Thanks for the reply.

I do have SQL Server Express installed since I can open the configuration tool

|||

Arnie,

Thanks for the info again. I tried it using the aspnet_regsql tool and got a successfult database creation so that worked fine. The only problem now is that the Web Admin tool within Visual web Developer it is saying that the server path is

[Hostname]\John Brindle rather than [Hostname]\SQLEXPRESS which is what it needs to be I guess. Do you know how I change this so I can get a good connection test using the tool and thus be able to use the database with Visual Web Developer?

Regards

John

|||

I am facing the same problem but I have not installed SQL Server 2005 Express Edition

I have SQL Server 2005 Enterprise edition.

I have tried using the aspnet_regsql utility that creates the aspnetdb but I am unable to see its instance in tha app_dev folder

and I am unable to connect to it ...

Any suggestions ?

|||Sorry have no suggestions. My problem seems tro be more basic than even getting the database created which I can now do by specifiying [Hostname of my pc]\SQLEXPRESS as the server path. MY problem is I cannot do a test connection to the database and thuis use it.|||

I have the same problem, I'm using Windows Vista Home Premium, I can establish a connection from the Database Explorer but when using the ASP.NET configuration I get the message:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I have ran the aspnet_regsql and changed the host to <pcname>\sqlexpress but get the same exact error. Weird because I don't have that problem with my XP machine at work. Any suggestions?

thanks

|||

Ok, I found the solution for not beeing able to use SQL on the webdeveloper. The issue is that SQL Server (express or full version) does not allow user instances to be run by default, when trying to use the security option in webdeveloper a database file (.mdf) is created and a new user instances outside the server is created.

Ok, enough explanation, the solution: open sql management studio and open the master database, make a new query and type sp_configure 'user instances enabled','1' execute this , then type reconfigure and execute this too so the changes take effect. For more information on sp_configure you can read http://msdn2.microsoft.com/en-us/library/ms188787.aspx if you wish to list all the configuration then execute sp_configure without any parameters.

Hope it helps and good luck.

|||

AngelX, my last hope before I call Microsoft.

I'm running Vista and SQL 2005 Developer.

I don't have ' user instances enabled' to set?

Regards

Phil

|||

Phillip,

Open the Microsoft SQL Server Manager Studio (in my case I have the Manager Studio Express version), connect to you database and make a new query with your current connection, then execute the following sp_configure, in the query result tab a list like the following should appear:

Name

Minimum

Maximum

Config_value

Run_value

allow updates

0

1

0

0

clr enabled

0

1

0

0

cross db ownership chaining

0

1

0

0

default language

0

9999

0

0

max text repl size (B)

0

2147483647

65536

65536

nested triggers

0

1

1

1

remote access

0

1

1

1

remote admin connections

0

1

0

0

remote login timeout (s)

0

2147483647

20

20

remote proc trans

0

1

0

0

remote query timeout (s)

0

2147483647

600

600

server trigger recursion

0

1

1

1

show advanced options

0

1

0

0

user instances enabled

0

1

1

1

user options

0

32767

0

0

If you see the list then you're in business, type sp_configure "user instances enabled", 1 and execute this, then execute reconfigure so the changes take effect.

Hope it helps.

Could not establish connection to database

I am having a great deal of difficulty connecting my version of visual web developer 2005 express to the AspNetSqlProvider as stated in the tutorials online at the web developer center. I keep getting the error below.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

When I run the utility I still get a connection error using the hostname of my computer and windows authentication.

The setup failed message is as below also:-

"Setup failed.

Exception:
Unable to connect to SQL Server database.

-
Details of failure
-

System.Web.HttpException: Unable to connect to SQL Server database. > 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
End of inner exception stack trace
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"

I have tried some of the suggestions on the forum with no result

Please can you help

Do you in fact have a SQL Server installed?

If you installed SQL Server Express, the 'computer name' to use is probably [ .\SQLEXPRESS ]

Have you tried [ (local) ]

If you have NOT installed SQL Server, you can download (and then install) a free copy of SQL Server 2005 Express here.

|||

Thanks for the reply.

I do have SQL Server Express installed since I can open the configuration tool

|||

Arnie,

Thanks for the info again. I tried it using the aspnet_regsql tool and got a successfult database creation so that worked fine. The only problem now is that the Web Admin tool within Visual web Developer it is saying that the server path is

[Hostname]\John Brindle rather than [Hostname]\SQLEXPRESS which is what it needs to be I guess. Do you know how I change this so I can get a good connection test using the tool and thus be able to use the database with Visual Web Developer?

Regards

John

|||

I am facing the same problem but I have not installed SQL Server 2005 Express Edition

I have SQL Server 2005 Enterprise edition.

I have tried using the aspnet_regsql utility that creates the aspnetdb but I am unable to see its instance in tha app_dev folder

and I am unable to connect to it ...

Any suggestions ?

|||Sorry have no suggestions. My problem seems tro be more basic than even getting the database created which I can now do by specifiying [Hostname of my pc]\SQLEXPRESS as the server path. MY problem is I cannot do a test connection to the database and thuis use it.|||

I have the same problem, I'm using Windows Vista Home Premium, I can establish a connection from the Database Explorer but when using the ASP.NET configuration I get the message:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I have ran the aspnet_regsql and changed the host to <pcname>\sqlexpress but get the same exact error. Weird because I don't have that problem with my XP machine at work. Any suggestions?

thanks

|||

Ok, I found the solution for not beeing able to use SQL on the webdeveloper. The issue is that SQL Server (express or full version) does not allow user instances to be run by default, when trying to use the security option in webdeveloper a database file (.mdf) is created and a new user instances outside the server is created.

Ok, enough explanation, the solution: open sql management studio and open the master database, make a new query and type sp_configure 'user instances enabled','1' execute this , then type reconfigure and execute this too so the changes take effect. For more information on sp_configure you can read http://msdn2.microsoft.com/en-us/library/ms188787.aspx if you wish to list all the configuration then execute sp_configure without any parameters.

Hope it helps and good luck.

|||

AngelX, my last hope before I call Microsoft.

I'm running Vista and SQL 2005 Developer.

I don't have ' user instances enabled' to set?

Regards

Phil

|||

Phillip,

Open the Microsoft SQL Server Manager Studio (in my case I have the Manager Studio Express version), connect to you database and make a new query with your current connection, then execute the following sp_configure, in the query result tab a list like the following should appear:

Name

Minimum

Maximum

Config_value

Run_value

allow updates

0

1

0

0

clr enabled

0

1

0

0

cross db ownership chaining

0

1

0

0

default language

0

9999

0

0

max text repl size (B)

0

2147483647

65536

65536

nested triggers

0

1

1

1

remote access

0

1

1

1

remote admin connections

0

1

0

0

remote login timeout (s)

0

2147483647

20

20

remote proc trans

0

1

0

0

remote query timeout (s)

0

2147483647

600

600

server trigger recursion

0

1

1

1

show advanced options

0

1

0

0

user instances enabled

0

1

1

1

user options

0

32767

0

0

If you see the list then you're in business, type sp_configure "user instances enabled", 1 and execute this, then execute reconfigure so the changes take effect.

Hope it helps.