SharePoint Blogshttp://www.sharepointblogs.com/default.aspxAll SharePoint.&nbsp; All the time.en-USCommunityServer 2.0 (Build: 60526.2668)Posts and PDF Versions!http://www.sharepointblogs.com/helloitsliam/archive/2006/12/16/17015.aspxFri, 15 Dec 2006 22:27:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:17015helloitsliam1<P><FONT face=Arial color=#000000 size=2>Hello everyone, just wanted to let you all know that you might have noticed I have started adding PDF versions of some the posts (thanks again Shane!!)&nbsp;I have been working on. I won't be doing it for all the posts, but just wanted to see if there are any sepcific ones that would be useful if they were PDF's. If you have any that you think would be then drop us a message and I will see what I can do. </FONT></P> <P><FONT face=Arial color=#000000 size=2>Also I have upload four PDF's for the past authentication provider posts. They can either be downloaded direct from this post as a single zip file, or the actual posts themselves or you can access them using the links below if you have access:</FONT></P> <P><A href="/files/97/helloitsliam/entry17011.aspx" target=_blank><FONT face=Arial color=#ff0000 size=2>MOSS2007 - Custom Authentication Provider (Part 1)</FONT></A></P> <P><A href="/files/97/helloitsliam/entry17012.aspx" target=_blank><FONT face=Arial color=#ff0000 size=2>MOSS2007 - Custom Authentication Provider (Part 2)</FONT></A></P> <P><A href="/files/97/helloitsliam/entry17013.aspx" target=_blank><FONT face=Arial color=#ff0000 size=2>MOSS2007 - Custom Authentication Provider (Part 3)</FONT></A></P><A href="/files/97/helloitsliam/entry17014.aspx" target=_blank><FONT face=Arial color=#ff0000 size=2>MOSS2007 - Custom Authentication Provider (Part 4)</FONT></A><FONT face=Arial color=#000000 size=2> </FONT> <P><FONT face=Arial color=#000000 size=2>Hope you enjoy them. <FONT color=#008000><img src="/emoticons/emotion-2.gif" alt="Big Smile" /></FONT></FONT></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=17015" width="1" height="1">SharePointOffice System 2007MOSS2007 – Write your own custom authentication provider (Part 4)http://www.sharepointblogs.com/helloitsliam/archive/2006/12/16/17010.aspxFri, 15 Dec 2006 22:04:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:17010helloitsliam0<P class=MsoNormal><SPAN>So in the last few posts we have created a member and role provider and configured MOSS2007 to use this for authentication. Now we will create a new form for logging in and replace the current MOSS2007 one with our own. This form will handle the login via the authentication provider and then once authenticated pass it onto SharePoint for access to the Portal. <o:p></o:p></SPAN></P> <P class=MsoNormal><B><SPAN>NOTE:<SPAN>&nbsp; </SPAN>I will state that I am not too concerned with any error handling at this point.<o:p></o:p></SPAN></B></P> <P class=MsoNormal><SPAN>So to begin lets create a new website project within Visual Studio. Create this as a “File System” web site. For this example it will be called “LynxAuthProviderFBA” and be added to the current provider solution.<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN><A HREF="/photos/helloitsliam/images/16996/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16996/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN>Once the new project has loaded delete the default.aspx page and create two pages.<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>Login.aspx<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>ProcessLogin.aspx<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNormal><SPAN>You will also need to add a “Web.Config” if it does exist.<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN><A HREF="/photos/helloitsliam/images/16997/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16997/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN>Firstly we need to configure the “Web.Config” file with the correct syntax for using the Custom Authentication Provider. The following is the syntax for this file:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;?<SPAN>xml</SPAN> <SPAN>version</SPAN>="1.0"?&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;<SPAN>configuration</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>appSettings</SPAN>/&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>connectionStrings</SPAN>/&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>system.web</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>compilation</SPAN> <SPAN>debug</SPAN>="false" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>authentication</SPAN> <SPAN>mode</SPAN>="Forms" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT color=#ff0000>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;!--<SPAN>// Start Custom Member and Role Provider //</SPAN>--&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>membership</SPAN> <SPAN>defaultProvider</SPAN>="LynxAuthentication"&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>providers</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;<SPAN>add</SPAN> <SPAN>name</SPAN>="LynxAuthentication" <SPAN>type</SPAN>="LynxAuthProvider.Users.LynxUserProvider,LynxAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/<SPAN>providers</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/<SPAN>membership</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>roleManager</SPAN> <SPAN>enabled</SPAN>="true" <SPAN>defaultProvider</SPAN>="LynxRoleAuthentication"&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;<SPAN>providers</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;<SPAN>add</SPAN> <SPAN>name</SPAN>="LynxRoleAuthentication" <SPAN>type</SPAN>="LynxAuthProvider.Users.LynxRoleProvider,LynxAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/<SPAN>providers</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/<SPAN>roleManager</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;!--<SPAN>// End Custom Member and Role Provider //</SPAN>--&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT color=#ff0000>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/<SPAN>system.web</SPAN>&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;/<SPAN>configuration</SPAN>&gt;</FONT></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNormal><SPAN>Now we can start adding the login control to the main Login.aspx page. To do this simply open the page and expand the “Login” toolbox and drag the Login control onto the page.<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN><A HREF="/photos/helloitsliam/images/16998/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16998/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN>This should then look as below:<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN><A HREF="/photos/helloitsliam/images/16999/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16999/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN>To style this click the “Auto Format” and select the style you want. In this demo the login screen is nice and simple as below:<o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN><A HREF="/photos/helloitsliam/images/17000/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17000/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN>We now need to modify the code slightly so when the user clicks the login button the processing is completed using the ProcessLogin.aspx page. The code block currently looks as below:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;asp:Login ID="Login1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333"&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;InstructionTextStyle Font-Italic="True" ForeColor="Black" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;TextBoxStyle Font-Size="0.8em" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;/asp:Login&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNormal><SPAN>The modified code should now read: (The change is in bold)<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><FONT color=#ff0000><SPAN>&lt;asp:Login ID="Login1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333" <B>DestinationPageUrl="~/ProcessLogin.aspx"&gt;</B></SPAN><SPAN><o:p></o:p></SPAN></FONT></P> <P class=MsoNoSpacing><FONT color=#ff0000><SPAN>&lt;TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /&gt;</SPAN><SPAN><o:p></o:p></SPAN></FONT></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;InstructionTextStyle Font-Italic="True" ForeColor="Black" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;TextBoxStyle Font-Size="0.8em" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" /&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>&lt;/asp:Login&gt;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>Now we need to add some code to the ProcessLogin.aspx page. The completed page should be as below:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Data;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Configuration;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Collections;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Web;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Web.Security;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Web.UI;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Web.UI.WebControls;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Web.UI.WebControls.WebParts;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>using System.Web.UI.HtmlControls;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT color=#ff0000>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>public partial class ProcessLogin : System.Web.UI.Page<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>{<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;</SPAN><SPAN>&nbsp;&nbsp; </SPAN>protected void Page_Load(object sender, EventArgs e)<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>bool aBoolValue = true;<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>FormsAuthentication.RedirectFromLoginPage(Context.User.Identity.ToString(), aBoolValue);<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><FONT color=#ff0000><SPAN>}</SPAN><SPAN><o:p></o:p></SPAN></FONT></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>This code will simply accept the username that has already been validated by the authentication provider and passes this to MOSS2007. Now we need to compile the code and configure MOSS2007 to use this custom login page. Firstly once it has been compiled you need to copy the whole “LynxAuthProviderFBA” folder to the following location:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17001/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17001/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>Within Internet Information Server (IIS) we need to create this as an application. To do this open IIS and expand the site that is configured for Forms Based Authentication.<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17002/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17002/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>Right click the newly copied folder and select “Properties”. Once this has loaded select the “Create” button from the “Directory” page.<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17003/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17003/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>You will need to set the Application Pool to the current account that is being used by this site.<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17004/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17004/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>Now we need to modify the “Web.Config” file that is being used by the portal site. To do this, open the file within an XML editor. The file I am changing here is found here:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT color=#ff0000>C:\Inetpub\wwwroot_CUSTOMEXT<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>Edit the current code to the following:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17005/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17005/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17006/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17006/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>At this point you need to do an IISRESET or the changes will not work. <o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>When you try to access the portal site now you should now be presented with the following page:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17007/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17007/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>Once you pass the credentials as below it will then log you into the site as below:<o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17008/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17008/original.aspx" border=0></A></SPAN><SPAN> <o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><A HREF="/photos/helloitsliam/images/17009/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/17009/640x400.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p>&nbsp;</o:p></SPAN></P> <P class=MsoNoSpacing><SPAN>As you can see from this simple post you can create a custom form for authentication without really writing any code. Obviously for a proper solution you would need to write that, in another post coming up I will show the full login screen I am creating. <img src="/emoticons/emotion-5.gif" alt="Wink" /></SPAN></P> <P class=MsoNoSpacing><SPAN></SPAN>&nbsp;</P> <P class=MsoNoSpacing><SPAN><SPAN><STRONG><FONT color=#ff0000>** PDF VERSION ATTACHED **</FONT></STRONG></SPAN><o:p></o:p></SPAN></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=17010" width="1" height="1">SharePointOffice System 2007WSS 3.0 Application Template: GroupBoard Workspace 2007 Download!!http://www.sharepointblogs.com/jasonmedero/archive/2006/12/15/16993.aspxFri, 15 Dec 2006 20:30:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16993jmedero2<P>Hey everyone,</P> <P>Quick update I am not 100% sure of this but I think I found a diamond in the rough...&nbsp; The very first WSS 3.0 Application Template has been released by Microsoft today.&nbsp; I have received a ton of requests about using WSS V2 Application Templates with WSS V3 your answer to that question resides in my previous <A HREF="/jasonmedero/archive/2006/12/15/16989.aspx">POST</A>&nbsp;so check that out if thats what you are looking for.&nbsp; If your interested in checking out the GroupBoard Workspace template for WSS 3.0 here is some information for you from the Microsoft download site:</P> <H5>Brief Description</H5> <DIV id=quickDescription>The GroupBoard Workspace template for Microsoft Windows SharePoint Services 3.0 creates a space for a group or team to connect and share information in a collaborative environment, improving team efficiency and productivity.</DIV> <DIV>&nbsp;</DIV> <DIV> <H4>Overview</H4> <DIV class=downloadInfo><A name=Description></A><SPAN>The GroupBoard Workspace template creates a space for a group or team to connect and share information in a collaborative environment, improving team efficiency and productivity. The template helps track team member whereabouts and status, and includes a built-in timecard list and organization chart. Meetings can be scheduled with attendees, and meeting rooms and other resources can be reserved. It also enables members to share phone messages and circulate memos.<BR><BR>The GroupBoard Workspace 2007 template is available in two versions:<BR><B>GBW2007_x86_en-us.exe</B> – 32-bit version of GroupBoard Workspace 2007<BR><B>GBW2007_x64_en-us.exe</B> – 64-bit version of GroupBoard Workspace 2007<BR></SPAN></DIV> <DIV class=downloadInfo><SPAN>Now go play in the sandbox and download it&nbsp;<A href="http://www.microsoft.com/downloads/details.aspx?familyid=4030d847-31bc-43ea-90ec-111b546d5411&amp;displaylang=en"><STRONG>HERE</STRONG></A></SPAN></DIV> <DIV class=downloadInfo><SPAN></SPAN>&nbsp;</DIV> <DIV class=downloadInfo><SPAN>Cheers,</DIV></SPAN></DIV><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16993" width="1" height="1">Upgrade Toolkit for Windows SharePoint Services Sites and Templates Guide now available!http://www.sharepointblogs.com/jasonmedero/archive/2006/12/15/16989.aspxFri, 15 Dec 2006 15:00:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16989jmedero1<P>The upgrade toolkit for WSS and template guide should prove to be somewhat helpful to guide users who have "customized" their sites or have used WSS Application Templates (the 33 that were made available earlier in the year) and are looking to now upgrade their farm to WSS 3.0&nbsp;.&nbsp; Also provided is a set of upgraded templates to WSS 3.0 from the WSS 2.0 versions of the application templates.&nbsp; Here is some info from the Microsoft download site:</P> <H5>Brief Description</H5> <DIV id=quickDescription>Guidance and tools to enable IT Pros to upgrade custom WSS 2.0 sites and templates to function in WSS 3.0</DIV> <DIV>&nbsp;</DIV> <DIV> <H4>Overview</H4> <DIV class=downloadInfo><A name=Description></A><SPAN>The Toolkit serves three main purposes:<BR></DIV> <DIV class=downloadInfo> <UL><BR> <LI>To provide IT professionals with the guidance and tools they need to upgrade customized WSS 2.0 sites and site templates to function in a WSS 3.0 environment.<BR> <LI>To provide a set of upgraded application templates for Windows SharePoint Services based on those currently published for WSS 2.0 on TechNet.<BR> <LI>To provide instructions for installing these application templates in a WSS 3.0 environment.<BR></LI></UL></DIV><BR><BR>The 60 page guide covers the following topics: <UL><BR> <LI><B>Ch 1: Introduction</B>. Introduces the Upgrade Toolkit for Windows SharePoint Services Sites and Templates, explaining its purpose, scope, audience, and contents. <LI><B>Ch 2: Planning Your Template Upgrade</B>. Examines the site and site template upgrade process from beginning to end and gives you necessary information for planning your upgrade strategy. It explains that the upgrade process has two stages: one to perform before your WSS environment is upgraded to WSS 3.0, and one to perform after the upgrade. <LI><B>Ch 3: Preparing a Site Template Based on a Customized Site Definition</B>. If you determine, based on Chapter 2, that one or more of your site templates are based on customized site definitions, this chapter will familiarize you with upgrade definition files and new site definitions. <LI><B>Ch 4: Stage 1: Before Upgrading to WSS 3.0</B>. Describes the Stage 1 site template upgrade steps that you must perform before starting the WSS 3.0 upgrade. <LI><B>Ch 5: Stage 2: After Upgrading to WSS 3.0</B>. Describes the Stage 2 site template upgrade steps that you must perform after finishing the WSS 3.0 upgrade. <LI><B>Ch 6: The Upgraded Application Templates for WSS</B>. Lists and describes the function of each of the upgraded application templates for WSS and gives you detailed instructions for installing the application templates in a WSS 3.0 environment. <LI><B>Ch 7: Troubleshooting</B>. Provides workarounds and fixes for problems you may encounter. <LI><B>Appendix</B>: <B>Glossary</B>. Lists the relevant terms used in this solution accelerator.</LI></UL><BR>Also included in this toolkit are: <UL><BR> <LI>A set of command scripts to streamline some of the server tasks during the site and template upgrade <LI>A set of upgraded application templates for WSS 3.0.</LI></UL> <P>So what are you waiting for...go check out the upgrade guidance toolkit <A href="http://www.microsoft.com/downloads/details.aspx?familyid=a70bd8f8-a0f0-4d00-9010-8e40b7c98f68&amp;displaylang=en">HERE</A></P> <P>Cheers,</P></SPAN></DIV><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16989" width="1" height="1">Problem Using Filters to a custom list in the CQWPhttp://www.sharepointblogs.com/joostschermers/archive/2006/12/15/16986.aspxFri, 15 Dec 2006 08:49:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16986Tsooj0<P>Here's a little struggling i wanted to share with you&nbsp;using the filter of the CQWP.<BR><BR><STRONG>Case<BR></STRONG>For a customer we need to display the same&nbsp;content in different sites&nbsp;based on different permissions for an internetsite. Using only one pages&nbsp;library to control the maintainance of the site. (only&nbsp;in this library&nbsp;users are allowed to create pages) </P> <P><STRONG>Plan<BR></STRONG>My plan was to do the following:</P> <OL> <LI>Create a custom list&nbsp;for the metadata <LI>Create a column&nbsp;using the&nbsp;lookup field at top level <LI>Set this column to allow multiple values <LI>Add this column to a existing&nbsp;content type <LI>Add this content field to the&nbsp;page using sharepoint designer <LI>Saved, checked in&nbsp;&amp; approved the page <LI>Use the CQWP to filter content</LI></OL> <P><STRONG>Problem<BR></STRONG>Step 1 to 6 all went smoothly off course but here comes the problem. I needed to filter the custom list on multiple values which are stored in the custom list. (i allowed multiple values when i created the column)</P> <P>Here's a little explanation of my&nbsp;first&nbsp;solution and where it failed. <BR><BR>Let's say i added these&nbsp;items&nbsp;to the custom list (=contentfield values in sharepoint designer):&nbsp;</P> <UL> <LI>police <LI>fire department <LI>hospital</LI></UL> <P>And i created three pages</P> <OL> <LI>one page with content for the police and fire department <LI>one page with content for the fire department and the hospital <LI>one page with content for the hospital</LI></OL> <P>Using the CQWP&nbsp;i&nbsp;wanted to query the content in the page library. I wanted to display the content&nbsp;for the police and the hospital on a public site based on two different values of the content field. So i would use the filter in the CQWP and say <EM>show items when custom list is equal to&nbsp;police</EM>&nbsp;&nbsp;or <EM>show items when custom list is equal to hospital.</EM></P> <P>On another site ( for the police)&nbsp;i wanted to display only page 1 so here i would also use the CQWP and filter on <EM>show items when custom list is equal to&nbsp;police. ......</EM>and so on<BR><BR>Now the site can display the same content (page 1) on different sites for different users storing content in the same page library and using the custom list for the metadata (very flexible). So as you can see a very scalable solution.</P> <P>It seems that the&nbsp;CQWP <STRONG>cannot</STRONG> filter on contentfields when they are allowed to use multiple values (it <STRONG>can</STRONG> filter the contentfield when the column is set to allow only 1 value). They aren't even displayed in the selection list. This is a major issue when i my case i have to <EM>customize </EM>the <EM>article image on the left</EM> page with three of the same contentfields. But what if i have 5 different&nbsp;values of content&nbsp;i want to attach the one page of maybe 10 while one articlepage may cover more subjects.</P> <P>A solution might be&nbsp;to&nbsp;add only one single line of text but then spelling might be an issue and&nbsp;it's way harder to maintain the&nbsp;consistancy.&nbsp;<BR><BR>Maybe some of you allready knew but i unfortunately didn't ( it definaltey took me a while to figure this out). <BR>If you have a solution to cover this problem don't hesitate to mail me ;)</P> <P><STRONG>tnx for reading!!</STRONG></P> <P>&nbsp;</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16986" width="1" height="1">MOSS2007 – Write your own custom authentication provider (Part 3)http://www.sharepointblogs.com/helloitsliam/archive/2006/12/14/16973.aspxThu, 14 Dec 2006 16:51:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16973helloitsliam1<P class=MsoNormal><FONT face=Arial size=2>In the last couple of posts we have looked at creating our own custom authentication provider. We also looked at using this with a MOSS2007 infrastructure. In this post we will look at adding the “Role Provider” functionality to this provider. If you are not familiar with the various properties and methods for this check the link below for more details:</FONT></P> <P class=MsoNormal><A href="http://msdn2.microsoft.com/en-us/library/system.web.security.roleprovider.aspx"><FONT face=Arial color=#0000ff size=2>http://msdn2.microsoft.com/en-us/library/system.web.security.roleprovider.aspx</FONT></A></P> <P class=MsoNormal><FONT face=Arial size=2>So let’s begin. Firstly let’s open up our Visual Studio project that we created earlier and add a new class to it. This class in this example will be called “LynxRolerProvider.cs”. The file structure should now look as below:</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial size=2><A HREF="/photos/helloitsliam/images/16963/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16963/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial size=2>Now we need to edit the class and add the following code block:</FONT></P> <P class=MsoNormal><STRONG><FONT face=Arial color=#ff0000 size=2>NOTE: If you get any issues with MOSS2007 not being able to create an abstract class you can leave it as a "normal" class</FONT></STRONG></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System; <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Data; <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Data.SqlClient; <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Web; <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Web.UI; <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Web.Security; <o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Collections;<o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Collections.Generic;<o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><FONT color=#000000><SPAN>using</SPAN><SPAN> System.Diagnostics;<o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><SPAN><o:p><FONT color=#000000>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNormal><FONT color=#000000><SPAN>namespace</SPAN><SPAN> LynxAuthProvider.Users<o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><SPAN><FONT color=#000000>{<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT color=#000000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT color=#000000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN>public</SPAN> <SPAN>abstract class</SPAN> <SPAN>LynxRoleProvider</SPAN> : <SPAN>RoleProvider</SPAN> <o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT color=#000000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT color=#000000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>} <o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT color=#000000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT color=#000000>}<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN>This gives us our core structure. No when creating a role provider there are various methods that we need to use, just like creating a Membership Provider. The following is a list of the basic override properties.<o:p></o:p></SPAN></P> <P class=MsoNormal><FONT size=2><SPAN><A HREF="/photos/helloitsliam/images/16964/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16964/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><SPAN><FONT size=2>The following is a list of the methods that we will be using.<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><FONT size=2><SPAN><A HREF="/photos/helloitsliam/images/16965/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16965/original.aspx" border=0></A></SPAN><SPAN><o:p></o:p></SPAN></FONT></P> <P class=MsoNormal><SPAN><FONT size=2>The methods we will use for the provider will be:<o:p></o:p></FONT></SPAN></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>1.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>FindUsersInRole</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>2.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>GetAllRoles</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>3.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>GetRolesForUser</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>4.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>GetUsersInRole</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>5.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>IsUserInRole</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>6.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>GetValues</FONT></FONT></FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>You will probably also want to create the following methods with your own code. This post will not cover this as this can be quite specific for each provider.</FONT></P> <P class=MsoNoSpacing><SPAN><FONT face=Arial size=2></FONT></SPAN>&nbsp;</P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>1.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>AddUsersToRoles</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>2.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>CreateRole</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>3.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>DeleteRole</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>4.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>AddOrDeleteUserRoles</FONT></FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN><SPAN>5.<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN>RemoveUsersFromRoles</FONT></FONT></FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>In order for this to work we will need database tables that can handle the roles. The tables being used are as below:</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>Role Table<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <TABLE class=MsoTableLightListAccent2 cellSpacing=0 cellPadding=0> <TR> <TD> <P class=MsoNoSpacing align=center><B><SPAN><FONT size=2><FONT face=Arial>Column Name<o:p></o:p></FONT></FONT></SPAN></B></P></TD> <TD> <P class=MsoNoSpacing align=center><B><SPAN><FONT size=2><FONT face=Arial>Column Type<o:p></o:p></FONT></FONT></SPAN></B></P></TD></TR> <TR> <TD> <P class=MsoNoSpacing align=center><B><FONT size=2><FONT face=Arial>UserID<o:p></o:p></FONT></FONT></B></P></TD> <TD> <P class=MsoNoSpacing align=center><FONT face=Arial size=2>Integer</FONT></P></TD></TR> <TR> <TD> <P class=MsoNoSpacing align=center><B><FONT size=2><FONT face=Arial>RoleID<o:p></o:p></FONT></FONT></B></P></TD> <TD> <P class=MsoNoSpacing align=center><FONT face=Arial size=2>Integer</FONT></P></TD></TR></TABLE> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>User to Role Mapping Table<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <TABLE class=MsoTableLightListAccent2 cellSpacing=0 cellPadding=0> <TR> <TD> <P class=MsoNoSpacing align=center><B><SPAN><FONT size=2><FONT face=Arial>Column Name<o:p></o:p></FONT></FONT></SPAN></B></P></TD> <TD> <P class=MsoNoSpacing align=center><B><SPAN><FONT size=2><FONT face=Arial>Column Type<o:p></o:p></FONT></FONT></SPAN></B></P></TD></TR> <TR> <TD> <P class=MsoNoSpacing align=center><B><FONT size=2><FONT face=Arial>RoleID<o:p></o:p></FONT></FONT></B></P></TD> <TD> <P class=MsoNoSpacing align=center><FONT face=Arial size=2>Integer (IDENTITY)</FONT></P></TD></TR> <TR> <TD> <P class=MsoNoSpacing align=center><B><FONT size=2><FONT face=Arial>RoleName<o:p></o:p></FONT></FONT></B></P></TD> <TD> <P class=MsoNoSpacing align=center><FONT face=Arial size=2>Nvarchar(50)</FONT></P></TD></TR></TABLE> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>Now we have the tables we can start to create the code. <SPAN>&nbsp;</SPAN>The following is the code blocks we need:</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>FindUsersInRole<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>Sql = "SELECT LynxUsers.* FROM LynxUserRoles INNER JOIN LynxRoles ON LynxUserRoles.RoleID = " +<SPAN>&nbsp; </SPAN>"LynxRoles.RoleID INNER JOIN LynxUsers ON LynxUserRoles.UserID = LynxUsers.UserID WHERE " + "(LynxRoles.RoleName = '" + roleName + "')"; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>if ( usernameToMatch != "" ) <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>{ <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>Sql += " AND (LynxUsers.UserName LIKE '" + usernameToMatch + "%')"; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>} <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>ds = LynxHelper.GetDataSet( Sql ); <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>return GetValues( "UserName" ); <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>GetAllRoles<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial>**********************************************************************************</FONT></FONT></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><SPAN><FONT color=#ff0000>Sql = "select * from LynxRoles"; <o:p></o:p></FONT></SPAN></FONT></FONT></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial color=#ff0000 size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>ds = LynxHelper.GetDataSet( Sql ); <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>return GetValues( "RoleName" );</FONT> <o:p></o:p></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>GetRolesForUser<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>Sql = "SELECT LynxRoles.* FROM LynxUserRoles INNER JOIN LynxRoles ON LynxUserRoles.RoleID = " + "LynxRoles.RoleID INNER JOIN LynxUsers ON LynxUserRoles.UserID = LynxUsers.UserID WHERE (LynxUsers.UserName = '" + username + "')"; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial color=#ff0000 size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>ds = LynxHelper.GetDataSet( Sql ); <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial color=#ff0000>return GetValues( "RoleName" ); </FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><o:p></o:p></FONT></FONT></SPAN>&nbsp;</P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial>**********************************************************************************<SPAN><o:p></o:p></SPAN></FONT></FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>GetUsersInRole<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><FONT color=#ff0000><SPAN><FONT size=2><FONT face=Arial>Sql = "SELECT tbUsers.* FROM tbUserRoles INNER JOIN tbRoles ON tbUserRoles.RoleID = " + </FONT></FONT></SPAN><SPAN><FONT size=2><FONT face=Arial>"tbRoles.RoleID INNER JOIN tbUsers ON tbUserRoles.UserID = tbUsers.UserID WHERE " + <o:p></o:p></FONT></FONT></SPAN></FONT></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;</SPAN>"(tbRoles.RoleName = '" + roleName + "')"; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial color=#ff0000 size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>ds = LynxHelper.GetDataSet( Sql ); <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>return GetValues( "UserName" );</FONT> <o:p></o:p></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>IsUserInRole<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>Sql = "SELECT tbUserRoles.* FROM tbUserRoles INNER JOIN tbRoles ON tbUserRoles.RoleID = " + <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>"tbRoles.RoleID INNER JOIN tbUsers ON tbUserRoles.UserID = tbUsers.UserID WHERE " + <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>"(tbUsers.UserName = '" + username + "') AND (tbRoles.RoleName = '" + roleName + "')"; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial color=#ff0000 size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>ds = Helper.GetDataSet( Sql ); <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>if ( ( ds != null ) &amp;&amp; ( ds.Tables[ 0 ].Rows.Count &gt; 0 ) ) <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>{ <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return true; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>} <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>else <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>{ <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return false; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>}</FONT> <o:p></o:p></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>*********************************************************************************</FONT></P> <P class=MsoNoSpacing><U><o:p><SPAN><FONT face=Arial size=2>&nbsp;</FONT></SPAN></o:p></U></P> <P class=MsoNoSpacing><U><FONT size=2><FONT face=Arial>GetValues<o:p></o:p></FONT></FONT></U></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>DataRow dr = null;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>string[] ret = null;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>int Cur = 0;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial color=#ff0000 size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>if ((ds != null) &amp;&amp; (ds.Tables[0].Rows.Count &gt; 0))<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>{<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ret = new string[ds.Tables[0].Rows.Count - 1];<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>foreach (System.Data.DataRow drGetValues in ds.Tables[0].Rows)<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>dr = drGetValues;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ret[Cur] = System.Convert.ToString(dr[FieldName]);<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Cur += 1;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>}<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial color=#ff0000 size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>return ret;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>**********************************************************************************</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>Now we can compile the code and add to the GAC. Firstly remove it from the GAC using the following syntax:</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2><STRONG>gacutil –u LynxAuthProvider</STRONG></FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>Then add to the GAC as per the previous post. As with the last couple of posts we need to modify the “Web.Config” files to add the role provider. Currently for the Central Administration, Internal Site and External Site the web configuration file has the following code block.</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;membership defaultProvider="LynxAuthentication"&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;add name="LynxAuthentication" type="LynxAuthProvider.Users.LynxUserProvider,LynxAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;/membership&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>The configuration code needs to be changed in the Central Administration and the Internal Portal Web Configuration files, note the default role provider is still windows authentication.</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;membership defaultProvider="LynxAuthentication"&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;add name="LynxAuthentication" type="LynxAuthProvider.Users.LynxUserProvider,LynxAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;/membership&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true"&gt; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;add name="LynxRoleAuthentication" type="LynxAuthProvider.Users.LynxRoleProvider,LynxAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;/roleManager&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><FONT face=Arial size=2>In the external web configuration file this is slightly different.</FONT></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;membership defaultProvider="LynxAuthentication"&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;add name="LynxAuthentication" type="LynxAuthProvider.Users.LynxUserProvider,LynxAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;/membership&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;roleManager defaultProvider="LynxRoleAuthentication " enabled="true"&gt; <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;add name="LynxRoleAuthentication" type="LynxAuthProvider.Users.LynxRoleProvider,LynxAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;/providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;/roleManager&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><SPAN><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNoSpacing><B><SPAN><FONT size=2><FONT face=Arial><U>NOTE: You may want to do an IISRESET now.<o:p></o:p></U></FONT></FONT></SPAN></B></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>Now we can make changes to the Central Administration Authentication Provider screen. Simply load central administration and select the “Application Management” tab and select “Authentication Providers”.</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT face=Arial size=2><A HREF="/photos/helloitsliam/images/16966/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16966/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>Now modify the page as shown below:</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT face=Arial size=2><A HREF="/photos/helloitsliam/images/16967/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16967/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>Now we can go to the site (NTLM version) and add the roles into the system as groups. If we load the “Add Users &amp; Groups” page for the internal portal and select the relevant group. For this example we will select the “Custom Portal Owners” group in the portal and add the new role group we added.</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT face=Arial size=2><A HREF="/photos/helloitsliam/images/16968/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16968/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>If we type the following group name it should then resolve when pressing the check name icon.</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT size=2><FONT face=Arial><SPAN><A HREF="/photos/helloitsliam/images/16969/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16969/original.aspx" border=0></A></SPAN> </FONT></FONT></P> <P class=MsoNoSpacing><SPAN><FONT face=Arial size=2><A HREF="/photos/helloitsliam/images/16970/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16970/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>Notice that if you hover over the added role it will show you the provider name. Now we have this simply remove the name “DEMO2” from the list of users so it just shows the group for access.</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT face=Arial size=2><A HREF="/photos/helloitsliam/images/16971/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16971/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><FONT face=Arial size=2>If we now attempt to login we should be able to use or DEMO2 account and should still get access, via the Role Group we added. To prove that it worked you should see that the “Welcome” control at the top has the name of the DEMO2 user.</FONT></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P class=MsoNoSpacing><SPAN><FONT face=Arial size=2><A HREF="/photos/helloitsliam/images/16972/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16972/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNoSpacing><o:p><FONT face=Arial size=2>&nbsp;</FONT></o:p></P> <P><SPAN><FONT face=Arial size=2>As you can see, adding role capability to the system is fairly straight forward. The only issues I faced were in getting the web configuration files correct for each of the different sites and adding the correct syntax to them. Now we have the provider written and working, in the next post we will look at consuming this within a custom login screen instead of the OOTB one. Have Fun!! <img src="/emoticons/emotion-4.gif" alt="Stick out tongue" /></FONT></SPAN></P> <P><SPAN><FONT face=Arial color=#ff0000 size=2><STRONG>** PDF VERSION ATTACHED **</STRONG></FONT></SPAN></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16973" width="1" height="1">SharePointOffice System 2007C# 2.0: Bad compiler warnings when using anonymous methods for Predicate&lt;T&gt;http://www.sharepointblogs.com/vandest/archive/2006/12/14/16951.aspxThu, 14 Dec 2006 10:02:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16951vandest0<P>Today I got a strange error while working with generic lists and the Find method. I was supplying an anonymous delegate as predicate which resulted in the following error:<BR><BR><EM><FONT size=2>"cannot convert from 'anonymous method' to 'System.Predicate&lt;Whatever&gt;'".</FONT></EM></P> <P>I stumbled upon the following blog post that mentioned to perform explicit casting of the delegate to see the actual error:</P> <P><A href="http://weblogs.asp.net/avnerk/archive/2006/05/22/Bad-compiler-warnings-when-using-anonymous-methods-for-Predicate_3C00_T_3E00_.aspx">http://weblogs.asp.net/avnerk/archive/2006/05/22/Bad-compiler-warnings-when-using-anonymous-methods-for-Predicate_3C00_T_3E00_.aspx</A></P> <P>Very useful tip !</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16951" width="1" height="1">Building Web Forms with Office InfoPath Forms Serviceshttp://www.sharepointblogs.com/mohamedyehiablog/archive/2006/12/14/16949.aspxThu, 14 Dec 2006 08:13:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16949mohamed.yehia0<DIV><FONT face=Verdana size=2>dglover had a post with useful links on InfoPath:</FONT></DIV> <DIV> <UL> <LI class=MsoNormal><SPAN><A href="http://blogs.msdn.com/infopath/default.aspx"><FONT size=2><FONT face=Verdana><STRONG>InfoPath</STRONG> Team <STRONG>Blog</STRONG></FONT></FONT></A><FONT size=2><FONT face=Verdana> <o:p></o:p></FONT></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://office.microsoft.com/en-au/formsserver/FX100490391033.aspx"><FONT face=Verdana size=2>Microsoft Office Forms Server 2007</FONT></A><FONT size=2><FONT face=Verdana> <o:p></o:p></FONT></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://msdn2.microsoft.com/en-au/office/aa905434.aspx"><FONT face=Verdana size=2>InfoPath Developer Portal</FONT></A><FONT size=2><FONT face=Verdana> - <o:p></o:p></FONT></FONT></SPAN></LI> <UL> <LI class=MsoNormal><SPAN><FONT face=Verdana size=2>Check out the linked </FONT><A href="http://channel9.msdn.com/showpost.aspx?postid=229707"><FONT face=Verdana size=2>Creating Browser Enabled Forms With InfoPath 2007</FONT></A><FONT size=2><FONT face=Verdana> Channel 9 screencast. <o:p></o:p></FONT></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><FONT face=Verdana size=2>And the </FONT><A href="http://channel9.msdn.com/showpost.aspx?postid=199328"><FONT face=Verdana size=2>Creating Custom Workflows with the SharePoint Designer 2007</FONT></A><FONT size=2><FONT face=Verdana> Channel 9 screencast <o:p></o:p></FONT></FONT></SPAN></LI></UL> <LI class=MsoNormal><SPAN><A href="http://msdn.microsoft.com/msdnmag/issues/06/08/InfoPath2007/default.aspx"><FONT size=2><STRONG><SPAN>InfoPath 2007</SPAN></STRONG><SPAN>: Designing Form Templates With The New Features Of InfoPath</SPAN></FONT></A></SPAN><FONT size=2><SPAN> - </SPAN><SPAN>Scott Roberts and Hagen Green</SPAN><SPAN><FONT face=Verdana> <o:p></o:p></FONT></SPAN></FONT></LI> <LI class=MsoNormal><SPAN><A href="http://msdn2.microsoft.com/en-us/library/aa813327.aspx"><STRONG><FONT face=Verdana size=2>Integrate InfoPath 2007 and Visual Studio 2005</FONT></STRONG></A><FONT size=2><FONT face=Verdana> - See how the InfoPath 2007 form template design environment is integrated into the Visual Studio 2005 IDE in the 2007 Office System. <o:p></o:p></FONT></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://office.microsoft.com/en-au/infopath/default.aspx"><FONT face=Verdana size=2>InfoPath</FONT></A> <o:p></o:p></SPAN></LI></UL></DIV> <DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Verdana size=2>See original post <A href="http://blogs.msdn.com/dglover/archive/2006/12/14/building-web-forms-with-office-infopath-forms-services-adnug.aspx">here</A></FONT></DIV><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16949" width="1" height="1">SharePointSharePoint Security Webcast followuphttp://www.sharepointblogs.com/mohamedyehiablog/archive/2006/12/14/16947.aspxThu, 14 Dec 2006 08:11:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16947mohamed.yehia0<DIV><FONT face=Verdana size=2>via <SPAN><FONT face=Verdana size=2><A href="http://weblogs.asp.net/bsimser/archive/2006/12/13/sharepoint-security-webcast-followup.aspx">bsimser</A></FONT></SPAN></FONT></DIV> <DIV><FONT face=Verdana size=2><SPAN></SPAN></FONT>&nbsp;</DIV> <DIV><FONT face=Verdana size=2><SPAN> <TABLE class=MsoNormalTable cellPadding=0> <TR> <TD> <P><FONT face="Times New Roman">Thanks to everyone who turned out for the security webcast today on SharePoint. We had about 60-70 people on the webcast and I had a fun time giving it. A large part of the webcast was around the plugin authentication framework and leveraging the ASP.NET membership providers for using forms based authentication with SharePoint 2007. Unfortunately I didn't get to all the slides (40+ slides in 60 minutes) so if there's anything you're looking for more clarification or depth on, just yell.<o:p></o:p></FONT></P> <P><FONT face="Times New Roman">As a followup, here's the additional resource links I mentioned during the webcast or will be useful for you with regards to security and SharePoint:<o:p></o:p></FONT></P> <UL> <LI class=MsoNormal><SPAN><A href="http://blogs.msdn.com/mikefitz/archive/2005/03/16/397151.aspx"><FONT face="Times New Roman">(older) post from Mike Fitzmaurice about custom forms based authentication for SharePoint</FONT></A><FONT face="Times New Roman"> <o:p></o:p></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://weblog.vb-tech.com/nick/archive/2006/06/14/1617.aspx"><FONT face="Times New Roman">Nick Swan: Walkthrough of setting forms based authentication for SharePoint</FONT></A><FONT face="Times New Roman"> <o:p></o:p></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://blah.winsmarts.com/2006/05/19/sharepoint-2007--enabling-custom-authentication-using-a-custom-membership-provider.aspx"><FONT face="Times New Roman">Sahil Malik: Enabling custom authentication on SharePoint 2007</FONT></A><FONT face="Times New Roman"> <o:p></o:p></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://blogs.msdn.com/sharepoint/archive/2006/08/16/702010.aspx"><FONT face="Times New Roman">SharePoint Team Blog: Configuring multiple authentication providers</FONT></A><FONT face="Times New Roman"> <o:p></o:p></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://weblog.vb-tech.com/nick/archive/2006/09/27/1800.aspx"><FONT face="Times New Roman">Nick Swan: Free registration webpart when using forms based authentication</FONT></A><FONT face="Times New Roman"> <o:p></o:p></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A HREF="/vandest/archive/2006/11/28/16432.aspx"><FONT face="Times New Roman">Configuring SharePoint for extranet usage</FONT></A><FONT face="Times New Roman"> <o:p></o:p></FONT></SPAN></LI> <LI class=MsoNormal><SPAN><A href="http://blogs.msdn.com/scaravajal/archive/2006/06/15/633672.aspx"><FONT face="Times New Roman">Useful links on forms based authentication (including the provider model source code released by Microsoft)</FONT></A><o:p></o:p></SPAN></LI></UL> <P><FONT face="Times New Roman">The webcast recording should be online in 24-48 hours so I'll post the link once it's available.<o:p></o:p></FONT></P> <P><FONT face="Times New Roman">And as I mentioned feel fee to bug me via </FONT><A href="mailto:emailme@bilsimser.com"><FONT face="Times New Roman">email</FONT></A><FONT face="Times New Roman"> if you have any specific questions or scenarios you're trying to figure out. I have a few emails already from the webcast today that I'm following up on so watch for some replies to those and possibly some additional fallout blog postings that I'll share.<o:p></o:p></FONT></P> <P class=MsoNormal> <P class=MsoNormal><FONT face="Times New Roman"><SPAN><A title="Post http://weblogs.asp.net/bsimser/archive/2006/12/13/sharepoint-security-webcast-followup.aspx" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;;mkt=en-us&amp;;url=http://weblogs.asp.net/bsimser/archive/2006/12/13/sharepoint-security-webcast-followup.aspx&amp;;title=SharePoint+Security+Webcast+followup&amp;;top=1" target=_blank></A><o:p></o:p></SPAN></FONT></P><SPAN><FONT face="Times New Roman"><IMG id=_x0000_i1026 height=1 src="http://weblogs.asp.net/aggbug.aspx?PostID=1233782" width=1 border=0><o:p></o:p></FONT></SPAN></P></TD></TR></TABLE> <P><BR>&nbsp;</P></SPAN></FONT></DIV><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16947" width="1" height="1">SharePointMOSS and InfoPath 2007: Automating Business Processes @ Microsofthttp://www.sharepointblogs.com/mohamedyehiablog/archive/2006/12/14/16946.aspxThu, 14 Dec 2006 08:07:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16946mohamed.yehia0<TABLE class=MsoNormalTable cellPadding=0> <TR> <TD> <P class=MsoNormal><SPAN><FONT face=Verdana><FONT size=2>via <A href="http://blogs.msdn.com/scaravajal/archive/2006/12/13/moss-and-infopath-2007-automating-business-processes.aspx">gcarava</A></FONT></FONT></SPAN></P> <P class=MsoNormal><SPAN>&nbsp;</SPAN></P> <P class=MsoNormal><SPAN><FONT size=2><FONT face=Verdana>I usually get asked for “real world” examples of how SharePoint technology is being utilized to solve real problems.<SPAN>&nbsp; </SPAN>Go check this out:<o:p></o:p></FONT></FONT></SPAN></P> <P class=MsoNormal><SPAN><o:p><FONT face=Verdana size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNormal><SPAN><A href="http://www.microsoft.com/technet/itshowcase/content/feermtwp.mspx"><FONT face=Verdana size=2>Facilitating Effective Employee Reviews at Microsoft</FONT></A><o:p></o:p></SPAN></P> <P><SPAN><FONT size=2><FONT face=Verdana>This is an example of an automated business process which gives managers and employees the tools and processes to efficiently and accurately develop annual employee goals and complete employee reviews.<SPAN>&nbsp; </SPAN>The solution utilizes InfoPath® 2007, MOSS, SQL Server™ 2005, and SQL Server 2005 Reporting Services.<o:p></o:p></FONT></FONT></SPAN></P> <P><SPAN><o:p><FONT face=Verdana size=2>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNormal><SPAN><FONT size=2><FONT face=Verdana>&lt;/steve&gt;<o:p></o:p></FONT></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT size=2><FONT face=Verdana><IMG id=_x0000_i1025 height=1 src="http://blogs.msdn.com/aggbug.aspx?PostID=1276119" width=1 border=0><o:p></o:p></FONT></FONT></SPAN></P></TD></TR></TABLE> <P><BR>&nbsp;</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16946" width="1" height="1">SharePointSharepoint 2007 MSDN Articles for Developershttp://www.sharepointblogs.com/uday/archive/2006/12/14/16945.aspxThu, 14 Dec 2006 05:08:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16945Uday0<P><FONT face=Arial></FONT>&nbsp;</P> <P><FONT face=Arial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I found the following articles from MSDN for MOSS 2007. I hope it would helpful to you to explore MOSS 2007.</FONT></P> <P><FONT face=Arial></FONT>&nbsp;</P> <P><FONT face=Arial>1.&nbsp;</FONT><FONT face="Times New Roman"><A href="http://technet2.microsoft.com/Office/en-us/library/604431c9-de72-43b9-a3a9-3b0c3bf3444e1033.mspx?mfr=true">Operations for Office SharePoint Server 2007</A></FONT></P> <P>2. <A href="http://technet2.microsoft.com/Office/en-us/library/604431c9-de72-43b9-a3a9-3b0c3bf3444e1033.mspx?mfr=true">Deployment for Office SharePoint Server 2007</A></P> <P>3. <A href="http://technet2.microsoft.com/Office/en-us/library/604431c9-de72-43b9-a3a9-3b0c3bf3444e1033.mspx?mfr=true">Planning and architecture for Office SharePoint Server 2007</A></P> <P>4. <A href="http://technet2.microsoft.com/Office/en-us/library/604431c9-de72-43b9-a3a9-3b0c3bf3444e1033.mspx?mfr=true">Security and protection for Office SharePoint Server 2007</A></P> <P>5. <A href="http://technet2.microsoft.com/Office/en-us/library/604431c9-de72-43b9-a3a9-3b0c3bf3444e1033.mspx?mfr=true">Technical Reference for Office SharePoint Server 2007</A></P> <P>6. <A href="http://technet2.microsoft.com/Office/en-us/library/604431c9-de72-43b9-a3a9-3b0c3bf3444e1033.mspx?mfr=true">Windows SharePoint Services 3.0 technology</A></P> <P>7. <A href="http://technet2.microsoft.com/Office/en-us/library/604431c9-de72-43b9-a3a9-3b0c3bf3444e1033.mspx?mfr=true">Office SharePoint Server 2007 for Search</A></P> <P>&nbsp;</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16945" width="1" height="1">Enterprise Content Storage Limitshttp://www.sharepointblogs.com/pprussak/archive/2006/12/14/16943.aspxThu, 14 Dec 2006 04:16:31 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16943pprussak0<p>&nbsp;</p> <p>Technet has a great wealth of information for ITPros on MOSS and WSS planning. I was looking for capacity planning information for one <a href="http://www.codeplex.com/equas">our forthcoming projects on Codeplex</a></p> <p>There is an interesting piece on <a href="http://technet2.microsoft.com/Office/en-us/library/9994b57f-fef8-44e7-9bf9-ca620ce207341033.mspx?mfr=true">Planning Enterprise Content Storage</a></p> <p>There are some recommended limits that have been posted:</p> <ol> <li>Site collection</li> <ul> <li>2,000 subsites of any site is the recommended limit.</li></ul> <li>Site</li> <ul> <li>2,000 libraries and lists is the recommended limit.</li></ul> <li>Library</li> <ul> <li>10,000,000 documents is the recommended limit.</li> <li>2,000 items per view is the recommended limit.</li></ul> <li>Folder </li> <ul> <li>2,000 items per folder is the recommended limit.</li></ul></ol> <p>This is obviously just a recommended limit, and the infrastructure can handle way more, but there are certain blocker when the user or application wants to retrieve data, and more than 2,000 rows/items of data are retrieved. So, please consider indexing, using folders, or some other tricks, or if you have that much structured data, maybe use SQL?</p> <p><a href="http://technet2.microsoft.com/#top"><img height="9" alt="Top of page" src="http://technet2.microsoft.com/office/templates/common/img/arrow_px_up.gif" width="7" border="0"></a><a href="http://technet2.microsoft.com/#top">Top of page</a></p><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16943" width="1" height="1">Manually installing office web parts in SharePoint v3 (by Shane Young)http://www.sharepointblogs.com/ssa/archive/2006/12/13/16927.aspxWed, 13 Dec 2006 14:00:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16927ssa0<P>Following blog post by Shane Young contains details of installing office web parts in SharePoint v3.0. I posted a similar solution a couple of months ago but this one is more detailed:</P> <P><A href="http://msmvps.com/blogs/shane/archive/2006/09/02/How-to-manually-install-the-Office-Web-Parts-in-SharePoint-v3.aspx">http://msmvps.com/blogs/shane/archive/2006/09/02/How-to-manually-install-the-Office-Web-Parts-in-SharePoint-v3.aspx</A></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16927" width="1" height="1">Announcing the Beta Exams for MCTS Application Development: 70-542 for Office SharePoint Server 2007 and 70-541 for Windows SharePoint Server 3.0 (via SPTBlog)http://www.sharepointblogs.com/ssa/archive/2006/12/13/16916.aspxWed, 13 Dec 2006 13:13:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16916ssa0<P><A href="http://blogs.msdn.com/sharepoint/archive/2006/12/12/announcing-the-beta-exams-for-mcts-application-development-70-542-for-office-sharepoint-server-2007-and-70-541-for-windows-sharepoint-server-3-0.aspx">http://blogs.msdn.com/sharepoint/archive/2006/12/12/announcing-the-beta-exams-for-mcts-application-development-70-542-for-office-sharepoint-server-2007-and-70-541-for-windows-sharepoint-server-3-0.aspx</A></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16916" width="1" height="1">WSS v3.0: Import an ASP.NET Web Part to your Windows SharePoint Services Sitehttp://www.sharepointblogs.com/zimmer/archive/2006/12/13/16913.aspxWed, 13 Dec 2006 11:51:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16913Tobias Zimmergren0<P class=MsoNormal><FONT face=Calibri>It is possible to use your ASP.NET web parts in your Windows SharePoint Services (WSS) application simply by exporting them to create .webpart files. <BR>.Webpart files are simply XML files that contains property values, state data, assembly or source file details about your Web Part (WP).</FONT></P> <P class=MsoNormal><FONT face=Calibri>In order to be able to export your WP, you need to make some changes to your WP code and the configurationsettings.</FONT></P> <P class=MsoNormal><FONT face=Calibri>Step by Step:<BR>1) In your WP code, set the <B>ExportMode </B>property to allow properties to be exported, like this:<BR><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>this.ExportMode = WebPartExportMode.All;</FONT></P> <P class=MsoNormal><FONT face=Calibri>2) Locate and modify your system.web section in your web.config configuration file, like this:<BR><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;system.web&gt;<BR><SPAN>&nbsp;&nbsp; </SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;webparts<SPAN>&nbsp; </SPAN>enableExport="true" /&gt;<BR><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;sytem.web&gt;</FONT></P> <P class=MsoNormal><FONT face=Calibri>3) Choose export from the Web Part menu to create a .webpart file which you now can import into your WSS WP Page </FONT><SPAN><SPAN>J</SPAN></SPAN></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16913" width="1" height="1">Planning worksheets for Office SharePoint Server 2007http://www.sharepointblogs.com/subodh/archive/2006/12/13/16906.aspxWed, 13 Dec 2006 10:10:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16906subodhpathak0<P>In this article:</P> <TABLE cellSpacing=0 cellPadding=0> <TR> <TD class=listBullet>•</TD> <TD class=listItem> <P><A href="http://technet2.microsoft.com/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx#section1" target=_self>Planning worksheets by task</A><SPAN id=E4C></SPAN> <SCRIPT language=Javascript> if(typeof(IsPrinterFriendly) != "undefined") { var l = "/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx#section1"; var nl; var c = l.charAt(0); var o = document.getElementById("E4C"); switch (c){ case "/": nl=("&nbsp;[http://" + document.domain + l + "]"); break case "#": nl=(""); break default: nl="&nbsp;[" + l + "]" } if(o != null) o.innerHTML = nl; } </SCRIPT> </P></TD></TR> <TR> <TD class=listBullet>•</TD> <TD class=listItem> <P><A href="http://technet2.microsoft.com/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx#section2" target=_self>Planning worksheets by title</A><SPAN id=EDD></SPAN> <SCRIPT language=Javascript> if(typeof(IsPrinterFriendly) != "undefined") { var l = "/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx#section2"; var nl; var c = l.charAt(0); var o = document.getElementById("EDD"); switch (c){ case "/": nl=("&nbsp;[http://" + document.domain + l + "]"); break case "#": nl=(""); break default: nl="&nbsp;[" + l + "]" } if(o != null) o.innerHTML = nl; } </SCRIPT> </P></TD></TR></TABLE> <P>This article provides links to worksheets that you can use to record information that you gather and decisions that you make as you plan your deployment of Microsoft Office SharePoint Server 2007. Use these worksheets in conjunction with&nbsp;— not as a substitute for&nbsp;— <A href="http://technet2.microsoft.com/Office/en-us/library/b28ba53d-a3e8-440f-9fcb-f592d858894a1033.mspx" target=_self>Planning and architecture for Office SharePoint Server 2007</A><SPAN id=EJD></SPAN> <SCRIPT language=Javascript> if(typeof(IsPrinterFriendly) != "undefined") { var l = "/Office/en-us/library/b28ba53d-a3e8-440f-9fcb-f592d858894a1033.mspx"; var nl; var c = l.charAt(0); var o = document.getElementById("EJD"); switch (c){ case "/": nl=("&nbsp;[http://" + document.domain + l + "]"); break case "#": nl=(""); break default: nl="&nbsp;[" + l + "]" } if(o != null) o.innerHTML = nl; } </SCRIPT> .</P> <P>Visit here: <A href="http://technet2.microsoft.com/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx?mfr=true">http://technet2.microsoft.com/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx?mfr=true</A></P> <P>This link is suggested by my friend Sachin.</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16906" width="1" height="1">Yeah...PDC is BACK!http://www.sharepointblogs.com/ssofian/archive/2006/12/13/16905.aspxWed, 13 Dec 2006 09:57:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16905Steve Sofian0<P><FONT face=Tahoma size=2>&lt;Quote Src="<A href="http://www.softwaremaker.net/blog/">SoftwareMaker</A>"&gt;</FONT></P> <P><FONT face=Tahoma size=2>The Microsoft Professional Developers Conference (PDC), the premier definitive developer event focused on the future of the Microsoft platform, returns in 2007 after a short 2 year break ... </FONT></P> <P><FONT face=Tahoma size=2>... and its back in Los Angeles again ! </FONT></P> <P><FONT face=Tahoma size=2>I had such a </FONT><A href="http://www.softwaremaker.net/blog/ct.ashx?id=5c1cd3b9-54e6-46a6-b1b0-1a306c0d2834&amp;url=http://www.softwaremaker.net/blog/CategoryView,category,PDC2005_LA.aspx"><FONT face=Tahoma size=2>great time back in PDC2005 in Los Angeles</FONT></A><FONT face=Tahoma size=2>, presenting, networking and shooting the Visual Studio 2005 launch video, etc. That event in 2005 must rank tops in my book&nbsp;amongst&nbsp;many of&nbsp;the Microsoft technology events I have attended&nbsp;and/or presented&nbsp;over the years. </FONT></P> <P><FONT face=Tahoma size=2>Microsoft tends to align PDC events with key product development milestones so we tend to hold the events every couple of years, sometimes even more. There isn’t a set schedule. Therefore, there shouldnt be that "Ah - I think I will skip this and go next year" mentality or something. The last 2 PDCs were some of the biggest Microsoft public events - with the announcements of Longhorn, WinFX, Office Server systems, Vista, etc </FONT></P> <P><FONT face=Tahoma size=2>It is definitely NOT an event you want to miss. I encourage some of my&nbsp;friends, developers and IT-Pros from Asia-Pacific&nbsp;to save up and attend. The investment made&nbsp;will be&nbsp;well-worth it. </FONT></P> <P><FONT face=Tahoma size=2>Registration will open in Q4.&nbsp;Do check it out and, more importantly, stay tuned to&nbsp;the registration site </FONT><A href="http://www.softwaremaker.net/blog/ct.ashx?id=5c1cd3b9-54e6-46a6-b1b0-1a306c0d2834&amp;url=http://msdn.microsoft.com/events/pdc/"><FONT face=Tahoma size=2>here</FONT></A><FONT face=Tahoma size=2> for more details. </FONT></P> <P><FONT face=Tahoma size=2>Hopefully, this early announcement will help in making sure this event gets into your (or your company's) budget planning for next year. <IMG src="http://www.softwaremaker.net/pictures/swmemoticons/wink.gif"> </FONT></P> <P><A href="http://www.softwaremaker.net/blog/ct.ashx?id=5c1cd3b9-54e6-46a6-b1b0-1a306c0d2834&amp;url=http://msdn.microsoft.com/events/pdc/"><FONT face=Tahoma size=2>http://msdn.microsoft.com/events/pdc/</FONT></A><FONT face=Tahoma size=2> </FONT></P> <P><FONT face=Tahoma size=2><IMG height=0 src="http://www.softwaremaker.net/blog/aggbug.ashx?id=5c1cd3b9-54e6-46a6-b1b0-1a306c0d2834" width=0>&nbsp;&lt;/Quote&gt;</FONT></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16905" width="1" height="1">A reflection tool for SP 2007, SharePoint Inspectorhttp://www.sharepointblogs.com/zimmer/archive/2006/12/13/16896.aspxWed, 13 Dec 2006 08:07:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16896Tobias Zimmergren0<P>The last couple of days I havn't came across anything interesting to blog about, since I've been busy with alot of other projects. However, I recently stumbled into a blogpost linking to an application called SharePoint Inspector, which is described below.</P> <P><U>Quote from the author:</U> (This tool can be downloaded from: <A href="http://community.gatweb.fr/files/default.aspx?Sort=Downloads">http://community.gatweb.fr/files/default.aspx?Sort=Downloads</A>)<BR><FONT size=2>"SharePoint Inspector is a free tool to browse your SharePoint 2007 farm.<BR>When I talk about SharePoint 2007, I mean Windows SharePoint Services v3 (WSS v3) and Microsoft Office SharePoint Server 2007 (MOSS).</FONT></P> <P><FONT size=2>Its main purpose is to help SharePoint developer<BR>You can see objects composing its structure, get their properties by reflection, which can be very useful when you want to check if your code does what it should do.<BR>You can use also some advanced features like activate/deactivate SharePoint features, add/remove event receivers, manage your recycle bin.</FONT></P> <DIV class=ExternalClass88EAD1544DD04C96913965229D163DB4> <DIV><FONT size=2>Feel free to use this program, but please don't redistribute it and don't provide direct link for download purpose.</FONT></DIV> <DIV><FONT size=2></FONT>&nbsp;</DIV> <DIV><FONT size=2>I don't provide official support for this tool, but you can try to mail me if you get bugs or want new features."</FONT></DIV></DIV> <P><IMG alt="Deactivate Feature" src="http://www.gatweb.fr/sharepointinspector/Pictures/Screenshots/DeactivateFeature.jpg"></P> <P>Cheers!</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16896" width="1" height="1">SharePoint 2007 Training : Offlinehttp://www.sharepointblogs.com/alpesh/archive/2006/12/13/16894.aspxTue, 12 Dec 2006 23:32:10 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16894alpsinoz0OMG! I could not believe this, when I read about the new SharePoint training option - offline. This is indeed a great move, especially for IT professionals outside of USA. ShareSquared are offering distance learning for SharePoint 2007. I made a quick dash for the site, to check out how this is going to be delivered. The sessions are being available Pacific Time, so being in Australia, I don't know how this can be managed. However the idea is great and I am sure many will follow suit. Upcoming...(<a href="http://www.sharepointblogs.com/alpesh/archive/2006/12/13/16894.aspx">read more</a>)<img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16894" width="1" height="1">SharepointMOSS2007 – Write your own custom authentication provider (Part 2)http://www.sharepointblogs.com/helloitsliam/archive/2006/12/12/16887.aspxTue, 12 Dec 2006 21:01:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16887helloitsliam1<P class=MsoNormal><FONT face=Arial color=#000000 size=2>So in the last post we looked at creating the custom provider and adding it to the GAC. In this post we will look at accessing this from SharePoint 2007. To begin with I have created an Intranet Portal called “</FONT><A href="http://custom.labs.demo.local/"><FONT face=Arial color=#ff0000 size=2>http://custom.labs.demo.local</FONT></A><FONT face=Arial color=#000000 size=2>”. I have also extended this site onto another site, “</FONT><A href="http://customext.labs.demo.local/"><FONT face=Arial color=#ff0000 size=2>http://customext.labs.demo.local</FONT></A><FONT face=Arial color=#000000 size=2>”. Now to start with let’s look at what syntax is needed for the Custom Provider to be accessed. The following is the code:</FONT></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;membership defaultProvider="LynxAuthentication"&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp; </SPAN>&lt;providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;add name="LynxAuthentication" type="LynxAuthProvider.Users.LynxUserProvider,LynxAuthProvider, <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>Version=1.0.0.0, <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>Culture=neutral, <o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>PublicKeyToken=72641c709e22e2e6" /&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000><SPAN>&nbsp;&nbsp; </SPAN>&lt;/providers&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNoSpacing><SPAN><FONT size=2><FONT face=Arial><FONT color=#ff0000>&lt;/membership&gt;<o:p></o:p></FONT></FONT></FONT></SPAN></P> <P class=MsoNormal><o:p><FONT face=Arial color=#000000 size=2>&nbsp;</FONT></o:p></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>Notice that for this example I am not using a role provider, we will cover creating a role provider in the next post. The above code needs to be added to both “web.config” files for the above sites. These are located here:</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16874/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16874/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16875/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16875/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>It also needs to be added to the Central Administration “web.config” file. This is located here:</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16876/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16876/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>The code block needs to be added at the following location in each configuration file.</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16877/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16877/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT size=2><FONT face=Arial><FONT color=#000000>Once all the files have been saved, then we can configure the authentication provider for the web application. <SPAN>&nbsp;</SPAN></FONT></FONT></FONT></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16878/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16878/original.aspx" border=0></A></FONT></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>Press on the “Custom” option and configure as below</FONT></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16879/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16879/original.aspx" border=0></A></FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16880/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16880/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>Now we have configured this we can test it by trying to verify one of the usernames. To do this you will need to launch the portal you wish to apply the user to. Make sure you log into the NTLM enabled one, in this demo: </FONT><A href="http://custom.labs.demo.local/"><FONT face=Arial color=#ff0000 size=2>http://custom.labs.demo.local</FONT></A><FONT face=Arial color=#000000 size=2>. Select the “site actions”, “site settings” and “Modify all site settings”. Then select the “People and Groups” option.</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16881/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16881/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>Then press the relevant group and select the “New” button. In the users box simply type either the full name or a letter to start. Then select the name check button. If all is connected it should verify the name automatically.</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16882/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16882/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>Once you have added the user the list should then be shown and list the various accounts. Notice the account prefix for the “DEMO2” user.</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16883/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16883/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>Now we have added the user we can try to authenticate. This will be done via our “Forms” based login portal. This demo uses </FONT><A href="http://customext.labs.demo.local/"><FONT face=Arial color=#ff0000 size=2>http://customext.labs.demo.local</FONT></A><FONT face=Arial color=#000000 size=2> and loads as below:</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16884/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16884/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>To login we simply type our credentials as below:</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16885/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16885/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>This should log us into the portal like any other user would. To prove it if you look at the top of the screen you should see the following:</FONT></P> <P class=MsoNormal><SPAN><FONT face=Arial color=#000000 size=2><A href="/photos/helloitsliam/images/16886/original.aspx" target=_blank><IMG src="/photos/helloitsliam/images/16886/original.aspx" border=0></A></FONT></SPAN></P> <P class=MsoNormal><FONT face=Arial color=#000000 size=2>As you can see it is quite easy once you have created your custom provider to use it within MOSS2007. In the next post we will look at adding a Role Provider to our Authentication Provider. We will then look at creating some extra methods that can be consumed into our custom login and user administration and registering page, which will replace the standard login page. Hope this helps. <img src="/emoticons/emotion-1.gif" alt="Smile" /></FONT></P> <P class=MsoNormal><SPAN><STRONG><FONT color=#ff0000>** PDF VERSION ATTACHED **</FONT></STRONG></SPAN></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16887" width="1" height="1">SharePointOffice System 2007Full exposure to SharePoint Enterprise 2007http://www.sharepointblogs.com/mdlotter/archive/2006/12/12/16867.aspxTue, 12 Dec 2006 17:16:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16867mlotter0<P class=MsoNormal><FONT face=Calibri>Last week has been a good week for me because it has been the first full week that I’ve been exposed to SharePoint 2007 (MOSS) GTM outside of my company.<SPAN>&nbsp; </SPAN>There has been so many things that I have learned that I can’t even start explain.<SPAN>&nbsp; </SPAN>The one thing that is evident about SharePoint 2007 is that it has grown 2 to 3 times the size and it has a lot more complexity than it predecessor SharePoint 2003.</FONT></P> <P class=MsoNormal><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></P> <P class=MsoNormal><FONT face=Calibri>There are a lot of underlining things that are completely the same but there a lot more items that are brand new and require a lot more planning than before.<SPAN>&nbsp; </SPAN>A big problem that I recognized over the last 2 years is that most companies under plan there deployment of SharePoint and after a year or so it becomes unmanageable or no longer supplies a benefit because information is too hard to find through navigation and search.<SPAN>&nbsp; </SPAN></FONT></P> <P class=MsoNormal><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></P> <P class=MsoNormal><FONT face=Calibri>For the new release Microsoft has tried to help in this situation by supplying additional planning information.<SPAN>&nbsp; </SPAN>Some of the information that I have found very useful are the supplemental documents for MOSS and WSS which can be found by using the first to links.<SPAN>&nbsp; </SPAN>These Visio documents give great examples and information that any company planning to do a MOSS or WSS deployment.</FONT></P> <P class=MsoNormal><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></P> <P class=MsoNormal><FONT face=Calibri>MOSS</FONT></P> <P class=MsoNormal><SPAN><A href="http://technet2.microsoft.com/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx"><FONT face=Calibri color=#800080>http://technet2.microsoft.com/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx</FONT></A><o:p></o:p></SPAN></P> <P class=MsoNormal><SPAN><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></SPAN></P> <P class=MsoNormal><SPAN><FONT face=Calibri>WSS<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal><SPAN><A href="http://technet2.microsoft.com/Office/en-us/library/bcbae7bd-656b-4003-969c-8411b81fcd771033.mspx?pf=true"><FONT face=Calibri color=#800080>http://technet2.microsoft.com/Office/en-us/library/bcbae7bd-656b-4003-969c-8411b81fcd771033.mspx?pf=true</FONT></A><o:p></o:p></SPAN></P> <P class=MsoNormal><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></P> <P class=MsoNormal><FONT face=Calibri>Another set of great content that I have found is the worksheets that Joel posted links for on his blog.<SPAN>&nbsp; </SPAN>These worksheets will give you a great start on getting all the planning organized and help everyone see the big picture.<SPAN>&nbsp; </SPAN>These worksheets will definitely help create the road map that can be used for a successful MOSS or WSS deployment.<SPAN>&nbsp; </SPAN>The link to the worksheet are posted below.</FONT></P> <P class=MsoNormal><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></P> <P class=MsoNormal><FONT face=Calibri>Worksheets</FONT></P> <P class=MsoNormal><A href="http://technet2.microsoft.com/WindowsServer/en/library/386a641c-3c07-46e8-a25d-bfdcc55bfacb1033.mspx"><FONT face=Calibri>http://technet2.microsoft.com/WindowsServer/en/library/386a641c-3c07-46e8-a25d-bfdcc55bfacb1033.mspx</FONT></A></P> <P class=MsoNormal><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></P> <P class=MsoNormal><FONT face=Calibri>This week and the next I’m in Seattle working with another company doing MOSS discovery and planning.<SPAN>&nbsp; </SPAN>I’m very excited about these 2 weeks because it is going to give more real world experience with the new versions. <SPAN>&nbsp;&nbsp;</SPAN>So far Seattle has been a little windy, wet and cold but I guess that is expected for the middle of December.&nbsp; I'm off to work for the day and looking forward to another <SPAN>adventures</SPAN> day.</FONT></P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16867" width="1" height="1">SharePoint Search Query for UserProfileshttp://www.sharepointblogs.com/nilaish/archive/2006/12/12/16865.aspxTue, 12 Dec 2006 16:45:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16865nilaish0<P>Following code shows how to use SQL search for UserProfile properties in SPS 2003. In the code here, I am searching for AccountName, FirstName, LastName, UserName, PreferredName by default. In addition, we are searching for all the public properties that were returned by the Topology Manager for the User Profiles. </P> <P>&nbsp;</P> <P>The code is part of a web part which has a interface similar to that of the regular SharePoint search, but returns only UserProfile data.</P> <P>&nbsp;</P> <P>The only important thing to note here that the path for PictureURL is different from the other properties for User Profiles.</P> <P>&nbsp;</P> <P>The code searches for both Portal content and Non-Portal Content. It also allows you to build query and perform the "Contains" or "Is Exactly" clause for search restrictions.</P> <P>&nbsp;</P> <P>The last section of the buildQuery function shows how to sort the results returned by Last Name.</P> <P>&nbsp;</P> <P>This query is then embedded in to an XML as shown in the BuildMSQuery method. Most of the sample code shown around different web sites show how to only build the query but fail to mention how to embed it into an XML for the final search.</P> <P>&nbsp;</P> <P>&nbsp;</P> <P>public string buildQuery()</P> <P>{</P> <P>string strxml = null;</P> <P>&nbsp;</P> <P>string[] ssarray = m_SPSelected.Split(';');</P> <P>if(this.val1.Value.Length &gt; 0 || this.val2.Value.Length &gt; 0 || this.val3.Value.Length &gt; 0)</P> <P>{</P> <P>strxml = "SELECT " +</P> <P>"\"DAV:href\"";</P> <P>strxml += ",\"urn:schemas-microsoft-com:sharepoint:portal:profile:AccountName\"";</P> <P>strxml += ",\"urn:schemas-microsoft-com:sharepoint:portal:profile:FirstName\"";</P> <P>strxml += ",\"urn:schemas-microsoft-com:sharepoint:portal:profile:LastName\"";</P> <P>strxml += ",\"urn:schemas-microsoft-com:sharepoint:portal:profile:UserName\"";</P> <P>strxml += ",\"urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName\"";</P> <P>&nbsp;</P> <P>for(int i = 0; i &lt; ssarray.Length - 1; i++)</P> <P>{</P> <P>if ((ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> != "AccountName") &amp;&amp; (ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> != "FirstName") &amp;&amp; (ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> != "LastName") &amp;&amp; (ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> != "PreferredName") &amp;&amp; (ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> != "UserName"))</P> <P>{</P> <P>if(ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> == "PictureURL")</P> <P>{</P> <P>strxml += ",\"urn:schemas.microsoft.com:fulltextqueryinfo:" + ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> + "\"";</P> <P>}</P> <P>else</P> <P>strxml += ",\"urn:schemas-microsoft-com:sharepoint:portal:profile:" + ssarray<img src="/emoticons/emotion-55.gif" alt="Idea" /> + "\"";</P> <P>}</P> <P>}</P> <P>}</P> <P>strxml += "from ( TABLE Portal_Content..Scope() UNION ALL TABLE Non_Portal_Content..Scope() ) where ";</P> <P>&nbsp;</P> <P>// Generate the conditions here now:</P> <P>if(val1.Value.Length &gt; 0 &amp;&amp; lbclause1.SelectedValue == "Contains")</P> <P>{</P> <P>// First row has "Contains" clause</P> <P>strxml += "(Contains(\"urn:schemas-microsoft-com:sharepoint:portal:profile:" + lbprops1.SelectedValue + "\",'" + SPEncode.HtmlEncode(val1.Value) + "')) ";</P> <P>}</P> <P>else if(val1.Value.Length &gt; 0 &amp;&amp; lbclause1.SelectedValue == "Is Exactly")</P> <P>{</P> <P>// First row has "Is Exactly" Clause</P> <P>strxml += " \"urn:schemas-microsoft-com:sharepoint:portal:profile:" + lbprops1.SelectedValue + "\"='" + SPEncode.HtmlEncode(val1.Value) + "' ";</P> <P>}</P> <P>&nbsp;</P> <P>// Add the AND or OR conditions</P> <P>if ((val1.Value.Length &gt; 0 &amp;&amp; val2.Value.Length &gt; 0) || (val1.Value.Length &gt; 0 &amp;&amp; val3.Value.Length &gt; 0))</P> <P>{</P> <P>strxml += lbcondition.SelectedValue;</P> <P>}</P> <P>&nbsp;</P> <P>// Row 2 processing</P> <P>if(val2.Value.Length &gt; 0 &amp;&amp; lbclause2.SelectedValue == "Contains")</P> <P>{</P> <P>// Second row has "Contains" clause</P> <P>strxml += "(Contains(\"urn:schemas-microsoft-com:sharepoint:portal:profile:" + lbprops2.SelectedValue + "\",'" + SPEncode.HtmlEncode(val2.Value) + "'))";</P> <P>}</P> <P>else if(val2.Value.Length &gt; 0 &amp;&amp; lbclause2.SelectedValue == "Is Exactly")</P> <P>{</P> <P>// Second row has "Is Exactly" Clause</P> <P>strxml += " \"urn:schemas-microsoft-com:sharepoint:portal:profile:" + lbprops2.SelectedValue + "\"='" + SPEncode.HtmlEncode(val2.Value) + "' ";</P> <P>}</P> <P>&nbsp;</P> <P>// Add the AND or OR conditions between second row and third row</P> <P>if ((val1.Value.Length &gt; 0 &amp;&amp; val3.Value.Length &gt; 0) || (val2.Value.Length &gt; 0 &amp;&amp; val3.Value.Length &gt; 0))</P> <P>{</P> <P>strxml += lbcondition.SelectedValue;</P> <P>}</P> <P>&nbsp;</P> <P>// Row 3 processing</P> <P>if(val3.Value.Length &gt; 0 &amp;&amp; lbclause3.SelectedValue == "Contains")</P> <P>{</P> <P>// Third row has "Contains" clause</P> <P>strxml += "(Contains(\"urn:schemas-microsoft-com:sharepoint:portal:profile:" + lbprops3.SelectedValue + "\",'" + SPEncode.HtmlEncode(val3.Value) + "'))";</P> <P>}</P> <P>else if(val3.Value.Length &gt; 0 &amp;&amp; lbclause3.SelectedValue == "Is Exactly")</P> <P>{</P> <P>// Third row has "Is Exactly" Clause</P> <P>strxml += " \"urn:schemas-microsoft-com:sharepoint:portal:profile:" + lbprops3.SelectedValue + "\"='" + SPEncode.HtmlEncode(val3.Value) + "' ";</P> <P>}</P> <P>&nbsp;</P> <P>// Added code to sort results by last name</P> <P>strxml += " ORDER BY \"urn:schemas-microsoft-com:sharepoint:portal:profile:LastName\"";</P> <P>return strxml;</P> <P>}</P> <P>&nbsp;</P> <P>/// &lt;summary&gt;</P> <P>/// Builds an MSQuery with an embedded MSSQLFT query embedded </P> <P>/// for submission to SharePointPS Query Service.</P> <P>/// &lt;/summary&gt;</P> <P>/// &lt;param name="keywords"&gt;Keywords submitted for search.&lt;/param&gt;</P> <P>/// &lt;param name="searchScope"&gt;SPS Search scope to filter.&lt;/param&gt;</P> <P>/// &lt;returns&gt;MSQuery&lt;/returns&gt;</P> <P>public string BuildMSQuery(string queryXml)</P> <P>{</P> <P>if(queryXml == null)</P> <P>return null;</P> <P>&nbsp;</P> <P>StringBuilder msQuery = new StringBuilder();</P> <P>&nbsp;</P> <P>// create the main header of the XML string</P> <P>msQuery.Append("&lt;?xml version=\"1.0\" encoding=\"utf-8\" ?&gt;"</P> <P>+ "&lt;QueryPacket xmlns=\"urn:Microsoft.Search.Query\" "</P> <P>+ "Revision=\"1000\"&gt;"</P> <P>+ "&lt;Query domain=\"QDomain\"&gt;"</P> <P>+ "&lt;SupportedFormats&gt;"</P> <P>+ "&lt;Format&gt;urn:Microsoft.Search.Response.Document.Document"</P> <P>+ "&lt;/Format&gt;&lt;/SupportedFormats&gt;");</P> <P>&nbsp;</P> <P>// create the actual full-text query</P> <P>msQuery.Append("&lt;Context&gt;"</P> <P>+ "&lt;QueryText language=\"en-US\" type=\"MSSQLFT\"&gt;"</P> <P>+ "&lt;![CDATA[" + queryXml</P> <P>+ "]]&gt;&lt;/QueryText&gt;&lt;/Context&gt;");</P> <P>&nbsp;</P> <P>// create the range, page, and number of results to return </P> <P>msQuery.Append("&lt;Range&gt;&lt;StartAt&gt;1&lt;/StartAt&gt;&lt;Count&gt;" + M_MaxReturnResults + "&lt;/Count&gt;"</P> <P>+ "&lt;/Range&gt;&lt;/Query&gt;&lt;/QueryPacket&gt;");</P> <P>&nbsp;</P> <P>return msQuery.ToString();</P> <P>}</P> <P>&nbsp;</P> <P>The XML should be passed to the Query or QueryEx function of the search web service:</P> <P>PortalContext ctx = PortalContext.Current;</P> <P>site = ctx.SiteUrl;</P> <P>usrprof.Search.QueryService qs = new usrprof.Search.QueryService(site + "_vti_bin/search.asmx");</P> <P>qs.Credentials = System.Net.CredentialCache.DefaultCredentials;</P> <P>strresults = qs.Query(queryXml);</P> <P>results = qs.QueryEx(queryXml);</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16865" width="1" height="1">RenderWebPart and ToolPart Panehttp://www.sharepointblogs.com/nilaish/archive/2006/12/12/16863.aspxTue, 12 Dec 2006 16:42:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16863nilaish0&nbsp; <P>Recently when I was working on a web part, I ran across a small problem. I was writing a custom ToolPart Panes and my code seemed to work properly, but when I tried viewing my ToolPart it would appear all weird on the screen. I was at some point able to access all the properties in my ToolPart but the screen would look completely different.</P> <P>&nbsp;</P> <P>After some working through the code, I found out that the HTML that is used in the RenderWebPart method is related to the HTML on the ToolPart Pane. My HTML in the RenderWebPart method was incomplete and hence it was messing up the ToolPart Pane.</P> <P>&nbsp;</P> <P>I found that weird and completely wrong since the ToolPart Pane shows up in a different frame on the same page and would not have thought that they were related. </P> <P>&nbsp;</P> <P>Anyways, something to keep in mind when writing web parts again.</P> <P>&nbsp;</P> <P>nilaish</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16863" width="1" height="1">CheckBox List in Custom ToolPart Panehttp://www.sharepointblogs.com/nilaish/archive/2006/12/12/16864.aspxTue, 12 Dec 2006 16:42:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16864nilaish0&nbsp; <P>In the same web part that I was building, I had to come up with a way to generate a CheckBox List in a ToolPart Pane. All the search I performed on "Google" showed me how to implement a Textbox control in ToolPart pane and some showed how to implement a single CheckBox or a Drop Down List. I spent some time looking in to this but was not able to find a straight solution. </P> <P>&nbsp;</P> <P>I ended up implementing a CheckBox List by storing and retrieving values from a string array as shown below:</P> <P>&nbsp;</P> <P>using System;</P> <P>using System.Web;</P> <P>using System.Data;</P> <P>using System.Collections;</P> <P>using System.Reflection;</P> <P>using System.Web.UI;</P> <P>using System.Web.UI.WebControls;</P> <P>using System.Web.UI.HtmlControls;</P> <P>using Microsoft.SharePoint;</P> <P>using Microsoft.SharePoint.Utilities;</P> <P>using Microsoft.SharePoint.Portal;</P> <P>using Microsoft.SharePoint.WebPartPages;</P> <P>using Microsoft.SharePoint.Portal.UserProfiles;</P> <P>using Microsoft.Win32;</P> <P>&nbsp;</P> <P>namespace ngenious</P> <P>{</P> <P>/// &lt;summary&gt;</P> <P>/// Description of the toolpart. Override the GetToolParts method in your WebPart</P> <P>/// class to invoke this toolpart. To establish a reference to the Web Part </P> <P>/// the user has selected, use the ParentToolPane.SelectedWebPart property.</P> <P>/// &lt;/summary&gt;</P> <P>public class ProfileToolPart: Microsoft.SharePoint.WebPartPages.ToolPart</P> <P>{</P> <P>private bool savedState = false;</P> <P>private CheckBoxList cbl;</P> <P>&nbsp;</P> <P>string svrname = "";</P> <P>string strerr = "";</P> <P>/// &lt;summary&gt;</P> <P>/// Constructor for the class.</P> <P>/// &lt;/summary&gt;</P> <P>public ProfileToolPart()</P> <P>{</P> <P>this.Title = "Profile Properties Selection";</P> <P>this.FrameState = FrameState.Minimized;</P> <P>getServerName();</P> <P>}</P> <P>&nbsp;</P> <P>public override void ApplyChanges()</P> <P>{</P> <P>try</P> <P>{</P> <P>ngenious.profile prof1 = (ngenious.profile)this.ParentToolPane.SelectedWebPart;</P> <P>&nbsp;</P> <P>if(!savedState)</P> <P>{</P> <P>prof1.m_PPSelected = "";</P> <P>&nbsp;</P> <P>base.ApplyChanges();</P> <P>ToolPane tp = this.ParentToolPane;</P> <P>WebPart myWP = (ngenious.profile)tp.SelectedWebPart;</P> <P>for(int i = 0;i &lt; cbl.Items.Count;i++)</P> <P>{</P> <P>if(cbl.Items<img src="/emoticons/emotion-55.gif" alt="Idea" />.Selected)</P> <P>prof1.m_PPSelected += cbl.Items<img src="/emoticons/emotion-55.gif" alt="Idea" />.Text += ";";</P> <P>}</P> <P>cbl.EnableViewState=true;</P> <P>this.SaveViewState();</P> <P>ChildControlsCreated = false;</P> <P>EnsureChildControls();</P> <P>savedState=true;</P> <P>}</P> <P>}</P> <P>catch(Exception ex)</P> <P>{</P> <P>}</P> <P>}</P> <P>/// &lt;summary&gt;</P> <P>///</P> <P>If the ApplyChanges method succeeds, this method is called by the ToolPane object</P> <P>///</P> <P>to refresh the specified property values in the toolpart user interface.</P> <P>/// &lt;/summary&gt;</P> <P>public override void SyncChanges()</P> <P>{</P> <P>// Sync with the new property changes here.</P> <P>}</P> <P>&nbsp;</P> <P>/// &lt;summary&gt;</P> <P>///</P> <P>This method is called by the ToolPane object if the user discards changes to the selected Web Part. </P> <P>/// &lt;/summary&gt;</P> <P>public override void CancelChanges()</P> <P>{</P> <P>}</P> <P>&nbsp;</P> <P>/// &lt;summary&gt;</P> <P>/// Render this tool part to the output parameter specified.</P> <P>/// &lt;/summary&gt;</P> <P>/// &lt;param name="output"&gt;The HTML writer to write out to &lt;/param&gt;</P> <P>protected override void RenderToolPart(HtmlTextWriter output)</P> <P>{</P> <P>try</P> <P>{</P> <P>//this.EnsureChildControls();</P> <P>//Assign the web part custom property value to the input control.</P> <P>ngenious.profile prof1 = (ngenious.profile)this.ParentToolPane.SelectedWebPart;</P> <P>cbl.RenderControl(output);</P> <P>output.Write("&lt;BR&gt;&lt;input name= '" + "selprops");</P> <P>output.Write("' type='hidden' value='" + SPEncode.HtmlEncode(prof1.m_PPSelected) + "'&gt;&lt;BR&gt;");</P> <P>&nbsp;</P> <P>if(strerr.Length &gt; 0 )</P> <P>{</P> <P>output.Write("&lt;BR&gt;&lt;input name= '" + "ErrorText");</P> <P>output.Write("' type='Text' value='" + SPEncode.HtmlEncode(strerr) + "'&gt;&lt;BR&gt;");</P> <P>}</P> <P>}</P> <P>catch(Exception ex)</P> <P>{</P> <P>output.Write("Error: " + ex.ToString());</P> <P>}</P> <P>}</P> <P>&nbsp;</P> <P>protected override void CreateChildControls()</P> <P>{</P> <P>try</P> <P>{</P> <P>ngenious.profile prof1 = (ngenious.profile)this.ParentToolPane.SelectedWebPart;</P> <P>// Set the string array with value from existing string for Profile Properties Selected</P> <P>string initialval = prof1.m_PPSelected;</P> <P>string[] sarray = initialval.Split(';');</P> <P>// Create the CheckBoxList to manage the profile properties selection</P> <P>&nbsp;</P> <P>cbl = new CheckBoxList();</P> <P>cbl.EnableViewState = true;</P> <P>&nbsp;</P> <P>// Create the DataTable that will include the properties from ProfileSchema</P> <P>DataTable dt = new DataTable();</P> <P>DataRow dr;</P> <P>&nbsp;</P> <P>dt.Columns.Add(new DataColumn("Name", typeof(string)));</P> <P>&nbsp;</P> <P>int nret = ContextIsSPS();</P> <P>// Check to see if we are running in SPS context or WSS</P> <P>// If WSS, then call the getServerName Function and retrive Server Information</P> <P>// Then user the userprofileservices object to GetProfileSchema</P> <P>&nbsp;</P> <P>if(nret == 1)</P> <P>{</P> <P>// That means we are in SPS Context</P> <P>&nbsp;</P> <P>// Use TopologyManager to get to User Profile Config Manager</P> <P>// This will allow us to get to list of profile properties and check if it is public or private</P> <P>PortalContext pc = PortalApplication.GetContext();</P> <P>&nbsp;</P> <P>//initialize user profile config manager object</P> <P>UserProfileConfigManager upcm = new UserProfileConfigManager(pc);</P> <P>Microsoft.SharePoint.Portal.UserProfiles.PropertyCollection pcol = upcm.GetProperties();</P> <P>IEnumerator enumprop = pcol.GetEnumerator();</P> <P>while(enumprop.MoveNext())</P> <P>{</P> <P>// Check to see each properties IsPrivate value;</P> <P>Property prop = (Property)enumprop.Current;</P> <P>if(!prop.IsPrivate)</P> <P>{</P> <P>dr = dt.NewRow();</P> <P>dr[0] = prop.Name;</P> <P>dt.Rows.Add(dr);</P> <P>}</P> <P>}</P> <P>&nbsp;</P> <P>DataView dv = new DataView(dt);</P> <P>&nbsp;</P> <P>cbl.DataSource = dv;</P> <P>cbl.DataTextField="Name";</P> <P>cbl.DataValueField="Name";</P> <P>cbl.DataBind();</P> <P>&nbsp;</P> <P>for(int i = 0; i &lt; sarray.Length - 1;i++)</P> <P>{</P> <P>ListItem liv = cbl.Items.FindByText(sarray<img src="/emoticons/emotion-55.gif" alt="Idea" />);</P> <P>liv.Selected = true;</P> <P>}</P> <P>&nbsp;</P> <P>this.Controls.Add(cbl);</P> <P>}</P> <P>else if (nret == 2)</P> <P>{</P> <P>// That means we are in WSS Context.</P> <P>// Use the servername information, to connect to the userprofileservice</P> <P>// and retrieve Profile Properties using GetProfileSchema</P> <P>usrprof.userprofile.UserProfileService ups = new usrprof.userprofile.UserProfileService("http://" + svrname + "/_vti_bin/UserProfileService.asmx");</P> <P>ups.Credentials = System.Net.CredentialCache.DefaultCredentials;</P> <P>&nbsp;</P> <P>usrprof.userprofile.PropertyInfo[] pi = ups.GetUserProfileSchema();</P> <P>for(int cnt = 0; cnt &lt; pi.Length; cnt++)</P> <P>{</P> <P>dr = dt.NewRow();</P> <P>dr[0] = pi[cnt].Name;</P> <P>dt.Rows.Add(dr);</P> <P>}</P> <P>&nbsp;</P> <P>DataView dv = new DataView(dt);</P> <P>&nbsp;</P> <P>cbl.DataSource = dv;</P> <P>cbl.DataTextField="Name";</P> <P>cbl.DataValueField="Name";</P> <P>cbl.DataBind();</P> <P>&nbsp;</P> <P>for(int i = 0; i &lt; sarray.Length - 1;i++)</P> <P>{</P> <P>ListItem liv = cbl.Items.FindByText(sarray<img src="/emoticons/emotion-55.gif" alt="Idea" />);</P> <P>liv.Selected = true;</P> <P>}</P> <P>&nbsp;</P> <P>this.Controls.Add(cbl);</P> <P>}</P> <P>&nbsp;</P> <P>}</P> <P>catch(Exception exc)</P> <P>{</P> <P>strerr = "Servername: " + svrname + ", " + exc.Message;</P> <P>}</P> <P>}</P> <P>&nbsp;</P> <P>public void getServerName()</P> <P>{</P> <P>RegistryKey rk = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\ComputerName\\ComputerName", true);</P> <P>svrname = (string)rk.GetValue("ComputerName");</P> <P>&nbsp;</P> <P>return;</P> <P>}</P> <P>&nbsp;</P> <P>/// &lt;summary&gt;</P> <P>/// Returns a Boolean indicating whether we're running in SharePoint Portal Server</P> <P>/// or not.</P> <P>/// &lt;/summary&gt;</P> <P>/// &lt;returns&gt;True if we're running in SPS; false otherwise.&lt;/returns&gt;</P> <P>public int ContextIsSPS()</P> <P>{</P> <P>Assembly assemblyInstance = null;</P> <P>try</P> <P>{</P> <P>// Try to bind to the Microsoft.SharePoint.Portal assembly.</P> <P>// If it isn't there, we're not in SPS.</P> <P>assemblyInstance = Assembly.LoadWithPartialName("Microsoft.Sharepoint.Portal");</P> <P>if(assemblyInstance != null)</P> <P>{</P> <P>// We've successfully bound to the assembly, so now let's try to determine</P> <P>// the current PortalContext.</P> <P>System.Type oType = assemblyInstance.GetType("Microsoft.SharePoint.Portal.PortalContext");</P> <P>PropertyInfo oInfo = oType.GetProperty("Current");</P> <P>object result = oInfo.GetValue(null, null);</P> <P>if (result == null) </P> <P>{</P> <P>// SPS Installation, but WSS context</P> <P>return 2;</P> <P>}</P> <P>else </P> <P>{</P> <P>// Running in SPS context</P> <P>// To determine SPS site URL:</P> <P>//</P> <P>PropertyInfo oSiteURLInfo<SPAN>&nbsp; </SPAN>= result.GetType().GetProperty("SiteUrl");</P> <P>//</P> <P>string siteurl =<SPAN>&nbsp; </SPAN>(string)oSiteURLInfo.GetValue(result,null);</P> <P>return 1;</P> <P>}</P> <P>}</P> <P>else</P> <P>{</P> <P>// We couldn't bind to the Portal assembly, so we're not on an SPS box</P> <P>return 0;</P> <P>}</P> <P>}</P> <P>catch (Exception err)</P> <P>{</P> <P>return 0;</P> <P>}</P> <P>finally</P> <P>{</P> <P>assemblyInstance = null;</P> <P>}</P> <P>}</P> <P>}</P> <P>}</P> <P>&nbsp;</P> <P>&nbsp;</P> <P>While loading data, in the CreateChildControls method, I get a handle to the SelectedWebPart and retrieve the string value of m_PPSelected. I convert this string to a string array. Next I create a data source for the CheckBox List. I will be using a DataTable for this purpose.</P> <P>&nbsp;</P> <P>The web part was designed to work with both WSS and SPS, hence we will check for ContextIsSPS at this point. There was an article on MSD2D that showed how to implement the ContextIsSPS. We will then retrieve the profile properties accordingly and fill up the DataTable with profile property information. One of the important things to note here is to check how we can retrieve private or public only properties by checking the prop.IsPrivate value:</P> <P>UserProfileConfigManager upcm = new UserProfileConfigManager(pc);</P> <P>Microsoft.SharePoint.Portal.UserProfiles.PropertyCollection pcol = upcm.GetProperties();</P> <P>IEnumerator enumprop = pcol.GetEnumerator();</P> <P>while(enumprop.MoveNext())</P> <P>{</P> <P>// Check to see each properties IsPrivate value;</P> <P>Property prop = (Property)enumprop.Current;</P> <P>if(!prop.IsPrivate)</P> <P>{</P> <P>dr = dt.NewRow();</P> <P>dr[0] = prop.Name;</P> <P>dt.Rows.Add(dr);</P> <P>}</P> <P>}</P> <P>&nbsp;</P> <P>&nbsp;</P> <P>We will then attach this data source to the CheckBox List. This will generate check boxes for each property.</P> <P>&nbsp;</P> <P>Next we will traverse through the string array and compare values with the CheckBox List to see which check boxes should be checked from the last settings.</P> <P>&nbsp;</P> <P>for(int i = 0; i &lt; sarray.Length - 1;i++)</P> <P>{</P> <P>ListItem liv = cbl.Items.FindByText(sarray<img src="/emoticons/emotion-55.gif" alt="Idea" />);</P> <P>liv.Selected = true;</P> <P>}</P> <P>&nbsp;</P> <P>After this we will add the CheckBox List to the control.</P> <P>This.Controls.add(cbl);</P> <P>&nbsp;</P> <P>On the other hand, when saving data for changes from the ToolPart Pane, we override the ApplyChanges method as follows:</P> <P>&nbsp;</P> <P>public override void ApplyChanges()</P> <P>{</P> <P>try</P> <P>{</P> <P>ngenious.profile prof1 = (ngenious.profile)this.ParentToolPane.SelectedWebPart;</P> <P>&nbsp;</P> <P>if(!savedState)</P> <P>{</P> <P>prof1.m_PPSelected = "";</P> <P>&nbsp;</P> <P>base.ApplyChanges();</P> <P>ToolPane tp = this.ParentToolPane;</P> <P>WebPart myWP = (ngenious.profile)tp.SelectedWebPart;</P> <P>for(int i = 0;i &lt; cbl.Items.Count;i++)</P> <P>{</P> <P>if(cbl.Items<img src="/emoticons/emotion-55.gif" alt="Idea" />.Selected)</P> <P>prof1.m_PPSelected += cbl.Items<img src="/emoticons/emotion-55.gif" alt="Idea" />.Text += ";";</P> <P>}</P> <P>cbl.EnableViewState=true;</P> <P>this.SaveViewState();</P> <P>ChildControlsCreated = false;</P> <P>EnsureChildControls();</P> <P>savedState=true;</P> <P>}</P> <P>}</P> <P>catch(Exception ex)</P> <P>{</P> <P>}</P> <P>}</P> <P>We will do the opposite here, we will traverse through the CheckBox list and retrieve items that were checked and fill the m_PPSelected variable with the information separated by semi-colon.</P> <P>&nbsp;</P> <P>Hope this helps someone.</P> <P>&nbsp;</P> <P>Ciao,</P> <P>nilaish</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16864" width="1" height="1">Connectable Web Part - Provider is of WSS 2.0 and Consumer is from WSS 3.0http://www.sharepointblogs.com/subodh/archive/2006/12/12/16858.aspxTue, 12 Dec 2006 12:51:00 GMTb1455315-031d-41ea-92eb-9c5d093e5c7c:16858subodhpathak2<P>Hi Everyone,</P> <P>Here I am opening a discussion about the connectable web part. As we know that in WSS 3.0 the architecture is changed. Is any body tried that if&nbsp;provider web part is designed in WSS 2.0 and consumer web part is designed in WSS 3.0 will work?</P> <P>If anybody has done this kind of project, kindly share their views and source in this post.</P> <P>Thanks!</P> <P>&nbsp;</P><img src="http://www.sharepointblogs.com/aggbug.aspx?PostID=16858" width="1" height="1">