This article assumes that you are creating a public website for your SaaSGrid application, and you wish to take advantage of ASP.NET's Providers. This article talks about considerations to keep in mind when using these providers within a SaaSGrid application.

Recall that ASP.Net Providers provide an extensible way to perform common application tasks such as user authentication, role management, and more. Basic implementations of these providers exist, and many of them utilize your SQL Server Database to operate. An excellent way to get familiar with all of the ASP.Net Providers is to take a look at Microsoft's Provider Toolkit site. 

The tenant's website typically wouldn't use any of these providers because of SaaSGrid's built-in user, subscription, and role management capabilities, but they can be useful on a public website that require these capabilities.

There are two key considerations to always keep in mind not only when using these providers but also when writing any ASP.NET Web Application for SaaSGrid:

  • No direct database access: SaaSGrid applications are 3 tiers with a clear division between the presentation, business, and persistence layers. Your application's data access must be coordinated through the WCF services that make up your business layer.
  • No Microsoft SQL Server Client-specific Code: SaaSGrid uses its own client to handle database calls within the SaaSGrid cloud. Therefore, you must program your connectivity against ADO.NET Abstract classes (e.g. DbConnection, not SqlConnection).

These two considerations severely restrict which implementations of the included ASP.NET Providers you can use. For example, the SqlMembershipProvider cannot be used because it accesses the database directly, and its underlying implementation uses the SqlConnection class instead of the generic ADO.NET class.

Fortunately, Microsoft has introduced WCF-based Provider Services (which others have improved to address some limitations). Therefore, you can take advantage of the ASP.NET Provider Model in your ASP.NET application, and create a WCF Service with the appropriate logic as needed.