2

I just build my first web-application in asp.net that connects to a local database. I got a weird problem.

The connection to the database works if i open the website BEFORE sql server after reboot. I can insert/read from the db from my webpage. But then sql server cant connect to the db. It looks like this then:

enter image description here

If i start sql server before the website then sql server works but the webpage doesnt work, visual studio then gives me this error:

enter image description here

Why are they interfering with each other and what can i do about it? I use visual studio 2010 and sql server 2008 R2.

4

1 に答える 1

1

Visual Studio 2010のサーバーエクスプローラーを介して接続を開こうとしましたか?Webブラウザーでページを表示するときはいつでも、サーバーエクスプローラーを介してデータベース接続を開くようにしてください。これは、起動するSQLサーバーの順序に関係なく機能します。

于 2012-08-02T16:43:28.180 に答える