YAFLogo

Trickstar
  • Trickstar
  • 50.2% (Neutral)
  • YAF Lover Topic Starter
13 years ago
I am trying to install the forum in but the forum is having problems with the MSSQL thing. The software found and identified it and started writting into it but whenever I test the connection or try to install it there is an error message (the following). Pretty much when I test it it says this part: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server. According to the exact error the problem was to check if the remote access was enabled, which I made sure that it was (3 times of trying it) and I still get this error. Can I get any help on this issue please? I don't know what it means by verify the instance name and the only page that ends up with a stack trace error so far

is the part that says "Upgrade Database" after I click next.

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

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.Data.SqlClient.SqlException: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

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.

Stack Trace:

[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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5061946

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234

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) +239

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) +185

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33

System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524

System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66

System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479

System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108

System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126

System.Data.SqlClient.SqlConnection.Open() +125

YAF.Classes.Data.MsSqlDbConnectionManager.get_OpenDBConnection() +39

YAF.Classes.Data.LegacyDb.system_initialize_fixaccess(Boolean grant) +62

YAF.Install._default.UpgradeDatabase(Boolean fullText) +48

YAF.Install._default.Wizard_NextButtonClick(Object sender, WizardNavigationEventArgs e) +1290

System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) +115

System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +413

System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37

System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +125

System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +167

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563


Sponsor
squirrel
13 years ago
You need to check your db.config - your SQL Server settings are not correct. You must provide in your db.config the proper information such as server name, username, password, and database name to use in order to connect to the SQL server. Without that, YAF will not be able to install, let alone run.

You will have to either get this information from your SQL Server (if you manage your own server) OR obtain the connection information from your hosting provider.


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Trickstar
  • Trickstar
  • 50.2% (Neutral)
  • YAF Lover Topic Starter
13 years ago

Is the only line that the installation told me to add to the . (ExampleSQLDatabaseName takes place of my actual value for privacy purposes, I have the actual name in that space) So what else do I need to put into the file?


tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
13 years ago

Is the only line that the installation told me to add to the . (ExampleSQLDatabaseName takes place of my actual value for privacy purposes, I have the actual name in that space) So what else do I need to put into the file?

Originally Posted by: Trickstar 

The connection String is incorrect Source is the SQL Server imstande Name Not the dB Name And Initial Catalog Would be the value for the database name.

When you launch the install wizard there is a page where you can test your connection string

squirrel
13 years ago

Is the only line that the installation told me to add to the . (ExampleSQLDatabaseName takes place of my actual value for privacy purposes, I have the actual name in that space) So what else do I need to put into the file?

Originally Posted by: Trickstar 

<add name="yafnet" connectionString="server={server_name_or_IP};User Id={username};Password={password};Trusted_Connection=False;database={database_name}" />

Replace all information in braces, and eliminate the braces.

The above works on a SQL 2008 Server running under a Windows 2008 R2 server. 99% of the time, this will work in other configurations...


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
squirrel
13 years ago
I was replying when you were, tha_watcha -- sorry bout that 🙂 Didn't mean to post-stomp you 🙂
If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Trickstar
  • Trickstar
  • 50.2% (Neutral)
  • YAF Lover Topic Starter
13 years ago

Is the only line that the installation told me to add to the . (ExampleSQLDatabaseName takes place of my actual value for privacy purposes, I have the actual name in that space) So what else do I need to put into the file?

Originally Posted by: tha_watcha 

The connection String is incorrect Source is the SQL Server imstande Name Not the dB Name And Initial Catalog Would be the value for the database name.

When you launch the install wizard there is a page where you can test your connection string

Originally Posted by: Trickstar 

Ok, then what is the data source?


Trickstar
  • Trickstar
  • 50.2% (Neutral)
  • YAF Lover Topic Starter
13 years ago

Is the only line that the installation told me to add to the . (ExampleSQLDatabaseName takes place of my actual value for privacy purposes, I have the actual name in that space) So what else do I need to put into the file?

Originally Posted by: squirrel 

<add name="yafnet" connectionString="server={server_name_or_IP};User Id={username};Password={password};Trusted_Connection=False;database={database_name}" />

Replace all information in braces, and eliminate the braces.

The above works on a SQL 2008 Server running under a Windows 2008 R2 server. 99% of the time, this will work in other configurations...

Originally Posted by: Trickstar 

I did what you said and tested the connection but I still get:

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


squirrel
13 years ago
That error means your server name is incorrect. ASP.NET cannot find your server under the name you provided. You will have to figure out what the proper address or name of the SQL server is.

Are you on a dedicated server hosting your own SQL server or are you on a shared server? If it's a shared server, you need to find out from your hosting provider the name or IP of your SQL server. If you're on a dedicated server, you need to verify that you have SQL Server properly installed and configured to accept connections...


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
squirrel
13 years ago
Additionally, you need to make sure any other '' lines are either commented out or removed completely from the db.config file. You can only have one actual connection inside your db.config -- extra connection lines that are not commented out or removed will also cause connection errors.


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
wreggg
  • wreggg
  • 50.2% (Neutral)
  • YAF Forumling
13 years ago

Additionally, you need to make sure any other '' lines are either commented out or removed completely from the db.config file. You can only have one actual connection inside your db.config -- extra connection lines that are not commented out or removed will also cause connection errors.

Originally Posted by: squirrel 

thanks - all is understandable 🙂


i love blogs ... 🙂
Trickstar
  • Trickstar
  • 50.2% (Neutral)
  • YAF Lover Topic Starter
13 years ago
Thanks the SQL part works, but the mail part I have a problem with (which is also a problem with applications I've developed myself) is that I can get the SMTP address that I get from my server (I use a sub division of godaddy) which is smtp.secureserver.net but that only works to send emails to addresses on my site (admin@mysite.com) but if I try to send to something like yahoo or gmail it will say server rejected the address, and it says it when I do the same thing for the YAF software, do you have any suggestions on what im supposed to do?

EDIT: I just tried doing the upgrade database part ignoring the errors with emails to see if it will install and I keep getting this error:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_BBCode_Board". The conflict occurred in database "budgetwebforum", table "dbo.yaf_Board", column 'BoardID'.

The statement has been terminated.

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.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_BBCode_Board". The conflict occurred in database "budgetwebforum", table "dbo.yaf_Board", column 'BoardID'.

The statement has been terminated.

Any way of resolving this?


bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
13 years ago
Use forum search.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
13 years ago

Thanks the SQL part works, but the mail part I have a problem with (which is also a problem with applications I've developed myself) is that I can get the SMTP address that I get from my server (I use a sub division of godaddy) which is smtp.secureserver.net but that only works to send emails to addresses on my site (admin@mysite.com) but if I try to send to something like yahoo or gmail it will say server rejected the address, and it says it when I do the same thing for the YAF software, do you have any suggestions on what im supposed to do?

EDIT: I just tried doing the upgrade database part ignoring the errors with emails to see if it will install and I keep getting this error:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_BBCode_Board". The conflict occurred in database "budgetwebforum", table "dbo.yaf_Board", column 'BoardID'.

The statement has been terminated.

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.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_BBCode_Board". The conflict occurred in database "budgetwebforum", table "dbo.yaf_Board", column 'BoardID'.

The statement has been terminated.

Originally Posted by: Trickstar 

Any way of resolving this?

ON NEW INSTALL PLEASE DON'T CHECK "Upgrade BBCode Extensions...".

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
13 years ago

Thanks the SQL part works, but the mail part I have a problem with (which is also a problem with applications I've developed myself) is that I can get the SMTP address that I get from my server (I use a sub division of godaddy) which is smtp.secureserver.net but that only works to send emails to addresses on my site (admin@mysite.com) but if I try to send to something like yahoo or gmail it will say server rejected the address, and it says it when I do the same thing for the YAF software, do you have any suggestions on what im supposed to do?

EDIT: I just tried doing the upgrade database part ignoring the errors with emails to see if it will install and I keep getting this error:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_BBCode_Board". The conflict occurred in database "budgetwebforum", table "dbo.yaf_Board", column 'BoardID'.

The statement has been terminated.

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.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_BBCode_Board". The conflict occurred in database "budgetwebforum", table "dbo.yaf_Board", column 'BoardID'.

The statement has been terminated.

Originally Posted by: tha_watcha 

Any way of resolving this?

Originally Posted by: Trickstar 

ON NEW INSTALL PLEASE DON'T CHECK "Upgrade BBCode Extensions...".

Ingo, can you disable this feature if it's a new install?