W
weird0
I have written a webservice locally, and upon consuming or testing it
in the explorer there is a problem.
It throws the following exception:
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).
I think the problem seems to be with the connection string. Here is
it:
public static string connectionString = @"server=amirdiwan;database=|
DataDirectory|\BankingDb.mdf;";
I havent sepcifed the exact directory as the db lies my desktop
folder. Should i write that instead of just DataDirectory? Should I
write the servername as "amirdiwan" which i got from hostname from my
console or "localhost" which is the name of the webreference that i
added?
Please, somebody rephrase my connection string.....
Would be grateful.
in the explorer there is a problem.
It throws the following exception:
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).
I think the problem seems to be with the connection string. Here is
it:
public static string connectionString = @"server=amirdiwan;database=|
DataDirectory|\BankingDb.mdf;";
I havent sepcifed the exact directory as the db lies my desktop
folder. Should i write that instead of just DataDirectory? Should I
write the servername as "amirdiwan" which i got from hostname from my
console or "localhost" which is the name of the webreference that i
added?
Please, somebody rephrase my connection string.....
Would be grateful.