Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 08, 2012 07:55 AM by panchoLopez
Feb 03, 2012 06:20 AM|LINK
I'm trying to publish a web project and database using VS 2010. The project builds ok but when it connects to the server it doesn't upload the database.
This is pretty vague:
Error 3 Web deployment task failed.((03/02/12 11:12:43 AM) An error occurred when the request was processed on the remote computer.)
(03/02/12 11:12:43 AM) An error occurred when the request was processed on the remote computer.
The database '*******' could not be created.
Feb 03, 2012 09:14 AM|LINK
set the customErrors mode off in web.config file
<customErrors mode= "Off">
and try and show me the error what you are getting..
Feb 03, 2012 06:34 PM|LINK
There's probably a permissions issue creating the new database. Does the SQL credentials you've specified have CREATE DATABASE permissions? If not, you may need to have the database created for you (but empty) before publishing.
Feb 03, 2012 09:10 PM|LINK
Feb 03, 2012 09:16 PM|LINK
This is the error from the server:
unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
SQLExpress database file auto-creation error:
The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory. The provider attempted to automatically create the application services database because the provider determined that
the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[SqlException (0x80131904): 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)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009598
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) +341
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +129
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +270
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +5023255
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +31
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +76
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +82
[HttpException (0x80004005): Unable to connect to SQL Server database.]
System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +137
System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +94
System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +27
System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) +395
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Feb 08, 2012 07:05 AM|LINK
You can try stop the SQL service and to copy the mdf file to you remote server.Then use DataSource to create the connection string.
I think the problem may because you haven't get the correct connection string.
Feb 08, 2012 07:55 AM|LINK
Thanks, I couldn't get VS studio to publish, so I uploaded a backup.
That being said, the error I was getting was because I still had a reference to my localhost connection string in the membership section of my config file. Anyone else facing this error should give their web.config a thorough reading.
Turning the customerrors off on the server was helpful in figuring this out.