SQL Server Database deployed to a server to be used in a web app:

0

I am developing a web app...and instead of creating the web apps database using MySQL Databases from the provider. Can I just use the SQL Server Database that I can add to the site in Visual Studio? I vaguely remember this not working and I had to result to using the providers MySQL Database through the phpmyadmin.

I go this error.

The system cannot find the file specified Description: An 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.

Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified

Source Error:

Line 18: { Line 19: SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["userDataConnectionString"].ConnectionString); Line 20: conn.Open(); Line 21: string checkuser = "select count(*) from UserData where Username='" + TextBoxUN.Text + "'"; Line 22: SqlCommand com = new SqlCommand(checkuser, conn);

Source File: C:\inetpub\wwwroot\motorcity3d.com\www\Registration.aspx.cs Line: 20

Stack Trace:

[Win32Exception (0x80004005): The system cannot find the file specified]

[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: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)] System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager) +1431 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +1085 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +70 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +964 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +109 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1529 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +156 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +258 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) +312 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) +202 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +413 System.Data.SqlClient.SqlConnection.Open() +128 Registration.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\motorcity3d.com\www\Registration.aspx.cs:20 System.Web.UI.Control.OnLoad(EventArgs e) +106 System.Web.UI.Control.LoadRecursive() +68 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3062.0

mysql
database
asked on Stack Overflow Jul 22, 2018 by Jason Pietka • edited Jul 22, 2018 by Jason Pietka

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0