Bite my bytes

What I learn by day I blog at night.

  Home :: Contact :: Syndication  
  791 Posts :: 3948 Comments :: 235 Trackbacks

Search

Recent Comments.

Recent Posts

Most popular posts
in last 30 days

Categories

My Projects

Archives

Stuff


Copyright © by David Vidmar
 
Contact me!
 
LinkedIn Profile
 
 

While preparing for one of my presentations an NT Konferenca 2007 titled "Pocket database: Microsoft SQL Server 2005 Compact Edition" I did some googling on the subject of running Microsoft SQL Server 2005 Compact Edition (formerly "Compact", formerly "Mobile", formerly "CE") under ASP.NET which by default results in error "SQL Server Compact Edition is not intended for ASP.NET development".

There are various blog posts around the web stating different things that aren't true, at least not with latest RTM version of SQL2005CE:

  • Dan, Roger and Anonymous Commenter say you should set "SqlServerCompactUnderWebHosting" but it doesn't work with RTM.
  • Steve says you should set "SqlServerEverywhereUnderWebHosting" - also doesn't work with RTM.

The right setting is "SQLServerCompactEditionUnderWebHosting". So, just put

AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);

in your code and you are go.

This was found on relatively unrelated MSDN page called Deployment Considerations. I was ready to go digging with Reflector but I was lucky with Google just before I did that. Looks Geoff was not that lucky

Posted on Thursday, April 19, 2007 3:30 PM | Filed under: Developement |

 

Feedback

# re: SQL Server 2005 Compact Edition and ASP.NET 4/21/2007 12:00 AM Munir
top

# re: SQL Server 2005 Compact Edition and ASP.NET 5/9/2007 10:04 AM maxime lamure
Great, thanks for this tip.

# re: SQL Server 2005 Compact Edition and ASP.NET 6/16/2007 6:01 AM Miguel Madero
Wow this was really helpful!!!
:D



# re: SQL Server 2005 Compact Edition and ASP.NET 3/10/2008 4:45 AM Cotfas Liviu
Thank you! :)

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 4 and 6 and type the answer here: