Microsoft SQL Server Express LocalDB should be used in place of the SQL Server Express user instance feature which is deprecated. It is more suitable for developers as it runs on-demand (instead as a service) with your Windows credential and without the need the need of complex configurations. In Visual Studio 2013, if you want to have it setup a default database using a SQL Server LocalDb in … [Read more...]
How to Setup User Access and Roles in Production SQL Server
Setting up ASP.NET membership and roles in development is very easy to do since out of the box, it's already configured to use the built-in SQL Server Express provider. To set it up, you just need to launch ASP.NET Web Site Administration Tool by clicking on ASP.NET Configuration icon in the Solution Explorer or choose the ASP.NET Configuration option from the Project menu. Once you … [Read more...]
Set Default Start Page to Web Forms on a Hybrid MVC and Web Forms Application
As one of ASP.NET developers ever asked to upgrade an existing ASP.NET WebForms 3.5 application to ASP.NET 4 and added ASP.NET MVC pages to it, I found the tip, Integrating ASP.NET MVC 3 into existing upgraded ASP.NET 4 Web Forms Applications from Scott Hanselman very helpful. After I followed all the steps provided, I was still baffled by the inconsistent behavior of the web app itself. When … [Read more...]
Map Model Classes to Differently Named Tables in Entity Framework
For a few days, I kept running into this minor but annoying issue using EF 4.2 with MVC3 where the web application refused to map a class (Profile) to an existing table (tblProfile) in a database [CPDB] and instead created a brand new table with the same name on a different database [CPDB.Domain.Entities.ProfileEntities]. What confused me even more was I did this step before for another class … [Read more...]