16.01.2013 Views

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

716 Part VIII: Securing SharePoint <strong>Products</strong> <strong>and</strong> <strong>Technologies</strong><br />

To disable the single sign-on service, do the following on each front-end Web<br />

server, job server, <strong>and</strong> any server running the single sign-on service:<br />

1. On the taskbar, click Start, point to Administrative Tools, <strong>and</strong> then click<br />

Services.<br />

2. On the Services management console, double-click <strong>Microsoft</strong> Single Sign-on<br />

Service.<br />

3. On the General tab, in the Startup type list, click Manual.<br />

4. In the Service status section, click Stop.<br />

5. Click OK.<br />

Creating a Web Part That Uses Single Sign-On<br />

After you have configured the single sign-on <strong>and</strong> created the application definitions,<br />

you need to develop a Web Part that implements the single sign-on functionality <strong>and</strong><br />

retrieves information from the corresponding back-end application programmatically.<br />

SharePoint Portal Server 2003 provides a programming interface for developers<br />

to use <strong>and</strong> extend the single sign-on feature. There are two namespaces provided<br />

solely for interaction with the single sign-on functionality, as well as one class in a<br />

more generic <strong>Microsoft</strong>.SharePoint.Portal namespace, as follows:<br />

■ The <strong>Microsoft</strong>.SharePoint.Portal.SingleSignOn namespace contains core classes<br />

that allow you to work with account credentials <strong>and</strong> application definitions in the<br />

single sign-on credentials store. These core classes <strong>and</strong> their functionality are listed<br />

in Table 26-1. The required assembly is <strong>Microsoft</strong>.SharePoint.Portal.SingleSignon,<br />

located in <strong>Microsoft</strong>.SharePoint.Portal.SingleSignon.dll.<br />

■ The <strong>Microsoft</strong>.SharePoint.Portal.SingleSignOn.Security namespace contains two<br />

classes that control the ability to access Single Sign-On resources programmatically<br />

from the code. These two classes <strong>and</strong> their functionality are listed in Table 26-2.<br />

The required assembly is <strong>Microsoft</strong>.SharePoint.Portal.SingleSignOn.Security,<br />

located in <strong>Microsoft</strong>.SharePoint.Portal.SingleSignOn.Security.dll.<br />

■ The SingleSignonLocator class in the <strong>Microsoft</strong>.SharePoint.Portal namespace<br />

allows you to locate a URL for the logon form for the SSOSrv service. It has the<br />

GetCredentialEntryUrl(strAppName, [port]) method that returns the URL for the<br />

logon form for a given application definition. The method takes two parameters:<br />

strAppName, which is a name of an application that is configured in the<br />

corresponding application definition, <strong>and</strong> the optional port number for SSL. If<br />

you do not specify the port number, <strong>and</strong> SSL is not enabled on the server, the<br />

port number will default to port 80 (that is, the port value will be omitted from<br />

the URL). If the second parameter is absent <strong>and</strong> SSL is enabled on the server,<br />

the port number is assumed to be the st<strong>and</strong>ard SSL port 443. However, if you<br />

require the URL returned to be formatted for SSL on a particular port, you need

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!