This project has moved. For the latest updates, please go here.

Setup problems...

Nov 21, 2014 at 2:35 PM
Let me start by saying that I've been a .net programmer since the beginning days of .net however this whole mvc thing is still very new to me and quite honestly, very confusing.. Also, I've never seen this method of sql connections and it didn't work for me. I ended up attaching the db to my 2k8r2 instance and modifying the connection strings to point to it and gave it a username and password of an account with db_owner permissions. I can now get to the homepage without an error but now no matter what I do, I get an error about login.aspx:

No exports were found that match the constraint:
ContractName login.aspx
RequiredTypeIdentity System.Web.Mvc.IController

I really want to try your system and appreciate your effort but the setup documentation is definitely quite lacking as you can not just copy the contents of the zip file to a folder and execute the application as it states. At the very least, it has no clue where to find the mdf file and I'm assuming "|DataDirectory|" must be replaced with the path to it however that was not stated in the quick setup guide... I don't want to sound negative, it's just that it's a little frustrating when the quick setup makes it sound so quick and easy when it's only quick and easy if you know about a few key steps that were not stated. Anyway, thanks again for your efforts and I'm sure once I get up and running, it'll be well worth my time and effort!
Coordinator
Nov 21, 2014 at 4:23 PM
I forgot to update the quick start documentation when I created the last pre-compiled release.

Previous releases were built for SQL Server Express 2008 R2 (file-attached databases). The current release has been updated to use SQL 2012 LocalDb instead. I've updated the quick setup instructions to reflect the change, but my apologies for not having done so before.

I've always tried to make sure TicketDesk's default configuration was the same those used by current shipping version of Visual Studio. If you have a standard install of Visual Studio, you should be able to just copy and run the application without making any changes at all. Visual Studio 2012 and 2013 use SQL 2012 LocalDB by default, so that's how TicketDesk 2.1 ships.

With SQL 2012 and 2014, user file-attached databases are only supported in the LocalDB edition. SQL Express 2012 and 2014 still exist, but no longer allow file based databases.

The connection strings should not need modification, assuming that you have a standard install of LocalDB on the machine where you are running ticketdesk. The |DataDirectory| part of the connection string is how asp.net maps to database files in the App_Data folder of the website, which is where the stock database files live.

If you open Visual Studio 2012 or 2013, and create a new asp.net project, you will get connection strings that look just like these --they will reference (localdb)/v11.0 and the path will use |DataDirectory|. That's not new to localdb, since asp.net with SQL Express 2005 and 2008 also used the |DataDirectory| shortcut. In code, |DataDirectory| is the same as:
var path = System.AppDomain.CurrentDomain.GetData("DataDirectory");
The TicketDeskEntities connection string is ugly, but it is also in the standard format used in Entity Framework 4. I really hated EF 4 connection strings, but towards the middle of the mess is a property called "provider connection string". That part should look exactly like a regular connection string... and it should ideally match the TicektDeskSecurityConnectionString exactly.

Fortunately, newer versions of EF with Code-First models use regular connection strings without all that extra garbage in them.

You can of course use just about any version of SQL server you want to, express or not. Depending on what version and if it supports file-attached databases, you may have to manually create the database from the scripts, or manually attach the mdf file from the app_data folder.

I honestly do not know if the mdf file that ships with TicketDesk 2 currently are still compatible with SQL 2008 editions... but if you try to attach the mdf through SQL Management Studio, you will get an error immediately if it isn't --in which case you can just create the DB from the scripts.