5

This the first time I'm deploying an asp.net application.

When I Build the deployment package i.e. right click on the project and select "Build Deployment Package" I get the following error:

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

Can anyone help with this.. I can't make sense out of it and can't seem to find a solution online.

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.

1
  • Ok Managed to solve the problem. Commented Apr 13, 2012 at 2:49

2 Answers 2

1

worked: "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. "

Sign up to request clarification or add additional context in comments.

Comments

0

It looks like the error message is pretty straightforward - you are using a locally-attached database in your application. This won't work with the packager. You need to change the database access to a server database or you need to include the mdf file in your application.

2 Comments

I'm using a database on SQL Server 2008, I have not attached any other database to it, seems to be something that Visual Studio is doing. I've gone into the webconfig file and removed: "AttachDBFilename=|DataDirectory|\aspnetdb.mdf" but I still get the same error when building for deployment
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.