Hi pls help i have uploaded the site files to the server and when i try it I get the following error:
I am using the Microsoft SQL Express as the database.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Invalid value for key 'attachdbfilename'.
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.ArgumentException: Invalid value for key 'attachdbfilename'.
Source Error:
Line 46:
Line 47: Public Shared Function ExecuteScalar(ByVal sql As String) As Object
Line 48: Dim cnn As SqlConnection = New SqlConnection(strConn)
Line 49: Dim cmd As SqlCommand = New SqlCommand(sql, cnn)
Line 50: cnn.Open()
Source File: C:\Inetpub\vhosts\ruralboy.co.za\httpdocs\App_Code\SqlHelper.vb Line: 48
Stack Trace:
[ArgumentException: Invalid value for key 'attachdbfilename'.]
System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +811724
System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2207
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +200
System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +62
System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
System.Data.SqlClient.SqlConnection..ctor(String connectionString) +24
DAL.SqlHelper.ExecuteScalar(String sql) in C:\Inetpub\vhosts\ruralboy.co.za\httpdocs\App_Code\SqlHelper.vb:48
Statsl.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\ruralboy.co.za\httpdocs\Stats.ascx.vb:8
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
I am using the Microsoft SQL Express as the database.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Invalid value for key 'attachdbfilename'.
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.ArgumentException: Invalid value for key 'attachdbfilename'.
Source Error:
Line 46:
Line 47: Public Shared Function ExecuteScalar(ByVal sql As String) As Object
Line 48: Dim cnn As SqlConnection = New SqlConnection(strConn)
Line 49: Dim cmd As SqlCommand = New SqlCommand(sql, cnn)
Line 50: cnn.Open()
Source File: C:\Inetpub\vhosts\ruralboy.co.za\httpdocs\App_Code\SqlHelper.vb Line: 48
Stack Trace:
[ArgumentException: Invalid value for key 'attachdbfilename'.]
System.Data.SqlClient.SqlConnectionString.VerifyLocalHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup) +811724
System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +2207
System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +200
System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value) +62
System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +4
System.Data.SqlClient.SqlConnection..ctor(String connectionString) +24
DAL.SqlHelper.ExecuteScalar(String sql) in C:\Inetpub\vhosts\ruralboy.co.za\httpdocs\App_Code\SqlHelper.vb:48
Statsl.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\ruralboy.co.za\httpdocs\Stats.ascx.vb:8
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627