ASP.NET4 Error in web.config and now with database

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
12/26/2010 12:22:58 PM
Gravatar
Total Posts 5

ASP.NET4 Error in web.config and now with database

At first, I set up the web.config correctly and got 500 internal server error.I'm using godaddy in medium trust for hosting. After some research, I found that I have to comment out or remove the Group that contains System.web.extensions.

So now we've moved on to actually seeing the mojoportal setup. This is where it stopped:

File system permissions ok.
The system cannot connect to the MSSQL database. Please check your connection string.

System.Data.SqlClient.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) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at mojoPortal.Data.DBPortal.DatabaseHelperGetConnectionError(String overrideConnectionInfo)

 

My connection string is correct. My database is set to to direct-access. I can access it from SQL Server Management studio. Here is the last thing from the error logs:

2010-12-26 11:03:09,342 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
System.Data.SqlClient.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)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at mojoPortal.Data.SqlParameterHelper.DiscoverParameters(String connectionString, String procName)
at mojoPortal.Data.SqlParameterHelper.GetParameters(String connectionString, String procName)
at mojoPortal.Data.SqlParameterHelper.InitializeArray()
at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt)
at mojoPortal.Data.DBSiteSettings.GetSite(String hostName)
at mojoPortal.Business.SiteSettings.GetSiteSettings(String hostName)
at mojoPortal.Business.SiteSettings..ctor(String hostName)
at mojoPortal.Business.WebHelpers.CacheHelper.LoadSiteSettings() 

 

Could this be some sort of bug that prevented me from using asp.net4 in the first place? Here is the url to the bug:

http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770149

12/26/2010 12:56:12 PM
Gravatar
Total Posts 5

Re: ASP.NET4 Error in web.config and now with database

Need feature to be able to edit post.

Update: I switched to mysql and it worked. What could have been the problem with mssql?

12/28/2010 8:53:34 AM
Gravatar
Total Posts 18439

Re: ASP.NET4 Error in web.config and now with database

There is already a feature to edit posts, see the pencil icon next to your post.

Your original error indicated a problem with your connection string, specifically it said the instance name of the database was not correct, maybe you had \SQLExpress as the instance name and that needed to be removed.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.