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

  • SEARCH
  • Home
  • 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 7611241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:37:26+00:00 2026-05-31T01:37:26+00:00

I created a custom membership and role provider to leverage the authentication and authorization

  • 0

I created a custom membership and role provider to leverage the authentication and authorization built into ASP.NET MVC 4. Everything had been going smoothly during development of my application until I tried deploying it to a test environment.

Launching the application in Debug mode from Visual Studio works perfectly fine. However, I then use Visual Studio’s one click deployment to load my application into an instance of IIS running on my development machine. I am able to load the application in my browser, but authentication no longer works. Using Fiddler, I see that a cookie is sent back, but I am unable to access portions of the site that are restricted using [Authorize] attributes.

Below is a relevant snippet from my web.config.

<membership defaultProvider="PonosMembershipProvider">
  <providers>
    <clear />
    <add name="PonosMembershipProvider" type="Ponos.Identity.PonosMembershipProvider" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/Ponos" />
  </providers>
</membership>
<roleManager enabled="true" defaultProvider="DefaultRoleProvider">
  <providers>
    <clear />
    <add name="DefaultRoleProvider" type="Ponos.Identity.PonosRoleProvider" connectionStringName="DefaultConnection" applicationName="/Ponos" />
  </providers>
</roleManager>

Additionally, I set the application name in both custom provider with logic as follows:

public override string ApplicationName
    {
        get
        {
            return "Ponos";
        }
        set
        {
            throw new NotImplementedException();
        }
    }

Additionally, after attaching to the running instance of IIS, I see that the information entered into the form passes validation, but that no access is granted to pages that have restricted authorized access.

Also, the database on being used for the deployment is populated with the same values as the development database.

Why wouldn’t the providers work after deployment when they are functioning fine in the debugging environment?

  • 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-05-31T01:37:27+00:00Added an answer on May 31, 2026 at 1:37 am

    This problem was only showing up when my deployed server was accessed directly by its IP. When I added a hosts entry mapping a domain to the IP and subsequently set the same domain in my auth cookie the issue was resolved.

    I’m not sure why I couldn’t access the cookie if the domain was an IP address, but this did fix the problem.

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

Sidebar

Related Questions

I created custom membership provider for asp.net mvc applications and it all works fine
I am creating custom membership provider for my asp.net application. I have also created
I need to create a custom membership user and provider for an ASP.NET mvc
I've had to create a custom membership provider for my current ASP .Net project
I recently created a custom membership provider to my asp.net (4.0) site and a
is there any custom asp.net membership providers that someone has already created online. I
I created STS that does the authentication part. It uses Custom Membership provider. After
How do I create a custom membership for ASP.NET MVC 2 based on the
We have created a custom membership provider, but we have inherited the Role and
I am new to Membership and role provider by asp.net All the articles I

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.