Re: ASP.NET / SQLCE
I have used SQL CE for an ASP.NET website for years without any problems whatsoever. Can't comment on the Linq as I've never used it. On 26/08/2010 6:53 PM, Matt Siebert wrote: Hi all, Besides the "SQL Server Compact is not intended for ASP.NET development" exception (which can be worked around as suggested here), is there any reason not to use SQLCE in a small ASP.NET project? I'm a total ASP.NET / IIS noob andI have to do a bit of customisation to a pre-built .NET 2.0 asmx web service. The service currently uses an MS Access .mdb (which seems odd - I thought SQLCE was meant to replace Access for these kinds of applications). My customisations need to do some data access (not a lot though) and I'd like to use LINQ to SQL for this if possible.Obviously I'm not storing a lot of data, and I'm only looking at Compact Edition since the hosting provider isn't keen on full SQL Server / Express... Is SQLCE a bad way to go? Is LINQ to SQL not a good idea? Should I try to convince the hosting provider to give me SQL Express? Thanks all.
RE: ASP.NET / SQLCE
Hi Matt, that warning about not for ASP.NET development is rather scary when you first see it. I get the feeling that there was going to be some artificial political restraints on how SQL CE could be used, but they changed their mind and that workaround was made public (or vice versa). I've been using SQL CE as the lightweight backend of some ASP.NET apps and WCF services for over a year now, some in production use and working well. As I said earlier in the year, I quite like SQL CE, it has a kind of simple clarity and neatness that I admire. Personally, I hate bloatware, so I love liteware. So long as a single thread is accessing the CE database you'll be fine, so don't forget to keep it structured that way. Whereas LINQ to SQL generates entity classes for you (I've never used that in production), I think you'll have to get the same effect by running SqlMetal utility manually over the CE database. But I've never bothered to do that either, I just drop CE tables in the VS designer and make strongly typed DataSets which pass data up and down using classic ADO.NET techniques. People heap scorn on XSD generated DataSets, but when used with classic ADO.NET and SQL CE I reckon they make a nice lite solution. Incidentally, for your use, even an Access MDB might be acceptable. Sorry I haven't really answered your question, other to say I'm happy with SQL CE in web apps. I don't like LINQ to SQL as it never used to scale across tiers very well. Greg
Re: ASP.NET / SQLCE
Thanks for the info guys. This makes me less nervous about using SQLCE in this context. SqlMetal is definitely required for SQLCE, but if you're generating DBML then you can still use the design surface in VS (just have to generate the DBML manually first). I'm happy to use LINQ to SQL here as there is no need to send the data across tiers, and I've had a few bad experiences in the past with refactoring strongly typed datasets (probably my fault for not quite fully understanding the details). Cheers. On Thu, Aug 26, 2010 at 8:18 PM, Greg Keogh g...@mira.net wrote: Hi Matt, that warning about “not for ASP.NET development” is rather scary when you first see it. I get the feeling that there was going to be some artificial political restraints on how SQL CE could be used, but they changed their mind and that workaround was made public (or vice versa). I’ve been using SQL CE as the lightweight backend of some ASP.NET apps and WCF services for over a year now, some in production use and working well. As I said earlier in the year, I quite like SQL CE, it has a kind of simple clarity and neatness that I admire. Personally, I hate bloatware, so I love liteware. So long as a single thread is accessing the CE database you’ll be fine, so don’t forget to keep it structured that way. Whereas LINQ to SQL generates entity classes for you (I’ve never used that in production), I think you’ll have to get the same effect by running SqlMetal utility manually over the CE database. But I’ve never bothered to do that either, I just drop CE tables in the VS designer and make strongly typed DataSets which pass data up and down using classic ADO.NET techniques. People heap scorn on XSD generated DataSets, but when used with classic ADO.NET and SQL CE I reckon they make a nice “lite” solution. Incidentally, for your use, even an Access MDB might be acceptable. Sorry I haven’t really answered your question, other to say I’m happy with SQL CE in web apps. I don’t like LINQ to SQL as it never used to scale across tiers very well. Greg
ASP.NET designer errors gotcha
Just a heads-up ... I found that many of my aspx pages would not open in the VS2010 designer due to all child controls appearing as red blocks with object reference not set null errors. It seems that VS2010 is calling the Init method when in the designer, this might be a bug, but it seems to be revealed by my old original code that was generated back in VS2005 (or maybe even VS2003!). Back then it would generate a #region with override OnInit and add the button click handlers. I debug attached a second VS2010 and it showed that the button control reference was null in this OnInit override. I had to move all of the +=Click add handler lines into the Page_Load method and it all comes good. Greg
NetSqlAzMan
I am starting out with NetSqlAzMan and when I tried the Check Access Test with domain user account (not my own) it fails with an 'Incorrect function' As far as I can tell the access check test is using Kerberos Protocol Transition var otherLogin = WindowsIdentity(Domain Account); It fails at this call with System.Security.SecurityException was unhandled, Message=Incorrect function.\r\n NetSqlAzMan enables one to log to the EventLog and I found entries like this snip Authentication Package: Kerberos Workstation Name: FB20562 Status code: 0x80090302 /snip I have Googled and found lots of references to 0x80090302. However I did not find anything useful to myself. There is a HotFix for this issue if you are running Vista at http://support.microsoft.com/kb/969083/ I am not using Vista, and until they upgrade to Win7, I am stuck with XP Pro SP3. The DC is on Win Server 2008. Has anyone had similar issues like this? With the number of people still using XP, I am certain that others will have experienced this problem. Is there a fix for XP? I have also posted on the NetSqlAzMan Codeplex page but I thought that if I post here someone may have found the appropriate hotfix. Regards Peter Maddin Applications Development Officer PathWest Laboratory Medicine WA Phone : +618 9473 3944 Fax : +618 9473 3982 E-Mail : peter.mad...@pathwest.wa.gov.au The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately.