code directory and .bak file

Topics: General
Jun 1 at 4:58 PM
I have an Orchard project and .bak database, created by another programmer and who has since left and is not available for support or assistance. My job is to get that project up and running on my system and modify it and load it up to an internet server.

I've used WebMatrix to download and create a new Orchard project. Works fine. When I point WebMatrix to the source code for the project, it fails. I assume it fails because I have not loaded the .bak file into a database. The project I want to get up and running supposedly used MS SQL Server Compact edition and is the latest and greatest version of Orchard.

How do I load the .bak file for this project? Preferably only using WebMatrix since I don't have all of the database tools available and I have no idea what to do with connection strings, etc. I do have an admin username and password for the website but I do not know if that same username/password is what is used for the database.

Any assistance is appreciated. Thanks.
Developer
Jun 1 at 10:21 PM
Are you sure the .bak file is created from a SQL CE database? Typically, a .bak file is created when creating a backup from a SQL Server database. If it were a SQL CE database, the developer would have simply given you the .sdf file.

Assuming the .bak file is in fact a SQL Server database backup file, the only way I know of to restore it is using a SQL Server installation (you can probably do with the free version called SQL Server Express).

Once you have the .bak file restored as a SQL Server Database, you can update your connection string which you'll fine in the Settings.txt file in App_Data/Sites/Default to point to the database.

When you mentioned WebMatrix fails, what error do you see?
Jun 2 at 6:40 AM
The error I got was:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /

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

A pretty generic error, could mean a lot of things.

I played around a bit with SQL Server and SQL Server Management Studio. I tried to create a database from that .bak file and it failed (I found instructions on how to do that from googling it).

So I think I'm stuck for now. I'm going to try to get a new set of files and more complete set of instructions on how those files were created. See if it was SQL Server or Compact (there was a .sdf file in the directory with the code and the .config files seemed to indicate it was using Compact). I have an email to the programmer who created this, hope I get a response tomorrow.
Developer
Jun 2 at 9:16 AM
Ok. Make sure to check the log files in the App_Data/Logs folder. It will probably show a SQL connection error with some more details.
Jun 3 at 6:01 AM
From SQL Server Management Studio, I created an empty database and tried to restore the .bak file and it failed. Here is the info that was generated:

TITLE: Microsoft SQL Server Management Studio

Specified cast is not valid. (SqlManagerUI)


Microsoft SQL Server Management Studio 10.50.2500.0
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML 3.0 4.0 5.0 6.0
Microsoft Internet Explorer 9.11.9600.18314
Microsoft .NET Framework 2.0.50727.5485
Operating System 6.1.7601

Could it be that we have different versions of SQL Server and/or SQL Server Management Studio?

Thanks for any help or suggestions.