<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">MarkBerr's Blog</title><subtitle type="html">Covering issues related to the ASP.NET features of Membership and RoleManager.</subtitle><id>http://blogs.msdn.com/markberr/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/markberr/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/markberr/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2006-03-14T23:31:00Z</updated><entry><title>Default Provider Configuration targets Sql Server Express</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/markberr/archive/2006/03/31/566258.aspx" /><id>http://blogs.msdn.com/markberr/archive/2006/03/31/566258.aspx</id><published>2006-04-01T01:16:00Z</published><updated>2006-04-01T01:16:00Z</updated><content type="html">&lt;P&gt;In an attempt to solve some of the basic problems with getting the Membership and Roles providers to work out of the box, I'd like to take a minute to talk about their default setup.&lt;/P&gt;
&lt;P&gt;The default Membership and Roles providers are Sql based and target a local Sql Server Express (SSE) install.&amp;nbsp; If your first attempt to load a page which does a Membership or Roles operation results in:&lt;BR&gt;&lt;BR&gt;&lt;I&gt;&lt;FONT face=Verdana color=#ff0000&gt;An error has occurred while establishing a connection to the server. &amp;nbsp;When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)&lt;/FONT&gt;&lt;/I&gt; &lt;/P&gt;
&lt;P&gt;It's likely that SSE is not running.&amp;nbsp; Maybe you didn't choose to install it during the product install.&amp;nbsp; You can easily check if it's available (and running) by trying to start the service.&amp;nbsp; Run the following from a command shell:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;EM&gt;net start MSSQL$SQLEXPRESS&lt;/EM&gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;Ok, SSE is now running.&amp;nbsp; Great.&amp;nbsp; How are the providers configured to target it?&lt;BR&gt;&lt;BR&gt;The providers' default configurations point them to use the connection string named "LocalSqlServer" which is defined in the&amp;nbsp; "machine.config" file which lives in the&amp;nbsp;framework config directory.&amp;nbsp; In this file, you'll see the following in the connection strings section:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;EM&gt;&amp;lt;add name="LocalSqlServer" connectionString="data source&lt;STRONG&gt;=&lt;FONT style="BACKGROUND-COLOR: #ffffff" color=#000000&gt;.\SQLEXPRESS&lt;/FONT&gt;&lt;/STRONG&gt;;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" .../&amp;gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This connection string defines a "data source" value that points to a local SSE instance.&amp;nbsp; From this connection string, you can also see the default database name is going to be "aspnetdb.mdf".&amp;nbsp; The "|DataDirectory|" notation is special and ADO.NET replaces this value with the the app domain value for the "DataDirectory" variable.&amp;nbsp; For ASP.NET site's, this value, by default, is "App_Data".&amp;nbsp; I won't go into the significance of the "User Instance" value in this post since it's a bit beyond what I'm trying to address here.&lt;/P&gt;
&lt;P&gt;So that's some basic info around the provider's default configurations and their use of SSE.&amp;nbsp; Hope this helps at least a few people get the providers running right out of the box which was our goal.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=566258" width="1" height="1"&gt;</content><author><name>MarkBerr</name><uri>http://blogs.msdn.com/members/MarkBerr.aspx</uri></author></entry><entry><title>It's about time...</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/markberr/archive/2006/03/14/551567.aspx" /><id>http://blogs.msdn.com/markberr/archive/2006/03/14/551567.aspx</id><published>2006-03-15T01:31:00Z</published><updated>2006-03-15T01:31:00Z</updated><content type="html">&lt;P&gt;After spending 2.5 years on the ASP.NET test team, it's about time to start a blog to answer common questions covering the features I own - mainly Membership and RoleManager.&amp;nbsp; I've found myself answering the same questions repeatedly in various public forums and a blog seemed like a great way to easily document those discussions in a single location.&amp;nbsp; So let's get going...&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=551567" width="1" height="1"&gt;</content><author><name>MarkBerr</name><uri>http://blogs.msdn.com/members/MarkBerr.aspx</uri></author></entry></feed>