Error while running the sample application.

156 views
Skip to first unread message

Adriano Machado

unread,
Feb 16, 2012, 12:19:36 PM2/16/12
to sharp...@googlegroups.com
I'm receiving the following error while trying to run the sample application:

"At least one ISessionFactory has not been registered with IoC".

I've already checked that Global.asax.cs is bootstrapping the needed DependencyResolver, but it seems that StructureMap is not being hooked.

Can someone help me?

ernonewman

unread,
Feb 20, 2012, 2:43:59 PM2/20/12
to S#arp Lite
Hi, the error is a bit of a red herring, took me a while to figure it
out as well but the answer is simple in the end, you need to set up
the database. The needed code is located at '\app\MyStore.DB\schema
\UnitTestGeneratedSchema.sql'. It's for SQL Server 2008 but I managed
to get it to run using SQL Server Compact 4 with a little tweaking.

GHS

unread,
Feb 20, 2012, 6:13:49 PM2/20/12
to S#arp Lite
Have you installed MVC4 on you machine? If yes, check reference in
Init project, it references MVC4 whereas Web project references MVC3.

Krokonoster

unread,
Jul 13, 2012, 2:14:37 AM7/13/12
to sharp...@googlegroups.com
For in case someone else run into this as well, and the MVC4 references is not the problem (was mine the first time)

I must have accidently dragged my Global.asax into my Views folder (no idea, don't ask) and that gave me exactly the same error.  :-)

Reply all
Reply to author
Forward
0 new messages