Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2007, 06:08 PM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with membership Provider...

Hi, i need to implement a Custom membership provider since i need to validate users from an online db sql server 2005 (not express) .

So i write the class CustomMembershipProvider.cs and put into my app_code folder, then i configured my web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.web>
        <authorization>
            <deny users="?" />
        </authorization>
      <membership defaultProvider = "CustomMembershipProviver"
             userIsOnlineTimeWindow = "15">
        <providers>
          <add name = "CustomMembershipProvider"
             type = "CustomMembershipProvider"
             connectionStringName = "xString"
             enablePasswordRetrieval = "true"
             enablePasswordReset = "true"
             requiresQuestionAndAnswer = "true"
             writeExceptionsToEventLog = "true" />
        </providers>
      </membership>
    </system.web>

  <connectionStrings>
    <add name="xString" connectionString="Server=xxx.xxx.xxx.xxx;UID=xxxx; pwd=xxxxxx;Database=xxxxx" />
  </connectionStrings>
</configuration>

and i just got a error: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

 <deny users="?" />
Line 6: </authorization>
Line 7: <membership defaultProvider = "CustomMembershipProviver" AT THIS LINE RED
Line 8: userIsOnlineTimeWindow = "15">
Line 9: <providers>

i'm missing something?, may i do something more?... or there is something wrong?


 Greetings

      SLiM

 
Old February 19th, 2007, 10:15 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Quote:
quote: This error can be caused by a virtual directory not being configured as an application in IIS.
This line says it all. Go into IIS and make sure your project is configured as an application.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Membership Provider Scott663 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 August 1st, 2008 05:16 PM
Custom Membership Provider kulkarnimonica ASP.NET 2.0 Professional 0 June 21st, 2007 03:56 PM
Membership Provider error jamara ASP.NET 2.0 Basics 1 March 12th, 2007 02:01 PM
membership provider davyquyo ASP.NET 2.0 Basics 0 January 1st, 2007 04:52 AM
Membership Provider bmains ASP.NET 2.0 Basics 4 April 13th, 2006 04:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.