<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>SharePoint</title>
        <link>http://www.nimblecoder.com/blog/category/20.aspx</link>
        <description>SharePoint and MOSS 2007 related entries</description>
        <language>en-US</language>
        <copyright>Ryan Van Slooten</copyright>
        <generator>Subtext Version 2.1.1.1</generator>
        <item>
            <title>Macro Guidelines for Excel VBA Beginners</title>
            <link>http://nimblecoder.com/blog/archive/2008/05/27/macro-guidelines-for-excel-vba-beginners.aspx</link>
            <description>  &lt;p&gt;     I'm in the process of updating an Excel spreadsheet that is failing when it is running     inside of Internet Explorer. The issue is related to the ActiveSheet and other global     properties having a value of Nothing when the code is assuming they have valid references.     As I am going through this spreadsheet, I am noting a wide variety of programming     deficiencies and inefficiencies. Here is a list of some of the issues encountered:&lt;/p&gt;   &lt;blockquote&gt;     If you run spreadsheets under Internet Explorer, use     &lt;span style="font-weight:bold;"&gt;Application.ThisWorkbook&lt;/span&gt; and to ensure the browser     evaluates the reference correctly.&lt;/blockquote&gt;   &lt;blockquote&gt;     NOTE: This is not an exhaustive list, nor do I claim that the "Better" examples     are the best code example, but rather they are (hopefully) significant improvements     over the "Bad" examples. In many cases, I have kept the design of the bad example     so that you can see the differences however you should strive to completely refactor     the code if possible.&lt;/blockquote&gt;   &lt;ol&gt;     &lt;li&gt;       &lt;h3&gt;         Do not abuse the "With" statement in VBA.&lt;/h3&gt;       Some people like "With" and some people don't and I don't particularly care for       it. In particular, do not use nested "With" statements.       &lt;h4&gt;         Example of Bad Code&lt;/h4&gt;       &lt;pre class="vb" style="background-color: #ffdab9" name="code"&gt;' ... BAD EXAMPLE: DO NOT USE ...
With ActiveSheet
  With TestForm
    ' ...
  End With ' TestForm
End With ' ActiveSheet
' ... BAD EXAMPLE: DO NOT USE ...

&lt;/pre&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;h3&gt;
        Avoid using the "Goto" statement in VBA.&lt;/h3&gt;
      "Goto" is almost always a bad idea and a sign of spaghetti code. There are very few cases were it is appropriate to use it -- very few cases!
      &lt;h4&gt;
        Example of Bad Code&lt;/h4&gt;
      &lt;pre class="vb" style="background-color: #ffdab9" name="code"&gt;' ... BAD EXAMPLE: DO NOT USE ...
For i = iHere To lRealLastRow Step 2
  BuildStr = "A" &amp;amp; i + 1
  Range(BuildStr).Select
  If Range(BuildStr).Value = "---" Then GoTo DoneWithNames
  SelectItemDlg.Items_List.AddItem Range(BuildStr).Text
Next

DoneWithNames:
' ... BAD EXAMPLE: DO NOT USE ...
&lt;/pre&gt;
      &lt;h4&gt;
        Example of Better Code (I still would have designed it differently)&lt;/h4&gt;
      &lt;pre class="vb" name="code"&gt;' ...
Dim MyCell As Range
For i = iHere To lRealLastRow Step 2
  Set MyCell = Cells(i + 1, 1)
  If MyCell.Value = "---" Then
    Exit For
  End If
  SelectItemDlg.Items_List.AddItem MyCell.Text
Next
' ...
&lt;/pre&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;h3&gt;
        Avoid using the name of a Form inside the Form code&lt;/h3&gt;
      The current form is implied in the code. It is not necessary to use the form name to reference controls on the form. If you want to differeniate form controls, you can use the 'Me' keyword such as: Me.Hide
      &lt;h4&gt;
        Example of Bad Code&lt;/h4&gt;
      &lt;pre class="vb" style="background-color: #ffdab9" name="code"&gt;' ... BAD EXAMPLE: DO NOT USE ...
' This example is doubly bad because it uses the form name (ChartConfig)
' both explicitly and in a With statement
If ChartConfig.Variable1.Text = ChartConfig.Variable2.Text Then
    MsgBox "Variable1 cannot be same as Variable2. Please choose another variable type.", vbOKCancel

    'Turn off the Change effect on Variable2.
    changeCasevar = False
    With ChartConfig
        .Variable2.Text = ""
        .Variable2Desc.Text = ""
        .Variable2Uom.Text = ""
    End With
    'Turn back on the Change effect on Variable2.
    changeCasevar = True
    Exit Sub
    '
End If

' ... BAD EXAMPLE: DO NOT USE ...
&lt;/pre&gt;
      &lt;h4&gt;
        Example of Better Code (I still would have designed it differently)&lt;/h4&gt;
      &lt;pre class="vb" name="code"&gt;' ...
If Variable1.Text = Variable2.Text Then
    MsgBox "Variable1 cannot be same as Variable2. Please choose another variable type.", vbOKCancel

    'Turn off the Change effect on Variable2.
    changeCasevar = False

    Variable2.Text = ""
    Variable2Desc.Text = ""
    Variable2Uom.Text = ""

    'Turn back on the Change effect on Variable2.
    changeCasevar = True
    Exit Sub
End If

&lt;/pre&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;h3&gt;
        Use Error Handling and Resume to restore Application.ScreenUpdating&lt;/h3&gt;
      &lt;h4&gt;
        Example of Bad Code&lt;/h4&gt;
      &lt;pre class="vb" style="background-color: #ffdab9" name="code"&gt;' ... BAD EXAMPLE: DO NOT USE ...
' There are quite a few global variables and a pass-by-reference
' boolean that should just be the function return value.
Application.ScreenUpdating = False

iOption = "Single"
x = ChartPicker.Input_Val_Text
Call CheckUserRangeInputsAndOutputs(iOption, OkToChart)
iOption = ""

If OkToChart = True Then
    With ChartConfig
        CreateChartingArrays
    End With
End If

Application.ScreenUpdating = True
' ... BAD EXAMPLE: DO NOT USE ...
  &lt;/pre&gt;
      &lt;h4&gt;
        Example of Better Code (I still would have designed it differently)&lt;/h4&gt;
      &lt;pre class="vb" name="code"&gt;' ...
  On Error GoTo ErrorHandler

  Application.ScreenUpdating = False

  If CheckUserRangeInputsAndOutputs("Single") Then
    ChartConfig.CreateChartingArrays
  End If

Exit_Handler:
  Application.ScreenUpdating = True
  Exit Sub

ErrorHandler:
  MsgBox "Error " &amp;amp; Err.Number &amp;amp; ": " &amp;amp; Err.Description
  Resume Exit_Handler

  &lt;/pre&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;h3&gt;
        Use If, Else If, and Else correctly.&lt;/h3&gt;
      &lt;h4&gt;
        Example of Bad Code&lt;/h4&gt;
      &lt;pre class="vb" style="background-color: #ffdab9" name="code"&gt;' ... BAD EXAMPLE: DO NOT USE ...
If TextBoxMinimum.Text = "" Then
  MsgBox "Must enter Minimum Value before proceeding", vbOK
  Result = False
  Exit Function
End If

If TextBoxMaximum.Text = "" Then
  MsgBox "Must enter Maximum Value before proceeding", vbOK
  Result = False
  Exit Function
End If
' ... BAD EXAMPLE: DO NOT USE ...
&lt;/pre&gt;
      &lt;h4&gt;
        Example of Better Code&lt;/h4&gt;
      &lt;pre class="vb" name="code"&gt;' ...
' For a explicit method, you can directly refer to the controls
Result = False
If Not IsNumeric(TextBoxMinimum.Text) Then
  MsgBox "Must enter Minimum Value before proceeding", vbOK
  TextBoxMinimum.SetFocus
ElseIf Not IsNumeric(TextBoxMaximum.Text) Then
  MsgBox "Must enter Maximum Value before proceeding", vbOK
  TextBoxMaximum.SetFocus
Else
  Result = True
End If

' If you can use a generic method, you can iterate through all of the controls
' There are obviously better ways of doing this, especially with .NET
Dim ValidateControl
Dim ControlList = Array(TextBox1, TextBox2, TextBox3)
For Each ValidateControl In ControlList
  If Input_Val_Text = Null Or Input_Val_Text = "" Then
    MsgBox "Must enter Value in " &amp;amp; ValidateControl.Name &amp;amp; " before proceeding", vbOK
    Result = False
    Exit Function
  End If
Next
&lt;/pre&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;h3&gt;
        Avoid using the ActiveSheet, Range, Cells, and other global variables.&lt;/h3&gt;
      Rather than assuming a position, it is much better to set a variable to the desired
      Workbook, Worksheet, or Range.
      &lt;blockquote&gt;In particular, if there is any chance the spreadsheet might run under a browser,
      use &lt;span style="font-weight:bold;"&gt;Application.ThisWorkbook&lt;/span&gt; to ensure the browser
      evaluates the macro correctly.
      &lt;/blockquote&gt;
      &lt;h4&gt;
        Example of Bad Code&lt;/h4&gt;
      &lt;pre class="vb" style="background-color: #ffdab9" name="code"&gt;' ... BAD EXAMPLE: DO NOT USE ...
'NOTE: Arrays start with 1st position as "0", not "1"
'Thus ColLtrs(0) is not used but placed there as a spacer for letter to column alignment:
ColLtrs = Array("", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z")

With ActiveSheet
  Range(ColLtrs(iOutCol) &amp;amp; iOutRow).Select
    
  If UnitSystem = "Metric" Then
    iRow = ActiveCell.Row
    For i = iRow To iLastRow - 1
      currCell = ColLtrs(ActiveCell.Column) &amp;amp; i + 1

      If Range(currCell).Value &amp;lt;&amp;gt; "" Then
        'capture the value from original calculatated data
        Range(currCell).Select

        strOrigValueCell = ColLtrs(iResultsCol) &amp;amp; ActiveCell.Row
        Result = ConvertUom(Range(strOrigValueCell))
      End If
    Next i
  End If
End With
' ... BAD EXAMPLE: DO NOT USE ...
&lt;/pre&gt;
      &lt;h4&gt;
        Example of Better Code&lt;/h4&gt;
      &lt;pre class="vb" name="code"&gt;' ...
Dim mySheet As Worksheet
Dim Value As Variant

Set mySheet = ActiveSheet

For i = iRow To iLastRow - 1
  Value = mySheet.Cells(i, iOutCol).Value
  If Value &amp;lt;&amp;gt; "" Then
    Result = ConvertUom(UnitSystem, Value)
  End If
Next i

' To get a column letter/code, do not reinvent the wheel!
' Various functions from:
' http://www.dicks-blog.com/archives/2004/05/21/column-numbers-to-letters/

Function ColLetter(ColNumber As Long) As String
    On Error Resume Next
    ColLetter = Application.Substitute(Application.ConvertFormula("R1C" &amp;amp; ColNumber, xlR1C1, xlA1, 4), "1", "")
End Function

Function ColumnLetter(ByVal c As Long) As String
  Dim p As Long
  While c
    p = 1 + (c - 1) Mod 26
    c = (c - p) \ 26
    ColumnLetter = Chr$(64 + p) &amp;amp; ColumnLetter
  Wend
End Function
&lt;/pre&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;h3&gt;
        Avoid using .Select and moving selection in macros unless absolutely.&lt;/h3&gt;
      Do not change the current sheet or selection unless that is the intention of the macro.
      In general, don't mess with the user, flip sheets, or other heinous acts and 
      try to leave things the way you found them.
      &lt;h4&gt;
        Example of Bad Code&lt;/h4&gt;
      &lt;pre class="vb" style="background-color: #ffdab9" name="code"&gt;' ... BAD EXAMPLE: DO NOT USE ...
For i = 1 To 10
  Range("A" &amp;amp; i).Select
  ActiveCell.Value = "Row " &amp;amp; i
Next i
' ... BAD EXAMPLE: DO NOT USE ...
&lt;/pre&gt;
      &lt;h4&gt;
        Example of Better Code&lt;/h4&gt;
      &lt;pre class="vb" name="code"&gt;Dim iColumn As Long
Dim mySheet As Worksheet
Dim myRange As Range

iColumn = 1
Set mySheet = ActiveSheet

For iRow = 1 To 10
  Set rng = mySheet.Cells(iRow, iColumn)
  rng.Value = "Row " &amp;amp; iRow
Next iRow
&lt;/pre&gt;
    &lt;/li&gt;
  &lt;/ol&gt;&lt;img src="http://nimblecoder.com/blog/aggbug/68.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Van Slooten</dc:creator>
            <guid>http://nimblecoder.com/blog/archive/2008/05/27/macro-guidelines-for-excel-vba-beginners.aspx</guid>
            <pubDate>Tue, 27 May 2008 23:28:20 GMT</pubDate>
            <wfw:comment>http://nimblecoder.com/blog/comments/68.aspx</wfw:comment>
            <comments>http://nimblecoder.com/blog/archive/2008/05/27/macro-guidelines-for-excel-vba-beginners.aspx#feedback</comments>
            <wfw:commentRss>http://nimblecoder.com/blog/comments/commentRss/68.aspx</wfw:commentRss>
            <trackback:ping>http://nimblecoder.com/blog/services/trackbacks/68.aspx</trackback:ping>
        </item>
        <item>
            <title>Unable to log into SQL Server after creating self-signed SSL certificate</title>
            <link>http://nimblecoder.com/blog/archive/2008/04/24/unable-to-log-into-sql-server-after-creating-self-signed-ssl.aspx</link>
            <description>&lt;p&gt;In my &lt;a href="http://www.nimblecoder.com/blog/archive/2008/04/23/sharepoint-fba-limitations-and-options.aspx" target="_blank"&gt;SharePoint experiments&lt;/a&gt; with form-based authentication (FBA), I have been &lt;a title="Setting up SSL with a SelfSSL certificate" href="http://www.visualwin.com/SelfSSL/" target="_blank"&gt;installing self-signed SSL&lt;/a&gt; certificates since I am developing in a virtual machine without a certificate authority. Last night, I shut down my virtual machine instead of the usual Suspend operation. This morning, I started the virtual machine but SharePoint wasn't working and said: Cannot connect to the configuration database.&lt;/p&gt; &lt;p&gt;I then tried to open SQL Server Management Console and tried to connect, only to receive the following message:&lt;/p&gt; &lt;p&gt;&lt;a href="http://nimblecoder.com/blog/images/nimblecoder_com/blog/WindowsLiveWriter/UnabletologintoSQLServeraftercreatingsel_A21D/SQL-Error-233-SSL.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="187" alt="A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)" src="http://nimblecoder.com/blog/images/nimblecoder_com/blog/WindowsLiveWriter/UnabletologintoSQLServeraftercreatingsel_A21D/SQL-Error-233-SSL_thumb.png" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I didn't freak out, but I did check the SQL Server Service which was running, and then the SQL Server Log files which looked normal. There was one line which I didn't recognize:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;The certificate was successfully loaded for encryption.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is actually a normal line in the log file, but it was then that I realized that the self-signed certificates I created were interfering with the login process. I searched around for Internet resources, but finally found what I was looking for in the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms186362.aspx" target="_blank"&gt;Certificate MMC snap-in configuration&lt;/a&gt;. Since I had created multiple SSL certificates, I deleted the unused certificates and checked the encryption and certificate settings in the SQL Server Configuration Manager. After a quick reboot, I was back in business.&lt;/p&gt; &lt;p&gt;References:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms186362.aspx" target="_blank"&gt;Configuring Certificate for User by SSL&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/316898" target="_blank"&gt;How to enable SSL encryption for an instance of SQL Server&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx" target="_blank"&gt;SQL Protocols: Troubleshoot Connectivity Issues in SQL Server 2005, Part III&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;img src="http://nimblecoder.com/blog/aggbug/66.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Van Slooten</dc:creator>
            <guid>http://nimblecoder.com/blog/archive/2008/04/24/unable-to-log-into-sql-server-after-creating-self-signed-ssl.aspx</guid>
            <pubDate>Thu, 24 Apr 2008 16:29:18 GMT</pubDate>
            <wfw:comment>http://nimblecoder.com/blog/comments/66.aspx</wfw:comment>
            <comments>http://nimblecoder.com/blog/archive/2008/04/24/unable-to-log-into-sql-server-after-creating-self-signed-ssl.aspx#feedback</comments>
            <wfw:commentRss>http://nimblecoder.com/blog/comments/commentRss/66.aspx</wfw:commentRss>
            <trackback:ping>http://nimblecoder.com/blog/services/trackbacks/66.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint FBA Limitations and Options</title>
            <link>http://nimblecoder.com/blog/archive/2008/04/23/sharepoint-fba-limitations-and-options.aspx</link>
            <description>&lt;p&gt;I recently set up an isolated, single-server SharePoint site with forms-based authentication (FBA) with the hopes that it would eliminate the need to create unrelated user accounts for all of the SharePoint users. The FBA setup and installation went fine and I used the &lt;a href="http://www.codeplex.com/fba" target="_blank"&gt;SharePoint FBA tool&lt;/a&gt; on &lt;a href="http://www.codeplex.com/" target="_blank"&gt;codeplex&lt;/a&gt; to administer the accounts and users which is great.&lt;/p&gt; &lt;p&gt;Unfortunately I didn't realize that disabling "Client Integration" in the SharePoint Cental Admin / Application Management / Authentication Providers would have such a dramatic effect on usability. Some of the challenges are using SharePoint Designer, the MySites functionality is impacted, inability to export list data to Excel, as well as inability to integrate with Outlook. The composite screen shot below shows the difference between enabled and disabled client integration.&lt;/p&gt; &lt;p&gt;&lt;a href="http://nimblecoder.com/blog/images/nimblecoder_com/blog/WindowsLiveWriter/SharePointFBALimitationsandOptions_8EF4/SharePoint%20Client%20Integration_2.png"&gt;&lt;img height="480" alt="SharePoint Client Integration" src="http://nimblecoder.com/blog/images/nimblecoder_com/blog/WindowsLiveWriter/SharePointFBALimitationsandOptions_8EF4/SharePoint%20Client%20Integration_thumb.png" width="569" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;After spending quite a bit of time configuring and setting up FBA, I don't want to abandon it immediately. I am looking into two options to use the FBA user store (ASPNETDB) with IIS, basic authentication, and SSL. The two likely candidates are &lt;a title="Supporting HTTP Authentication and Forms Authentication in a Single ASP.NET Web Site" href="http://msdn2.microsoft.com/en-us/library/aa479391.aspx" target="_blank"&gt;MADAM&lt;/a&gt; (Mixed Authentication Disposition ASP.NET Module) and &lt;a title="Custom Basic Authentication for IIS" href="http://www.codeplex.com/CustomBasicAuth" target="_blank"&gt;Custom Basic Authentication&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;I will post updates as available.&lt;/p&gt;&lt;img src="http://nimblecoder.com/blog/aggbug/65.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Van Slooten</dc:creator>
            <guid>http://nimblecoder.com/blog/archive/2008/04/23/sharepoint-fba-limitations-and-options.aspx</guid>
            <pubDate>Wed, 23 Apr 2008 15:07:22 GMT</pubDate>
            <wfw:comment>http://nimblecoder.com/blog/comments/65.aspx</wfw:comment>
            <comments>http://nimblecoder.com/blog/archive/2008/04/23/sharepoint-fba-limitations-and-options.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://nimblecoder.com/blog/comments/commentRss/65.aspx</wfw:commentRss>
            <trackback:ping>http://nimblecoder.com/blog/services/trackbacks/65.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint FBA Configuration and machine.config</title>
            <link>http://nimblecoder.com/blog/archive/2008/04/14/sharepoint-fba-configuration-and-machine.config.aspx</link>
            <description>&lt;p&gt;I recently implemented Forms-Based Authentication (FBA) in MOSS 2007 and had it working great. Unfortunately we had to reinstall the system and I actually had more issues getting FBA to work correctly on the reinstall than I did the first time. It turned out that the issue was mixing different implementation methods that counteracted each other. The simplest way to configure FBA is to edit the machine.config file on the server (%WINDOWS%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config) and change the LocalSqlServer connection string to the ASPNETDB user store or other database with the user information. This takes advantage of the pre-configured AspNetSqlMembershipProvider and AspNetSqlRoleProvider in the &amp;lt;system.web&amp;gt;&amp;lt;membership&amp;gt; and &amp;lt;roleManager&amp;gt; sections. The AspNetSqlMembershipProvider and AspNetSqlRoleProvider sections normally include something similar to:&lt;/p&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;system.web&amp;gt;
  &amp;lt;membership&amp;gt;
    &amp;lt;providers&amp;gt;
      &amp;lt;add
        name="AspNetSqlMembershipProvider"
        type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        connectionStringName="LocalSqlServer"
        enablePasswordRetrieval="false"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="true"
        applicationName="/"
        requiresUniqueEmail="false"
        passwordFormat="Hashed"
        maxInvalidPasswordAttempts="5"
        minRequiredPasswordLength="7"
        minRequiredNonalphanumericCharacters="1"
        passwordAttemptWindow="10"
        passwordStrengthRegularExpression=""
      /&amp;gt;
    &amp;lt;/providers&amp;gt;
  &amp;lt;/membership&amp;gt;
  &amp;lt;roleManager&amp;gt;
    &amp;lt;providers&amp;gt;
      &amp;lt;add
        name="AspNetSqlRoleProvider"
        connectionStringName="LocalSqlServer"
        applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
      /&amp;gt;
      &amp;lt;add
        name="AspNetWindowsTokenRoleProvider"
        applicationName="/"
        type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
      /&amp;gt;
    &amp;lt;/providers&amp;gt;
  &amp;lt;/roleManager&amp;gt;
&amp;lt;/system.web&amp;gt;
&lt;/pre&gt;
&lt;p&gt;The important thing to note is the connectionStringName attributes that are configured to use LocalSqlServer. If you change the settings for LocalSqlServer then the membership and roleManager will automatically use the updated setting.&lt;/p&gt;
&lt;p&gt;Many SharePoint FBA guides recommend changing the web.config for the web application. This is still a good recommendation however if you choose this implementation method, be sure not to use both methods and edit both the machine.config and web.config. For example, I added the following to my web.config:&lt;/p&gt;&lt;pre class="xml" name="code"&gt;&amp;lt;system.web&amp;gt;
  &amp;lt;!-- This caused the SharePoint authentication to fail.
       I already knew these providers were configured in the machine.config,
       so I simply referenced them. --&amp;gt;
  &amp;lt;membership defaultProvider="AspNetSqlMembershipProvider" /&amp;gt;
  &amp;lt;roleManager defaultProvider="AspNetSqlRoleProvider" enabled="true" /&amp;gt;
&lt;/pre&gt;
&lt;p&gt;What happened is that I tried to login and I would see an "Access Denied" screen. I double-checked the Site collection administrators in the SharePoint Central Administration and it was set properly but I was unable to access any content using FBA. Eventually it dawned on me to remove the configuration from the web.config and simply try the settings in Central Administration under Application Management \ Authentication providers. Once I removed the redundant information in web.config, FBA worked again.&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5f1f6b19-c0ca-4ce8-9788-e61971de936c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/SharePoint" rel="tag"&gt;SharePoint&lt;/a&gt;, &lt;a href="http://technorati.com/tags/MOSS%202007" rel="tag"&gt;MOSS 2007&lt;/a&gt;, &lt;a href="http://technorati.com/tags/FBA" rel="tag"&gt;FBA&lt;/a&gt;&lt;/div&gt;&lt;img src="http://nimblecoder.com/blog/aggbug/63.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Van Slooten</dc:creator>
            <guid>http://nimblecoder.com/blog/archive/2008/04/14/sharepoint-fba-configuration-and-machine.config.aspx</guid>
            <pubDate>Mon, 14 Apr 2008 20:23:10 GMT</pubDate>
            <wfw:comment>http://nimblecoder.com/blog/comments/63.aspx</wfw:comment>
            <comments>http://nimblecoder.com/blog/archive/2008/04/14/sharepoint-fba-configuration-and-machine.config.aspx#feedback</comments>
            <wfw:commentRss>http://nimblecoder.com/blog/comments/commentRss/63.aspx</wfw:commentRss>
            <trackback:ping>http://nimblecoder.com/blog/services/trackbacks/63.aspx</trackback:ping>
        </item>
    </channel>
</rss>