« Previous Next »

Thread: Does IIS7 use different default membership provider?

Last post 07-01-2009 8:20 AM by frankswildyears. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 06-29-2009, 6:31 PM

    Does IIS7 use different default membership provider?

      Normal 0 21 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} Hello,

     

    Say I create CreateUserWizard control and use  AspNetSqlMembershipProvider ( defined in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config ) as a default membership provider.

    Assuming I change default provider's requiresQuestionAndAnswer attribute to false, then CreateUserWizard control template should not be required to provide Question and Answer fields.

    But if I request the page via IIS7 I get the following exception:

     

    CreateUserWizard1: CreateUserWizardStep.ContentTemplate does not contain an IEditableTextControl with ID Question for the security question, this is required if your membership provider requires a question and answer.

     

    A) The above exception suggests that when requesting a page via IIS7, runtime doesn’t use AspNetSqlMembershipProvider (defined in machine.config) as a default membership provider?!

     

    But as far as I know, IIS should use AspNetSqlMembershipProvider and thus shouldn’t throw an exception?!

     

     

    thanx

  • 06-30-2009, 9:02 AM In reply to

    Re: Does IIS7 use different default membership provider?

    frankswildyears:
    The above exception suggests that when requesting a page via IIS7, runtime doesn’t use AspNetSqlMembershipProvider (defined in machine.config) as a default membership provider?!

    No it doesn't.  It suggests your template doesn't include the security question/answer input.  Nothing to do with IIS at all.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 06-30-2009, 1:50 PM In reply to

    Re: Does IIS7 use different default membership provider?

    Normal 0 21 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}
    Hello,
     


    jeff@zina.com:

    frankswildyears:
    The above exception suggests that when requesting a page via IIS7,

    runtime doesn’t use AspNetSqlMembershipProvider (defined in machine.config) as a default

    membership provider?!


    No it doesn't.  It suggests your template doesn't include the security question/answer input. 

    Nothing to do with IIS at all.


    Jeff

     
    Below is default membership provider ( defined in machine.config ), which is also used by my
     application. Notice that I've set requiresQuestionAndAnswer to false, and as such CreateUserWizard
     template isn't required to provide question and answer fields.
     
    Also, if I run this app via Visual Studio ( which provides built-in web server ), then everything 
    works OK and no  exception is thrown. Only when I request a page via IIS7 is request thrown: 
    <membership>
    <providers>
    <add name="AspNetSqlMembershipProvider"
    type="System.Web.Security.SqlMembershipProvider, System.Web,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    connectionStringName="LocalSqlServer"
    enablePassswordRetrieval="false"
    requiresQuestionAndAnswer="false"
    applicationName="/" requiresUniqueEmail="false"
    passwordFormat="Hashed" maxInvalidPasswordAttempts="5"
    minRequiredPasswordLength="7"
    minRequiredNonalphanumericCharacters="0"
    passwordAttemptWindow="10"
    passwordStrengthRegularExpression=""/>
    </providers>
    </membership>
     
    cheers mate
  • 06-30-2009, 5:31 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Does IIS7 use different default membership provider?

    Are you by any chance running this on 64-bit windows?  In that case, you would need to edit the machine.config under Framework64 directory.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 07-01-2009, 8:20 AM In reply to

    Re: Does IIS7 use different default membership provider?

     Yes, I have 64 bit system. Anyways, your advice worked

     

    thanx

Page 1 of 1 (5 items)
Microsoft Communities