Help Cannont connect into MSSQL 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.
3/13/2009 10:03:36 AM
Gravatar
Total Posts 4

Help Cannont connect into MSSQL database

Hi I'm a newbie in mojoPortal. I want to do the setup process but it seems that database file cannot be attached.

 

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

System.Data.SqlClient.SqlException: The database 'C:\USERS\PUBLIC\DOCUMENTS\KUNTUM\APP_DATA\DATABASE.MDF' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported. Could not open new database 'C:\USERS\PUBLIC\DOCUMENTS\KUNTUM\APP_DATA\DATABASE.MDF'. CREATE DATABASE is aborted. An attempt to attach an auto-named database for file C:\Users\Public\Documents\Kuntum\App_Data\Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 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)

Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.

3/14/2009 7:37:53 AM
Gravatar
Total Posts 18439

Re: Help Cannont connect into MSSQL database

Hi,

I know some applications put there database in the App_Data folder, but thats not something I do or have knowledge about. The error seems to indicate a version conflict like the db was maybe created in SQL 2008 Express and the server is running 2005, or something like that,it could be different levels of service paks in 2005. In any case I can't help much with that kind of connection, it may be possible but its not something I have knowledge of or experience with. I just use normal sql connections with server name, dbname, user, and password. Usually hosting companies provide a way to create a database and get the needed connection info. 

Best,

Joe

3/14/2009 10:18:56 AM
Gravatar
Total Posts 4

Re: Help Cannont connect into MSSQL database

My host server is qsh.es. It actually supports for Vis Std 2008.  Right now it can succesfully display the home page. But, I still have two problems

1. The skin does not want to load

2. I can't sign in as admin.

I'll give you the link

http://www.kuntum-indonesia.qsh.es/

Currently, I renamed web.config as web1.config, and web.mediumtrust as web.config. I don't use the user.config ( the file is still user.config.sample).

What some differences in web.mediumtrust and web.config?

 

 

 

3/14/2009 12:04:45 PM
Gravatar
Total Posts 4

Re: Help Cannont connect into MSSQL database

So currently I have this error.

Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

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:

[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.PipelineStepManager.ResumeSteps(Exception error) +929
System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) +91
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +508


Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

 

My connection string in user.config ( Yes, I now use user.config)

 

<add key="MSSQLConnectionString" value="server=.\SQLExpress;Integrated Security=True;User Instance=True;Database=kuntum-indonesia.qsh.es_c6cddea4-a191-4d0e-b30c-e85a55ece830
;AttachDBFilename=|DataDirectory|Database.mdf" />

 

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