Webservice til DB
Jeg har et GRANDE problem...Jeg er ved at lave en WebSerive i c# .Net som skal kontakte en database som ligger INDEN for mit netværk. Den skal hive noget data ud...
Min connection kode er:
string strConnection = "server=ServerNavn;" + "Trusted_Connection=yes; database=INtouch1";
myConnection = new System.Data.SqlClient.SqlConnection(strConnection);
myConnection.Open();
om fejl meddelsen er:
System.Data.SqlClient.SqlException: SQL Server findes ikke, eller adgang blev nægtet.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at prototype_INtouch.IntouchData.CreateConnection() in c:\inetpub\wwwroot\prototype_intouch\service1.asmx.cs:line 64
at prototype_INtouch.IntouchData.InitializeComponent() in c:\inetpub\wwwroot\prototype_intouch\service1.asmx.cs:line 42
at prototype_INtouch.IntouchData..ctor() in c:\inetpub\wwwroot\prototype_intouch\service1.asmx.cs:line 28
Er der nogen der har et clue om hvad der kan være galt? De linier som henvises til i fejlmeddelsen er de linier i koden som har med Connection at gøre.