{"id":1445,"date":"2011-05-04T19:41:23","date_gmt":"2011-05-04T19:41:23","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=1445"},"modified":"2017-01-22T23:31:31","modified_gmt":"2017-01-22T23:31:31","slug":"adding-custom-aspx-pages-to-the-fim-portal","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/adding-custom-aspx-pages-to-the-fim-portal","title":{"rendered":"Naughty but nice: adding custom ASPX pages to the FIM Portal"},"content":{"rendered":"<p>At TEC I sat through a combined Microsoft-Quest-OCG talk which had something to do with an integration between Quest ARS and the FIM Portal. At least I think that&#8217;s what it was &#8211; I&#8217;m afraid the talk was rather disorganised and I was left completely unsure about what they actually had done &#8211; but the one bit that did make me sit up and take notice was when they showed a FIM Portal page with a Quest page nicely framed inside it. I thought &#8220;I need to figure out how to do that!&#8221;<br \/>\n<!--more--><\/p>\n<h3>Integrating another site into the Portal<\/h3>\n<p>You can add external links to the FIM Portal. You create a Navigation Bar Resource or a Home Page Resource with the link, however when someone clicks the link they will leave the FIM Portal. How much nicer to have it work like this:<\/p>\n<p><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/fim-dr-who.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1458\" title=\"fim dr who\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/fim-dr-who.jpg\" alt=\"\" width=\"686\" height=\"481\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/fim-dr-who.jpg 686w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/fim-dr-who-300x210.jpg 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/a><\/p>\n<h3>So you know this is unsupported, right?<\/h3>\n<p>I believe so. To achieve this you have to add aspx pages to the FIM site. Actually I haven&#8217;t seen anywhere in the documentation that explicity says &#8220;not allowed&#8221;, but whenever someone has asked how to do this on the forum the reponse has been &#8220;can&#8217;t be done&#8221; and &#8220;not supported&#8221;.<\/p>\n<p>So while I&#8217;m going to show you how I did it, I can&#8217;t say at this point how the modifications will be affected by a FIM upgrade. It may be you have to re-add the pages again &#8211; we&#8217;ll see.<\/p>\n<h3>But if you still want to know how I did it&#8230;<\/h3>\n<p>Here&#8217;s how I got it to work &#8211; but you should know that I&#8217;ve come at this from a point of complete Sharepoint ignorance, and I have no idea how Quest\/OCG got their demo working. After trying to hack some files myself, then wasting time researching &#8220;feature stapling&#8221; which proved to be no help, I got some advice from a Sharepoint-savvy collegue who suggested this general approach.<\/p>\n<h3>Pre-reqs<\/h3>\n<p>The only pre-requisite here is that you&#8217;ll have to download and install <a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?FamilyID=baa3ad86-bfc1-4bd4-9812-d9e710d44f42&amp;displaylang=en\">Sharepoint Designer 2007<\/a>. I installed it on my dev FIM server and was able to modify both the dev and prod servers from there.<\/p>\n<h3>Create a Document Library<\/h3>\n<p>The first time, you must create a document library to store your aspx files.<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>Logon to the FIM Portal as an account with Sharepoint Administration permissions.<br \/>\nIn the top-right corner, click <strong>Site Actions <\/strong>and then <strong>Site Settings<\/strong>.<\/p>\n<p>Note if you don&#8217;t see &#8220;Site Actions&#8221; then you don&#8217;t have the appropriate Sharepoint permissions.<\/td>\n<td width=\"400\"><img decoding=\"async\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-site-settings.jpg\" alt=\"\" \/><\/td>\n<\/tr>\n<tr>\n<td>Under <strong>Site Actions<\/strong> click <strong>Create<\/strong> and choose &#8220;Web Part Page&#8221;.<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-create-page.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1451\" title=\"webpart create page\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-create-page.jpg\" alt=\"\" width=\"120\" height=\"98\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>At the bottom of the next form you should see that Document Library is &#8220;None Available&#8221;. Click the <strong>Document Library<\/strong> link to create one.<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-library.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1449\" title=\"webpart library\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-library.jpg\" alt=\"\" width=\"160\" height=\"70\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>Give the library a name and description.<\/td>\n<td width=\"400\"><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-library-settings.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1450\" title=\"webpart library settings\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-library-settings.jpg\" alt=\"\" width=\"414\" height=\"272\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-library-settings.jpg 518w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-library-settings-300x196.jpg 300w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Create the page<\/h3>\n<p>Create a new webpart page:<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>Go back to the <strong>Site Actions -&gt; Create<\/strong> page and again click &#8220;Web Part Page&#8221;.<\/td>\n<td width=\"400\"><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-create-page.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1451\" title=\"webpart create page\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-create-page.jpg\" alt=\"\" width=\"120\" height=\"98\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>Give the page a suitable name.<\/p>\n<p>It doesn&#8217;t matter what layout we pick as we&#8217;re actually going to over-write all the aspx it generates.<br \/>\nSave it to your new library.<\/p>\n<p>The page will come up in edit mode. Just click <strong>Exit Edit Mode<\/strong> to close it.<\/td>\n<td width=\"400\"><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-page-settings.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1452\" title=\"webpart page settings\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/webpart-page-settings.jpg\" alt=\"\" width=\"387\" height=\"455\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Hack the ASPX<\/h3>\n<p>Now we&#8217;re going to replace the default aspx with new content that simply opens our external site in an iframe.<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>Open Sharepoint Designer 2007. Click <strong>File -&gt; Open Site<\/strong> and then enter the URL of your FIM Portal.<\/td>\n<td width=\"400\"><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdes-open-site.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1453\" title=\"shdes open site\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdes-open-site.jpg\" alt=\"\" width=\"397\" height=\"302\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdes-open-site.jpg 567w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdes-open-site-300x228.jpg 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>If all has worked so far you should see your Document Library, and inside you will find your new ASPX file.<br \/>\nCheck the file out then open it as Text.<\/td>\n<td width=\"400\"><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdev-edit-page.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1457\" title=\"shdev edit page\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdev-edit-page.jpg\" alt=\"\" width=\"332\" height=\"185\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdev-edit-page.jpg 369w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/shdev-edit-page-300x167.jpg 300w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>Replace the contents of the aspx file (see code below) then save and check back in the file.<\/p>\n<p>You should now be able to browse your new page at http:\/\/fimserver\/IdentityManagement\/MyASPX\/MyLink.aspx<\/p>\n<p>Note that I always see this error the first time I access the page, and then it goes away. Not sure if I should be worried or not!<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/error.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1462\" title=\"error\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/error.jpg\" alt=\"\" width=\"415\" height=\"144\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/error.jpg 415w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/error-300x104.jpg 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Here&#8217;s the aspx content. Just change the link to the one you actually want &#8211; possibly not the Dr Who page&#8230;<\/p>\n<p><code>&lt;%@ Page masterpagefile=\"~masterurl\/custom.master\" language=\"C#\" inherits=\"Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" meta:progid=\"SharePoint.WebPartPage.Document\" UICulture=\"auto\" Culture=\"auto\" %&gt;<br \/>\n&lt;%@ Register Tagprefix=\"SharePoint\" Namespace=\"Microsoft.SharePoint.WebControls\" Assembly=\"Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" %&gt; &lt;%@ Register Tagprefix=\"Utilities\" Namespace=\"Microsoft.SharePoint.Utilities\" Assembly=\"Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" %&gt; &lt;%@ Import Namespace=\"Microsoft.SharePoint\" %&gt; &lt;%@ Register Tagprefix=\"WebPartPages\" Namespace=\"Microsoft.SharePoint.WebPartPages\" Assembly=\"Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" %&gt;<\/p>\n<p>&lt;asp:Content ContentPlaceHolderID=\"PlaceHolderTitleBar\" runat=\"server\"&gt;<br \/>\n&lt;\/asp:Content&gt;<\/p>\n<p>&lt;asp:Content id=\"content1\" ContentPlaceHolderID=\"PlaceHolderMain\" runat=\"server\"&gt;<br \/>\n        &lt;iframe runat=\"server\" id=\"reportIFrame\" class=\"style1\" frameborder=\"0\" scrolling=\"yes\" style=\"border-style: none; border-color: inherit; border-width: 0px; overflow: auto; width: 1100px; height: 800px\" src=\"http:\/\/www.bbc.co.uk\/doctorwho\/dw\"&gt;<br \/>\n        &lt;\/iframe&gt;<br \/>\n&lt;\/asp:Content&gt;<\/code><\/p>\n<h3>Finally &#8211; make the new page available<\/h3>\n<p>I&#8217;m not going to go into details about how to do this here, but you need to look at Home Page Resources and\/or Navigation Bar Resources.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At TEC I sat through a combined Microsoft-Quest-OCG talk which had something to do with an integration between Quest ARS and the FIM Portal. At least I think that&#8217;s what it was &#8211; I&#8217;m afraid the talk was rather disorganised and I was left completely unsure about what they actually had done &#8211; but the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[42,21],"tags":[],"class_list":["post-1445","post","type-post","status-publish","format-standard","hentry","category-fim-2010","category-sharepoint"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-nj","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=1445"}],"version-history":[{"count":22,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1445\/revisions"}],"predecessor-version":[{"id":1476,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1445\/revisions\/1476"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=1445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=1445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=1445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}