Warning: Creating default object from empty value in /home/agilemed/aendeavors.com/wp-includes/ms-load.php on line 138

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/agilemed/aendeavors.com/wp-includes/ms-load.php:138) in /home/agilemed/aendeavors.com/wp-content/plugins/amazon-product-in-a-post-plugin/amazon-product-in-a-post.php on line 102

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/agilemed/aendeavors.com/wp-includes/ms-load.php:138) in /home/agilemed/aendeavors.com/wp-content/plugins/amazon-product-in-a-post-plugin/amazon-product-in-a-post.php on line 102
Deploying SQL Compact Edition (CE) with ASP MVC and Castle ActiveRecord » Agile Tech

«

»

Jan
20

Deploying SQL Compact Edition (CE) with ASP MVC and Castle ActiveRecord


Warning: file_get_contents(https://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=AKIAILRMGOER5ORIOURA&AssociateTag=agile08-20&IdType=ASIN&ItemId=1430234040&Operation=ItemLookup&ResponseGroup=ItemAttributes%2CImages%2COffers&Service=AWSECommerceService&Timestamp=2017-03-29T11%3A06%3A47Z&Version=2009-03-31&Signature=B9K7qmOELvpJFtEAEjlRso%2BytsY6VMRgnO%2FLsZTdAmg%3D): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/agilemed/aendeavors.com/wp-content/plugins/amazon-product-in-a-post-plugin/inc/aws_signed_request.php on line 404

With the recent release of Visual Studio 2010 SP1 and its integration with IIS Express and SQL Compact Edition, we have been working to migrate our projects over to using both IIS Express and SQL CE for development. While the initial move can be a bit painful, it definitely saves a ton of startup time when changing development hardware or adding new developers. Scott Guthrie has a great blog post on getting SQL which details most of what is necessary. One initial hang up we noticed when migrating a project with Castle is making sure that the drivers get switched from Sql Server to SqlCE. When using SqlCE, you will need to add a reference and add “Copy to Local” to:

System.Data.SqlServerCe

In your Web.Config file, you can then change the the NHibernate driver and dialect:

<add key="connection.driver_class" value="NHibernate.Driver.SqlServerCeDriver" />
<add key="dialect" value="NHibernate.Dialect.MsSqlCeDialect" />

Finally, if your SqlCe database is located in App_Data of your web project, the connection string is:

<connectionStrings>
<add name="DatabaseService"
connectionString="Data Source=|DataDirectory|CEDBNAME.sdf"
providerName="System.Data.SqlServerCe.4.0" />
</connectionStrings>
** In the above connection string, |DataDirectory| will point to your App_Data folder

Leave a Reply

Your email address will not be published.


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>