change web.config connections from sql to access

In code-snippet is the standard code to connect to a sql database. How do I change this code that it works with ms access ?
I know the connction string is eg <!--      <add name="ApplicationServices" connectionString="~/App_data/aspnetdb.mdb" providerName="System.Data.OleDb"/>-->

 but what about the rest ?


<configuration>
	<connectionStrings>
		 <add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />  
		</connectionStrings>
	<system.web>
		<compilation debug="true" targetFramework="4.0"/>
		<authentication mode="Forms">
			<forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
		</authentication>
		<membership>
			<providers>
				<clear/>
				<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
			</providers>
		</membership>
		<profile>
			<providers>
				<clear/>
				<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
			</providers>
		</profile>
		<roleManager enabled="false">
			<providers>
				<clear/>
				<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
				<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
			</providers>
		</roleManager>
	</system.web>
	<system.webServer>
		<modules runAllManagedModulesForAllRequests="true"/>
	</system.webServer>
</configuration>

Open in new window

dekempeneerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carlos VillegasFull Stack .NET DeveloperCommented:
The best place for connection string details:
http://www.connectionstrings.com/

Access:
http://www.connectionstrings.com/access

Access 2007:
http://www.connectionstrings.com/access-2007

Look for .NET Framework Data Provider
0
dekempeneerAuthor Commented:
Yes, the connectionstring  ave, but I think I need to replace the System.Web.Security.SqlRoleProvider and such as well ?
0
Carlos VillegasFull Stack .NET DeveloperCommented:
mmm I see, sorry but .net currently dont have a native RoleProvider class for OleDb, you must create a custom one that inherit from System.Web.Security.RoleProvider to interact with your Access DB.

System.Web.Security.RoleProvider reference:
http://msdn.microsoft.com/en-us/library/system.web.security.roleprovider.aspx

You can see an example of how to implement that here:
http://msdn.microsoft.com/en-us/library/317sza4k.aspx (example for odbc but adaptable to OleDb)
http://forums.asp.net/t/1522507.aspx/1 (OleDb, based in the first link)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Amandeep Singh BhullarCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.