473,545 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use MS Access DB for ASPNET Application Services (membership, profile, etc)

A lot of times, web hostings for ASPNET 2.0 will offer only MS Access
DB for database for basic plan, a question often asked is how can I use
the membership services, role, web parts services, etc for this MS
Access db. Well, microsoft offers a download sample. Instructions
are below.

profile, roles, etc providers)

1. Download the Sample Access Provider from microsoft.

This will install a VSI which you can open in Visual Studio 2005.
It contains a sample web.config as well as sample ASPnetDb.mdb
NOTE: web.config has an incorrect provider type. For example:

type="Samples.A ccessProviders. AccessMembershi pProvider,
SampleAccessPro viders"

"SampleAccessPr oviders" should have been "ASP.NET Access Providers"
that is the name of the DLL created by this class library.
You can use either of this:

1. Change the name of DLL. (by right-clicking on project, in
Applications tab, change the type to 'SampleAccessPr oviders'.
2. Change every occurrence of "SampleAccessPr oviders" in web.config
with "ASP.NET Access Providers"

In any case, you should be able to get rid the "unable to load Type"
runtime error.

You should create the DLL by compiling the class library project.
2. Create a new web site. Copy ASPnetDb.mdb in the 'App_Data'
Incorporate the sample web.config file in the class library into the

web.config file in your new website.

3. Select your website in visual studio, Launch ASPNET Configuration
You should be able now to add security.

For example, I changed the namespace of the Sample access providers
project to 'AccessProvider s' and also changed the DLL to
'ASP.NET.Access Providers.dll'

Here is my working sample web.config

<configuratio n>
<connectionStri ngs>
<add name="AccessFil eName"
connectionStrin g="~/App_Data/ASPNetDB.mdb"
providerName="S ystem.Data.OleD b"/>
</connectionStrin gs>
<authenticati on mode="Forms">
<forms loginUrl="mylog in.aspx" defaultUrl="Log in.aspx"/>

<membership defaultProvider ="AccessMembers hipProvider">
<add name="AccessMem bershipProvider "
type="AccessPro viders.AccessMe mbershipProvide r,
ASP.NET.AccessP roviders"
connectionStrin gName="AccessFi leName"
enablePasswordR etrieval="false "
enablePasswordR eset="false"
requiresUniqueE mail="false"
requiresQuestio nAndAnswer="fal se"
minRequiredPass wordLength="1"
minRequiredNona lphanumericChar acters="0"
applicationName ="SampleSite "
hashAlgorithmTy pe="SHA1"
passwordFormat= "Hashed"/>
<roleManager enabled="true" defaultProvider ="AccessRolePro vider"
cacheRolesInCoo kie="true" cookieName=".AS PXROLES" cookieTimeout=" 30"
cookiePath="/" cookieRequireSS L="false" cookieSlidingEx piration="true"
cookieProtectio n="All">
<add name="AccessRol eProvider"
type="AccessPro viders.AccessRo leProvider,
ASP.NET.AccessP roviders"
connectionStrin gName="AccessFi leName"
applicationName ="SampleSite "/>
<profile enabled="true" defaultProvider ="AccessProfile Provider">
<add name="AccessPro fileProvider"
type="AccessPro viders.AccessPr ofileProvider,
ASP.NET.AccessP roviders"
connectionStrin gName="AccessFi leName"
applicationName ="SampleSite "
description="St ores and retrieves profile data from
an ASP.NET_Access_ Providers database."/>
<add name="FriendlyN ame" type="string" allowAnonymous= "true"
serializeAs="St ring"/>
<add name="Height" type="int" allowAnonymous= "true"
serializeAs="St ring"/>
<add name="Weight" type="int" allowAnonymous= "true"
serializeAs="Xm l"/>
<anonymousIdent ification enabled="true"
cookieName=".AS PXANONYMOUS" cookieTimeout=" 100000" cookiePath="/"
cookieRequireSS L="false" cookieSlidingEx piration="true"
cookieProtectio n="None" domain=""/>
<personalizatio n
defaultProvider ="AccessPersona lizationProvide r">
<add name="AccessPer sonalizationPro vider"

type="AccessPro viders.AccessPe rsonalizationPr ovider,
ASP.NET.AccessP roviders"
connectionStrin gName="AccessFi leName"
applicationName ="SampleSite "/>
</personalization >

<trust level="Medium"/>

<compilation debug="true"/>

You can also put the absolute path in the connection strings
<connectionStri ngs>
connectionStrin g="D:\Clients\C 240\msite.com\d atabase/ASPNetDB.mdb"
providerName="S ystem.Data.OleD b"/>
</connectionStrin gs>

Last Updated 7/5/2006 7:19:21 AM by 'Editor'
Home | Edit page | List pages | Recent pages | RSS Search for:

Jul 5 '06 #1
0 6229

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Keith Jakobs, MCP | last post by:
Greetings: I had seen several posts around the Internet about this issue from a few months back, but have been unable to find a resolution ... I have a user who is trying to get started with Visual Studio.NET 2003. We have uninstalled and reinstalled the Product.... then we did a complete cleanout of development products, re-installed...
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ---Start of test.aspx---- <%@ Page language="C#" AutoEventWireup="false" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >...
by: VB Programmer | last post by:
Out of necessity I may have to use Access to store my membership, profile, etc... info (usually stored in ASPNETDB.mdf) 1. Do I use aspnet_regsql.exe to populate the mdb? If so, any command line examples? 2. Will I have to change how I code or is it pretty much plug and play once I adjust my command line and setup the mdb? Thanks.
by: Runsrealfast | last post by:
I am currently setting up my website to login etc. The default that asp.net is set for is sql server express (express edition, to poor to buy the real thing!) my host will only allow for access. How can I change the default settings to use access instead of sql server express? please help!
by: dgk | last post by:
I've got an app that's using SQLServer to store the membership and profile data, in the Aspnetdb database. Now I'm going to be adding another app and I'm concerned about using the same database. They will each have different application names but I think it's probably better to have completely different databases. The aspnet_regsql utility has...
by: =?Utf-8?B?QV9SZXB1YmxpY2Fu?= | last post by:
This is a portion of my Web.config file: <system.web> <membership defaultProvider="SqlProvider"> <providers> <clear/> <add name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SqlServices" applicationName="CollegeRepublicans"
by: Mike | last post by:
Hi: I have been trying to create a web application that provides suport for two membership/profile databases: one for private users and one for another set of users. These tw user have a totally different set of profile attributes. I added the following code to my web.config (under system.web): <membership...
by: Rory Becker | last post by:
Hi All I have a database which has it's own set of tables for users etc I already successfully use the Login control by handling the Authenticate event and checking the suitable values against my own DB. Now I need to use the ChangePassword control but I cannot stop the system from trying to create a database.
by: Oriane | last post by:
Hi there, I would like to open my Asp.Net project as a "Web Application" rather than as a "Web Site" in Visual Studio. But the thing is that I use the System.Web.Profile and the auto-generated class "ProfileCommon myApp.Profile", which provides me with type profile properties. And the fact is that this generated class is not generated with...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.