Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8401871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:54:48+00:00 2026-06-09T21:54:48+00:00

We have a database of ASP.net sqlMembershipProvider based users on an Azure SQL database.

  • 0

We have a database of ASP.net sqlMembershipProvider based users on an Azure SQL database. It has become apparent that the out of the box sqlMembershipProvider 4.0 does not have the required retry logic for Azure SQL connections which can drop out due to throttling or can expire.

It is possible to implement our own membership provider that has this functionality but it would have to be exactly the same database interactions as the standard sqlMembershipProvider 4.0 in order to work with the existing users in our database. However for that it would require looking into the source of the original sqlMembershipProvider 4.0, this code has not been released into the open since version 2.0 so my question is:

What is the lowest effort way to get retry logic into the sqlMembershipProvider? And or would that be reflecting the code of sqlMembershipProvider 4.0 in System.web.security.sqlMembershipProvider and creating a custom membershipProvider that has the same functionality as the sqlMembershipProvider but uses retry logic such as that of Microsofts TransientFaultHandling ReliableSqlConnection? Would it be legal to do such a thing (reflecting and creating similar code but with added functionality) given Microsoft’s license for asp.net libraries eg. System.Web?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:54:49+00:00Added an answer on June 9, 2026 at 9:54 pm

    I think the best solution today would be to inherit from the providers available in System.Web.Providers (the ASP.NET Universal Providers assembly) and simply inject the retry policy for each public method:

    public class MyDefaultProfileProvider : System.Web.Providers.DefaultProfileProvider
    {
        private RetryPolicy retryPolicy;
    
        public MyDefaultProfileProvider()
        {
            var retryStrategy = new Incremental(5, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(2));
            this.retryPolicy = new RetryPolicy<SqlAzureTransientErrorDetectionStrategy>(retryStrategy);
            retryPolicy.Retrying += retryPolicy_Retrying;
        }
    
        private void retryPolicy_Retrying(object sender, RetryingEventArgs e)
        {
            // Log, whatever...
        }
    
        public override System.Web.Profile.ProfileInfoCollection GetAllProfiles(System.Web.Profile.ProfileAuthenticationOption authenticationOption, int pageIndex, int pageSize, out int totalRecords)
        {
            int tempTotalRecords = 0;
            var profiles = retryPolicy.ExecuteAction(() =>
            {
                return base.GetAllProfiles(authenticationOption, pageIndex, pageSize, out tempTotalRecords);
            });
            totalRecords = tempTotalRecords;
            return profiles;
        }
    
        ...
    }
    

    To know if it would be legal to reuse the code, you should look at the license.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database on SQL Server 2008. I have an ASP.NET application that
I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an
I have a SQL Server database which is shared between several ASP.NET (VB.NET) websites,
I have a small ASP.Net application that appends records from users connected through internet.
I have a Web application made in ASP.NET and MS SQL 2005 as database
My requirement is to have database based help system for asp.net website, as shown
i am designing a project in asp.net mvc3, i have designed database in sql
I have an application that adds a form to the database (ASP.NET 2.0) The
I have a database running on MS SQL Server 2005 and an ASP.NET 3.5
I have an ASP.NET website and over time it has become more and more

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.