2012-04-13 12 views
5

初めてasp.netアプリケーションをデプロイするときです。私はつまり、展開パッケージをビルドするときasp.net Webアプリケーションをデプロイする際の問題

はプロジェクトを右クリックして、私は次のエラーを取得する「展開パッケージをビルドする」を選択:

Error 1 Web deployment task failed.(Object of type 'dbFullSql' and path 'Data Source=.\SQLEXPRESS;AttachDbFilename=C:\JP\ASP\eTracking\test\App_Data\aspnetdb.mdf;Integrated Security=True;User Instance=True' cannot be created.)

Object of type 'dbFullSql' and path 'Data Source=.\SQLEXPRESS;AttachDbFilename=C:\JP\ASP\eTracking\test\App_Data\aspnetdb.mdf;Integrated Security=True;User Instance=True' cannot be created.

Cannot connect to the database 'C:\JP\ASP\eTracking\test\App_Data\aspnetdb.mdf'. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 0 0 eTracking

誰もがこれを支援することができます..私は出て意味をなすことはできませんそれはオンラインで解決策を見つけられないようです。

Ok Managed to solve the problem.

In the properties window under the Package/Publish SQL untick the "Pull data and/or schema from an existing database" as well as the "Auto-generated Schema and Data" in the grid.

+0

[OK]問題を解決するために管理しました。 – vitalix

答えて

0

エラーメッセージはかなり簡単ですが、アプリケーションでローカルに接続されたデータベースを使用しているようです。これはパッケージャでは機能しません。サーバーデータベースへのデータベースアクセスを変更するか、アプリケーションにmdfファイルを含める必要があります。

+0

私はSQL Server 2008でデータベースを使用していますが、他のデータベースは接続されていませんが、Visual Studioで処理しているようです。私はwebconfigファイルに行って削除: "AttachDBFilename = | DataDirectory | \ aspnetdb.mdf"しかし、私はまだ展開のためにビルド時に同じエラーが発生します – vitalix

+1

OK管理して問題を解決してください。 Package/Publish SQLの下のプロパティウィンドウで、グリッド内の「自動生成されたスキーマとデータ」と同様に、「既存のデータベースからスキーマおよび/またはスキーマを取得する」のチェックを外します。 – vitalix

+0

私はあなたがそれを働かせることができてうれしいです。 – IAmTimCorey

1

作業:「パッケージ/パブリッシュSQL」の下のプロパティウィンドウで、「自動生成されたスキーマおよびデータ」と同様に、「既存のデータベースからスキーマおよび/またはスキーマを引き出す」チェックボックスをオフにして、 "

関連する問題