Skip to main content

Wen He

Go Search
Wen He
Home
  

Other Blogs
Randy Williams
SharePoint Meditation in Motion
Mastering SharePoint

Virtual Path Provider

image

 

Web Part

image

Object Model

image

Forms Authentication

REFERENCES

Steve Peschka (bb975136)
Cross-posted from http://blogs.msdn.com/harsh/archive/2007/01/10/forms-based-authentication-in-moss.aspx

ASPNET SQL PROVIDER

- Connection String for local SQL
<membership defaultProvider="AspNetSqlMembershipProvider" />
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="data source=127.0.0.1;Integrated Security=SSPI;Initial Catalog=aspnetdb" />
</connectionStrings>

- Connection String for Remote SQL
<connectionStrings>
<add name="SqlProviderConnection" connectionString="server=SQLSERVERMACHINE;database=aspnetdb;Trusted_Connection=True" />
</connectionStrings>

- Role Provider XML
<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
<providers>
<remove name="AspNetSqlRoleProvider" />
<add connectionStringName="LocalSqlServer" applicationName="/"
description="Stores and retrieves roles data from the local Microsoft SQL Server database" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>

- Membership Provider XML
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<remove name="AspNetSqlMembershipProvider" />
<add connectionStringName="SqlProviderConnection" passwordAttemptWindow="10" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" description="Stores and retrieves membership data from the Microsoft SQL Server database" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>

Office Server LDAP

Membershipprovider XML

<membership defaultProvider="PeopleDCLDAPMembership">
<providers>
<add name="PeopleDCLDAPMembership" type="Microsoft.Office.Server.Security.LDAPMembershipProvider, Microsoft.Office.Server.LDAPProvider, Version=12.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" server=[server name as string] port="389" useSSL="false" userDNAttribute="distinguishedName" userNameAttribute="sAMAccountName" userContainer="OU=UserAccounts,DC=[fqdnstringpart],DC=[fqdnstringpart],DC=[fqdnstringpart],DC=com" userObjectClass="person" userFilter="(&amp;(ObjectClass=person))" scope="Subtree" otherRequiredUserAttributes="sn,givenname,cn" />
</providers>
</membership>

Roleprovider XML

<roleManager defaultProvider="PeopleDCLDAPRole" enabled="true" cacheRolesInCookie="true" cookieName=".PeopleDCRole">
<providers>
<add name="PeopleDCLDAPRole" type="Microsoft.SharePoint.Security.LDAPRoleProvider, Microsoft.SharePoint.LDAPProvider, Version=12.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5" server=[server name as string] port="389" useSSL="false" groupContainer="OU=UserAccounts, DC=[fqdnstringpart],DC=[fqdnstringpart],DC=[fqdnstringpart],DC=com" groupNameAttribute="sAMAccountName" groupMemberAttribute="uniquemember" userNameAttribute="sAMAccountName" dnAttribute="CN" groupFilter="(&amp;(ObjectClass=group))" scope="Subtree" />
</providers>
</roleManager>

WebSSO (ADFS)
- Modification to the Web Application Web.config

<sectionGroup name="system.web">
<section name="websso" type="System.Web.Security.SingleSignOn.WebSsoConfigurationHandler, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null" />
</sectionGroup>

<add key="SingleSignOnMembershipProvider" value="" />

<add name="Identity Federation Services Application Authentication Module" type="System.Web.Security.SingleSignOn.WebSsoAuthenticationModule, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null" />

<trust level="Full" originUrl="" />

Membership provider

<membership defaultProvider="SingleSignOnMembershipProvider">
<providers>
<add name="SingleSignOnMembershipProvider" type="System.Web.Security.SingleSignOn.SingleSignOnMembershipProvider, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fs="https://fs-server/adfs/fs/federationserverservice.asmx" />
</providers>
</membership>

Role provider

<roleManager enabled="true" defaultProvider="SingleSignOnRoleProvider">
<providers>
<add name="SingleSignOnRoleProvider" type="System.Web.Security.SingleSignOn.SingleSignOnRoleProvider, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fs="https://fs-server/adfs/fs/federationserverservice.asmx" />
</providers>
</roleManager>

<websso>
<authenticationrequired />
<auditlevel>55</auditlevel>
<urls>
<returnurl>https://servername</returnurl>
</urls>

<cookies Persistent="True">
<path>/</path>
</cookies>

<fs>https://fs-server/adfs/fs/federationserverservice.asmx</fs>
<!-- usettp / -->
<isSharePoint />
</websso>

- Modification to the Central Administration web application web.config

Membership Provider
<membership>
<providers>
<add name="SingleSignOnMembershipProvider" type="System.Web.Security.SingleSignOn.SingleSignOnMembershipProvider, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fs="https://fs-server/adfs/fs/federationserverservice.asmx" />
</providers>
</membership>


Role Provider
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" >
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add name="SingleSignOnRoleProvider" type="System.Web.Security.SingleSignOn.SingleSignOnRoleProvider, System.Web.Security.SingleSignOn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fs="https://fs-server/adfs/fs/federationserverservice.asmx" />
</providers>
</roleManager>

ASPNET Active Directory Provider

Connection string
<connectionStrings>
<add name="ADConnectionString" connectionString="LDAP://[domainname]/OU=UserAccounts, DC=[fqdnstringpart],DC=[fqdnstringpart],DC=com" />
</connectionStrings>

Membership Provider
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnectionString" enableSearchMethods="true" attributeMapUsername="sAMAccountName" />
</providers>
</membership>

Thanks to DW for compiling this list

OVERVIEW AND TROUBLESHOOTING


A lot of us who have played with Forms based Authentication with Microsoft Office SharePoint Server 2007 would know, that the steps for setting it up are fairly simple, however, if and when something does go wrong, finding it out is really a mess. Here's something that can help do so some basic troubleshooting:
A thumb rule to look for is, when you browse to the Login page, and the page loads without the CSS, then definitely something has gone amiss. That's the first clue. After this, it is many a times a mind game. The question that comes up is why is it so difficult to figure it out? A lot of people have asked me as to why there wasn't any logging or error handling implemented from within SharePoint to make it easier to troubleshoot Forms Based Authentication? The answer lies in understanding how SharePoint implements FBA.

As you can see from the flow diagram above, the bulk of the action happens within .NET Framework. From a SharePoint perspective the request to login (when you click the Login button) just sends the user credentials entered in the Login web control (yeah, we use that on the default login page!) to the Provider. Obviously, prior to this, the framework has already swung into action and prepped the environment by loading the Provider assembly based on the entries made in the web.config file. There are a whole bunch of problems that you can run into at this level. Let's take them one by one:

1. The assembly does not get loaded. The page displays File Not Found.
This is a classic in itself. There are multiple reasons for this to occur. The manifestation of this problem is a simple "File Not Found" string displayed in the browser window. By itself this does not tell much. If you do venture out and enable call stacks and turn on the debug flags in the web.config (refer the debugging explanation @ http://msdn2.microsoft.com/en-us/library/ms916837.aspx ), then you will see the error being generally thrown from a System.Reflection call on the provider assembly.
One solution that works is to check the name of the provider that is registered in the web.config. If you are using OOB providers, then obviously this does not apply. This solution works for custom providers. Why this causes a problem, is the reflection makes a call to the provider for loading. There is a overridden property within the provider called Name. If this has not been implemented properly to get/set the value specified in the web.config, then the framework keeps looking for the provider with a different name than the one that is actually returned from within the assembly.
Another solution that works, is running the Fusion Log Viewer, to make a note of the location the framework is looking for the provider assembly.
http://msdn2.microsoft.com/en-us/library/e74a18c4(VS.80).aspx
Closely looking at the log, generally reveals the location of the ASP.NET cache. Clearing this cache, will most likely solve the problem.

2. The browser displays the message "Default membership provider could not be found"
To solve this, check the web.config, for the value of the defaultProvider there. Then browse to the IIS manager, and open the property sheet for the web site corresponding to the web application throwing the error. Crack open the ASP.NET configuration settings. Under Authentication, take a look at the default provider. Due to some weird framework calls, the default provider gets reset to AspNetSqlMembershipProvider. Change it back to the correct one.

If you have seen these errors and have a solution that you vouch by, then I would like to hear about it. More interestingly, if you have seen errors other than these, I would like to hear about those too.
For others, if these don't solve the problem, contact your friendly neighborhood MS support guy.

EPM Best Practice with Project Server and SharePoint 2007

Skills

  • Config SQL Server Analysis Repository
  • Config Alternate Authentication
  • Config reporting cube settings

Resources

Bookmarks (from MSDN)

  • Project
  • SharePoint
  • VBA
  • PSI Extension
  • Reporting
    • Reporting Services
    • Analysis Services
    • Excel Services
  • Windows Workflow Foundation
  • Tools
  • Line of Business Integration
  • Business Data Catalog
  • InfoPath
Developer Bookmarks

Subject

Description

Link

Office

Microsoft Office Interactive Developer Map   The Microsoft Office Interactive Developer Map is a Windows Presentation Foundation (WPF) application that helps developers visualize the different programs, servers, services, and tools that will help them build solutions. It allows them to drill down to each product and technology and learn about new features, objects, Web services, namespaces, and schemas required to extend Microsoft Office and build custom Office Business Applications (OBAs).

http://msdn.microsoft.com/en-us/office/bb497969.aspx

Project (General)

What's new in Office Project 2007: This article examines what is new in Microsoft Office Project Server 2007, Project Web Access 2007, and Microsoft Office Project Professional 2007.

http://go.microsoft.com/fwlink/?LinkID=93713

 

Project Developer Portal Welcome to the Microsoft Office Project and Microsoft Office Project Server developers' home on MSDN. In this section, you will find summaries and links to information about planning, developing, and deploying Project– and Project Sever-based solutions.

http://msdn.microsoft.com/en-us/office/aa905469.aspx

 

Welcome to the Microsoft Office Project 2007 SDK Welcome to the Microsoft Office Project 2007 Software Development Kit (SDK). The SDK contains documentation, code samples, how-to articles, and programming references to help customize and integrate the Office Project 2007 clients and Microsoft Office Project Server 2007 with a wide variety of other desktop and business applications for enterprise project management.

http://msdn.microsoft.com/en-us/library/ms512767.aspx

http://www.microsoft.com/downloads/details.aspx?FamilyId=2672F6F9-7028-4B30-99A2-18CB1EED1ABE&displaylang=en (download)

 

Project Server 2007: Getting Started with a New Platform for Developers  Explore Microsoft Office Project Server 2007 functionality that uses a completely new platform built on Microsoft .NET Framework 3.0 and Windows SharePoint Services 3.0. Use the Project Server Interface (PSI) and Project Server events to extend and integrate Project Server with other applications. Extend Project Web Access, now a Windows SharePoint Services 3.0 site. Learn about the new Reporting database and Cube Build Service.

http://msdn.microsoft.com/en-us/library/bb456485.aspx

 

Managing Security in Project Server 2007: These articles describe how to manage Project Web Access users, groups, categories, templates, and Active directory synchronization.

http://technet.microsoft.com/en-us/library/cc197571.aspx

 

Understanding and Using the Queuing system in Office Project Server 2007 (Downloadable book): Covers instructions for understanding and using the Queuing system in Office Project Server 2007.

http://go.microsoft.com/fwlink/?LinkId=93744

SharePoint

SharePoint Server 2007 SDK: Software Development Kit   The Microsoft Office SharePoint Server 2007 SDK contains conceptual overviews, “How Do I…?” programming tasks, developer tools, code samples, references, and an Enterprise Content Management (ECM) starter kit to guide you in developing solutions based on Microsoft Office SharePoint Server 2007.

http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en (download)

 

Windows SharePoint Services 3.0: Software Development Kit (SDK)   The Windows SharePoint Services 3.0 software development kit (SDK) contains conceptual overviews, programming tasks, samples, and references to guide you in developing solutions based on Microsoft Windows SharePoint Services 3.0.

http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&displaylang=en  (download)

 

SharePoint Learning Resources: Learn more about Office SharePoint Server 2007 and related technologies to take advantage of the full enterprise capabilities. This site includes highlighted learning resources for developers and IT professionals.

http://sharepoint.microsoft.com/readiness/pages/search.aspx

 

The SharePoint Developer Introduction for .NET Developers

http://www.microsoft.com/click/SharePointDeveloper/

http://MSSharePointDeveloper.com

 

Best Practices: Using Disposable Windows SharePoint Services Objects   Learn the appropriate ways to write your code when using Microsoft Windows SharePoint Services objects so that you can avoid retaining the objects in memory with the Microsoft .NET Framework.

http://msdn.microsoft.com/en-us/library/aa973248.aspx

 

Best Practices: Common Coding Issues When Using the SharePoint Object Model   Learn about common issues encountered by developers who write custom code by using the SharePoint object model.

http://msdn.microsoft.com/en-us/library/bb687949.aspx

 

SharePoint Developers Webcast   In this 10 part series, you will receive practical technical information from Robert Bogue and Andrew Connell, both SharePoint MVPs, covering 10 fundamental developer topics on SharePoint via Live Meeting webcast.

http://blogs.msdn.com/chrisfie/archive/2008/05/21/sharepoint-developers-webcast.aspx

Project Desktop

Test Framework   Controller/client test framework can be used to test any assembly or .exe with and object model (any MS Office app).

http://www.codeplex.com/TestFramework

 

Sample COM Add-in code for Project Professional 2007

http://blogs.msdn.com/chrisfie/archive/2007/08/03/sample-com-add-in-code-for-project-professional-2007.aspx

 

Importing Project 2007 Tasks from Excel Using a Managed Code Add-In   Learn how to develop and deploy a managed code add-in for Microsoft Office Project 2007 that imports task data from Microsoft Office Excel, using Microsoft Visual Studio 2008 with Visual Studio Tools for Office.

http://msdn.microsoft.com/en-us/library/bb738433.aspx

¡ Visual Basic for Applications (VBA)

Visual Basic for Applications

http://msdn.microsoft.com/en-us/isv/bb190538.aspx

 

Converting Code from VBA to Visual Basic .NET

http://msdn.microsoft.com/en-us/library/aa192490(office.11).aspx

 

Migrating a VBA Solution to a Visual Studio Tools for Office Add-In

http://msdn.microsoft.com/en-us/library/aa830702.aspx

 

Project Object Model

http://msdn.microsoft.com/en-us/library/bb179353.aspx

¡ Visual Studio Tools for Office (VSTO)

Office Development with Visual Studio Developer Portal

http://msdn.microsoft.com/en-us/office/aa905533.aspx

Timesheet and Statusing

Timesheeting and Statusing Data Flow Diagram   Please find attached a Visio 2007 diagram that shows the standard data flow for time tracking and reporting progress in EPM 2007. Might be useful if you are doing customization using the Tied-Mode solution starter released last week on CodePlex.

http://blogs.msdn.com/chrisfie/archive/2007/11/20/timesheeting-and-statusing-data-flow-diagram.aspx

 

Project Server 2007 Timesheet data population tool  The Project Server 2007 Timesheet Data Population Tool enables you to simulate timesheet entries in your farm. This tool can help you perform scalability studies of your PS architecture and validate the sizing of an existing architecture (by measuring timesheet queue throughput for instance). This tool can also be used to test timesheet customization, for instance the Timesheet Tied-mode code sample on http://www.codeplex.com/EPMTSST. This powerful tool should not be run a production environment.

http://www.codeplex.com/EPMTSdatapop

 

EPM Timesheet & Statusing Customization Samples Code samples that demonstrate how EPM (Project Server) 2007 Timesheet and Statusing functionalities could be customized using custom event handlers and Project Server Interface calls. These samples leverage the Timesheeting and Statusing API documented in the EPM 2007 SDK

http://www.codeplex.com/EPMTSST

 

Project Server 2007 Timesheet Tied-Mode Service and Event Handler  This project is used with Microsoft Project Server 2007. It consists of an NT service, an event handler, a test app and installer. The event handler is fired when a tiemsheet is saved. The handler saves the timesheet info in a SQL table. The NT service (TSAutoStatus) polls the table for work from the event handler. It imports and submits the timesheet. This work is based upon EPM Timesheet tied-mode work done by Christophe Fiessinger (http://blogs.msdn.com/chrisfie).

http://www.codeplex.com/AutoStatusService

 

Figuring out the ChangeXML format when using the 'UpdateStatus' method

http://blogs.msdn.com/chrisfie/archive/2007/10/31/figuring-out-the-changexml-format-when-using-the-updatestatus-method.aspx

PSI Extension

Scenarios for PSI Extension   following reasons why one might consider such customization

http://blogs.msdn.com/chrisfie/archive/2007/07/31/scenarios-for-psi-extension.aspx

 

Walkthrough: Creating a PSI Extension  The Project Server Interface (PSI) for Microsoft Office Project Server 2007 can be extended with custom Web services. PSI extensions tightly integrate with Project Server, can call other PSI methods, and can use the same security infrastructure that the rest of the PSI uses.

http://msdn2.microsoft.com/en-us/library/bb428837.aspx

 

Lessons Learned from writing a PSI Extension

http://blogs.msdn.com/chrisfie/archive/2007/08/02/lessons-learned-from-writing-a-psi-extension.aspx

Reporting

New SQL Reporting Services Sample Reports for Project Server

http://blogs.msdn.com/chrisfie/archive/2008/04/10/new-sql-reporting-services-sample-reports-for-project-server.aspx

 

Project Server Extended Report Pack from Project Conference  

http://blogs.msdn.com/chrisfie/archive/2007/10/30/project-server-extended-report-pack-from-project-conference.aspx

 

Project Server 2007 Sample Databases   Project Server 2007 sample databases.

http://code.msdn.microsoft.com/PS2007SampleDB

 

How to extract and view Timesheet Audit Data?

http://blogs.msdn.com/chrisfie/archive/2007/10/10/how-to-extract-and-view-timesheet-audit-data.aspx

 

Controlling the project workspaces list

http://blogs.msdn.com/chrisfie/archive/2007/10/03/controlling-the-project-workspaces-list.aspx

 

Getting at the Task Time Phased Data

http://blogs.msdn.com/project_programmability/archive/2007/05/24/getting-at-the-task-time-phased-data.aspx

 

Reporting Database Extensions: Local Custom Fields Custom Code  This custom solution builds on the Project Server 2007 server-side event model to cache a report-friendly copy of Project Local Custom Fields in the Reporting database.

http://blogs.msdn.com/project_programmability/archive/2008/01/03/reporting-database-extensions-local-custom-fields-custom-code.aspx

 

Scalable Issues & Risks Report

http://blogs.msdn.com/project_programmability/archive/2007/09/28/scalable-issues-risks-report.aspx

 

How to create a Milestone Report

http://blogs.msdn.com/chrisfie/archive/2008/03/11/how-to-create-a-milestone-report.aspx

 

How to track EPM Resource field changes in your Reporting Database

http://blogs.msdn.com/chrisfie/archive/2007/10/26/how-to-track-epm-resource-field-changes-in-your-reporting-database.aspx

¡ SQL Server Reporting Services (SSRS)

SQL Server 2005 – Reporting Services   SQL Server 2005 Reporting Services is a new server-based reporting platform that you can use to create and manage tabular, matrix, graphical, and free-form reports that contain data from relational and multidimensional data sources. The reports that you create can be viewed and managed over a Web-based connection.

http://technet.microsoft.com/en-us/sqlserver/bb331776.aspx

 

Implementing a Security Extension   Microsoft Windows Authentication is the primary system for securing reports in Microsoft SQL Server 2005 Reporting Services. In certain cases, however, you may need to extend the Reporting Services security system to accommodate custom security in your enterprise. You can do this using the development platform provided by the Reporting Services API. This section will present an overview of security extensions in Reporting Services.

http://msdn.microsoft.com/en-us/library/ms155029.aspx

 

Customizing Analysis Services Cube Using Analysis Management Objects (AMO)   This post describes the steps required to perform SQL Analysis Services 2005 Project Server 2007 Cube customization using Analysis Management Objects (AMO).

http://blogs.msdn.com/chrisfie/archive/2007/08/06/customizing-analysis-services-cube-using-analysis-management-objects-amo.aspx

¡ SQL Server Analysis Services (SSAS)

Analysis Management Objects (AMO)

http://msdn.microsoft.com/en-us/library/ms124924.aspx

 

Persisting SSAS OLAP Roles In Project Server 2007 During the standard Cube Building process in Project Server 2007, any manually added OLAP Roles in an OLAP database are deleted. The Cube building creates a default Role ProjectServerViewOlapDataRole that automatically adds all the Project Server users to this Role. This customization saves the configuration of the existing OLAP Roles (except for ProjectServerViewOlapDataRole) in a text file, before they are deleted but the standard cube building process, using the OnCubeBuilding event. The saved configuration of the OLAP Roles is then restored using the following event OnCubeProcessed.

http://www.codeplex.com/epmssas

 

Customizing Analysis Services Cube Using Analysis Management Objects (AMO)

http://blogs.msdn.com/chrisfie/archive/2007/08/06/customizing-analysis-services-cube-using-analysis-management-objects-amo.aspx

¡ Excel Services