Wrox Programmer Forums
|
Visual Web Developer 2005 Discuss creating ASP.NET 2.0 sites with Microsoft's Visual Web Developer 2005. If your question is more specific to a piece of code than the Visual tool, see the ASP.NEt 2.0 forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2005 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 October 13th, 2008, 11:03 PM
Registered User
 
Join Date: Oct 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default No Provider Created!

I've followed the instruction step by step from this article --http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=404. When i open the Web Site Administration Tools, click the Provider tab and then click the "Select a different provider for each feature (advanced)" link. --------- No Provider Created. Pls help! Below is the web.config code. I'm using the Visual Studio 2005 and Access 2000 database.

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <connectionStrings>
    <add name="AccessFileName" connectionString="~/App_Data/ASPNetDB.mdb" providerName="System.Data.OleDb"/>
  </connectionStrings>
  <system.web>
    <authentication mode="Forms">
      <forms loginUrl="mylogin.aspx" defaultUrl="Login.aspx"/>
    </authentication>
    <membership defaultProvider="AccessMembershipProvider">
      <providers>
    <clear/>
    <add name="AccessMembershipProvider"
    type="Samples.AccessProviders.AccessMembershipProv ider, SampleAccessProviders"
    connectionStringName="AccessFileName"
    enablePasswordRetrieval="false"
    enablePasswordReset="false"
    requiresUniqueEmail="false"
    requiresQuestionAndAnswer="false"
    minRequiredPasswordLength="1"
    minRequiredNonalphanumericCharacters="0"
    applicationName="SampleSite"
    hashAlgorithmType="SHA1"
    passwordFormat="Hashed"/>
      </providers>
    </membership>
      <roleManager enabled="true"
        defaultProvider="AccessRoleProvider"
        cacheRolesInCookie="true"
        cookieName=".ASPXROLES"
        cookieTimeout="30"
        cookiePath="/"
        cookieRequireSSL="false"
        cookieSlidingExpiration="true"
        cookieProtection="All">
        <providers>
      <add name="AccessRoleProvider"
        type="Samples.AccessProviders.AccessRoleProvider,
                   SampleAccessProviders"
            connectionStringName="AccessFileName"
        applicationName="SampleSite"/>
        </providers>
      </roleManager>
      <profile enabled="true"
          defaultProvider="AccessProfileProvider">
        <providers>
      <add name="AccessProfileProvider"
           type="Samples.AccessProviders.AccessProfileProvide r,
                        SampleAccessProviders"
       connectionStringName="AccessFileName"
       applicationName="SampleSite"
       description="Stores and retrieves profile data from an
                          SampleAccessProviders database."/>
        </providers>
    <properties>
      <add name="FriendlyName" type="string"
                     allowAnonymous="true" serializeAs="String"/>
       <add name="Height" type="int" allowAnonymous="true"
                     serializeAs="String"/>
      <add name="Weight" type="int" allowAnonymous="true"
                     serializeAs="Xml"/>
    </properties>
      </profile>
      <anonymousIdentification enabled="true"
         cookieName=".ASPXANONYMOUS" cookieTimeout="100000"
         cookiePath="/" cookieRequireSSL="false"
         cookieSlidingExpiration="true" cookieProtection="None"
         domain=""/>
       <webParts>
     <personalization
            defaultProvider="AccessPersonalizationProvider">
        <providers>
          <add name="AccessPersonalizationProvider"
    type="Samples.AccessProviders.AccessPersonalizatio nProvider, SampleAccessProviders"
           connectionStringName="AccessFileName"
           applicationName="SampleSite"/>
         </providers>
       </personalization>
    </webParts>

        <!--
        <trust level="Medium"/>
        -->

        <compilation debug="true"/>
    <pages>
      <namespaces>
        <clear />
        <add namespace="System" />
        <add namespace="System.Collections" />
        <add namespace="System.Collections.Specialized" />
        <add namespace="System.Configuration" />
        <add namespace="System.Text" />
        <add namespace="System.Text.RegularExpressions" />
        <add namespace="System.Web" />
        <add namespace="System.Web.Caching" />
        <add namespace="System.Web.SessionState" />
        <add namespace="System.Web.Security" />
        <add namespace="System.Web.Profile" />
        <add namespace="System.Web.UI" />
        <add namespace="System.Web.UI.WebControls" />
        <add namespace="System.Web.UI.WebControls.WebParts" />
        <add namespace="System.Web.UI.HtmlControls" />
      </namespaces>
    </pages>
    </system.web>
</configuration>

 
Old October 14th, 2008, 11:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Did you search Google for this? Searching Google for "No Provider Created WSAT" results in this:

http://forums.asp.net/p/1270221/2399045.aspx

which in turn results in this:

http://forums.asp.net/p/1137426/1820873.aspx

which suggests adding <clear /> elements to the <providers /> sections. Does hat do the trick?

Imar




---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old October 14th, 2008, 10:26 PM
Registered User
 
Join Date: Oct 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, Imar. Thanks for your reply. I had tried to add the <clear/> in the <provider> section. It's still cannot work. I'm quite new to ASP.Net 2.0. I have no idea what's going wrong with my web.config. Pls help..

 
Old October 15th, 2008, 03:00 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Your config file looks OK, I diffed it with the one from article, and it looks pretty much identical.

So, you need to provide more info about your setup. Where (on disk) is the site located? How do you open the project in VWD? Is web.config in the root of your site? What happens if you delete the existing web.config file and replace it with a blank new one?

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old October 15th, 2008, 11:31 PM
Registered User
 
Join Date: Oct 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had followed the instructions step by step. By using the Visual Studio 2005, I had created a project called SampleAccessProviders, using the access providers which I downloaded from Microsoft MSDN site. Then i created a blank new website using Visual Studio 2005. The website is located at C:\Documents and Settings\Hardsoft\My Documents\Visual Studio 2005\WebSites\WebSite1. I had copied the AspNetDB into App_Data folder and SampleAccessProviders.dll into Bin folder. I had replaced the web.config file with the one created in SampleAccessProviders project. The web.config is in the root of the website. There's nothing happen when i delete the web.config and replace with the previous one. For your information, just now I've tried to do the setup again, it can work now. Maybe I've made a mistake during the setup. When i click on the "Select a different provider for each feature (advanced)" link, then i can see the Access Provider is now the selected provider for both the Membership and the Roles feature. Then how do i use this Web Site Administration Tools to set the user access right and the security level?

 
Old October 16th, 2008, 01:31 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Have you seen that big "How do I use this tool" link in the WSAT?

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old October 19th, 2008, 09:15 PM
Registered User
 
Join Date: Oct 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah! I saw the link. I had read through it. I had created 2 roles, administrators and users. I only want the administrators to add, edit and delete the record from database. I had created access rules to restrict user access the App_Data and _UpgradeReport_Files folder. When i use the User account login the website. I still can add, edit and delete record. I just wonder how this web site administration tools can restrict the user accessbility. Please advice.

 
Old November 1st, 2008, 10:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sorry I didn't reply. I didn't get an e-mail notification for this post.

Do you still need help with this?

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old November 4th, 2008, 01:55 AM
Registered User
 
Join Date: Oct 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your reply. For your information, i stored my database in C:\ drive. Then i stored my project in C:\Inetpub\wwwroot\Project. How do i set the rules for the admin and user role? I want only the admin can edit, update and delete the records in database. Now, i use these coding to hide the control buttons.

'Determine whether admin or user is visiting the page?
                Dim userName As String = User.Identity.Name
                If String.Compare(userName, "admin", True) = 0 Then
                    'this is admin, show the functionality button
                    btnAdd.Visible = True
                    btnDeleteSelected.Visible = True
                    btnReset.Visible = True
                    GridView1.Columns(0).Visible = True
                    GridView1.Columns(1).Visible = True
                Else
                    'this is not admin, hide the functionality button
                    btnAdd.Visible = False
                    btnDeleteSelected.Visible = False
                    btnReset.Visible = False
                    GridView1.Columns(0).Visible = False
                    GridView1.Columns(1).Visible = False
                End If

 
Old November 4th, 2008, 02:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

And the question is? What is it that you don't know / understand how to do?

BTW, if this is no longer related to the "No Provider" issue, you're better off starting a new thread.

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with membership Provider... slim182 ASP.NET 2.0 Basics 1 February 19th, 2007 10:15 AM
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
Provider cannot be found Star007 Pro VB 6 0 April 6th, 2006 07:03 AM
Provider not found wwwdirzala Access 1 April 19th, 2004 02:05 PM





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