{"id":120,"date":"2007-06-27T22:20:40","date_gmt":"2007-06-27T22:20:40","guid":{"rendered":"http:\/\/parkesy.wordpress.com\/2007\/06\/27\/blind-leading-the-blind\/"},"modified":"2007-06-27T22:20:40","modified_gmt":"2007-06-27T22:20:40","slug":"blind-leading-the-blind","status":"publish","type":"post","link":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/","title":{"rendered":"Blind leading the blind"},"content":{"rendered":"<p>I&#8217;m about two thirds of the way through the <a href=\"http:\/\/parkesy.wordpress.com\/2007\/06\/26\/whose-the-dummy-now\/\" title=\"Who&#039;s the dummy\" class=\"broken_link\">Visual Web Developer book i got this week<\/a><\/p>\n<p>I&#8217;ve just created a site map file, enabled security trimming in the web.config file but couldn&#8217;t get one of my menu entries to only appear when logged in<\/p>\n<p>Normally i read it first, then create it myself instead of just blindly copying the example<\/p>\n<p>I just wanted two entries. A general page for anyone and a members only page.<\/p>\n<p>Home<br \/>\n|&#8212;Members Only<br \/>\n|&#8212;General<\/p>\n<p>So this is\u00a0node section of my web.sitemap\u00a0file<\/p>\n<h6><em>\u00a0&lt;siteMapNode url=&#8221;~\/Default.aspx&#8221; title=&#8221;Home&#8221;\u00a0 description=&#8221;Go to home page&#8221;&gt;<br \/>\n\u00a0\u00a0&lt;siteMapNode url=&#8221;~\/MemberPages\/MembersOnly.aspx&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 title=&#8221;Members only&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 description=&#8221;Members only&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 roles=&#8221;SiteMembers&#8221; \/&gt;<br \/>\n\u00a0\u00a0&lt;siteMapNode url=&#8221;~general.aspx&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 title=&#8221;General&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 description=&#8221;General Stuff&#8221; \/&gt;<br \/>\n\u00a0&lt;\/siteMapNode&gt;<br \/>\n<\/em><em>\u00a0<\/em><\/h6>\n<p>When i previewed in the browser all the menu items appeared, even though i&#8217;d specified a role for it.<\/p>\n<p>So i went back and copied the example to the letter&#8230;.still the same<\/p>\n<p>This is\u00a0where i&#8217;m glad for having some experience reading Microsoft help files!<\/p>\n<p>What the section in the book neglets to mention is this <a target=\"_blank\" href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/ms178429(VS.80).aspx\" title=\"Filtering Site-Map Nodes Based on Security Roles  \">little snippet i found on MSDN<\/a><\/p>\n<h6>The security-trimming feature uses URL authorization on each request to determine whether a user has access to a URL that is associated  with a <strong>siteMapNode<\/strong> element.<\/h6>\n<p>So i removed the url attribute and volia! It worked as i was expecting it to<\/p>\n<p>But then i thought..&#8221;now i&#8217;ve removed that i have no link to click&#8221;<\/p>\n<p>and thats when the pieces fell into place (penny drop? more like a couple of grand!)<\/p>\n<p>The pages didn&#8217;t actually exist. I hadn&#8217;t created them as i was just playing with the concept and the book itself didn&#8217;t tell me to create the pages for the example it used<\/p>\n<p>I had already created a change password page that only members could access so changed it to point\u00a0to that<\/p>\n<h6><em>\u00a0&lt;siteMapNode url=&#8221;~\/Default.aspx&#8221; title=&#8221;Home&#8221;\u00a0 description=&#8221;Go to home page&#8221;&gt;<br \/>\n\u00a0\u00a0&lt;siteMapNode url=&#8221;~\/MemberPages\/ChangePasswordaspx&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 title=&#8221;Change Password&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 description=&#8221;Change Password Here&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 roles=&#8221;SiteMembers&#8221; \/&gt;<br \/>\n\u00a0\u00a0&lt;siteMapNode url=&#8221;~general.aspx&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 title=&#8221;General&#8221;<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0 description=&#8221;General Stuff&#8221; \/&gt;<br \/>\n\u00a0&lt;\/siteMapNode&gt;<\/em><\/h6>\n<p>Bingo!<\/p>\n<p>I went back and looked at the chapter again and it doesn&#8217;t actually tell you specifically to create the pages&#8230;so the example would never have worked<\/p>\n<p>I can&#8217;t believe i was worried though&#8230;i haven&#8217;t run into anything at the moment that i don&#8217;t get. Granted this is just a getting started book but i&#8217;m pretty pleased with myself so far!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m about two thirds of the way through the Visual Web Developer book i got this week I&#8217;ve just created a site map file, enabled security trimming in the web.config file but couldn&#8217;t get one of my menu entries to only appear when logged in Normally i read it first, then create it myself instead<\/p>\n<p><a class=\"readmore\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/\"><span class=\"arrow-right icon\"><\/span>Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[37,55],"tags":[],"class_list":["post-120","post","type-post","status-publish","format-standard","hentry","category-programming","category-visual-web-developer-express-2005"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Blind leading the blind - Andy&#039;s Techie Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Blind leading the blind - Andy&#039;s Techie Blog\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m about two thirds of the way through the Visual Web Developer book i got this week I&#8217;ve just created a site map file, enabled security trimming in the web.config file but couldn&#8217;t get one of my menu entries to only appear when logged in Normally i read it first, then create it myself insteadRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/\" \/>\n<meta property=\"og:site_name\" content=\"Andy&#039;s Techie Blog\" \/>\n<meta property=\"article:published_time\" content=\"2007-06-27T22:20:40+00:00\" \/>\n<meta name=\"author\" content=\"Andy Parkes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy Parkes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/\",\"name\":\"Blind leading the blind - Andy&#039;s Techie Blog\",\"isPartOf\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\"},\"datePublished\":\"2007-06-27T22:20:40+00:00\",\"dateModified\":\"2007-06-27T22:20:40+00:00\",\"author\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\"},\"breadcrumb\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/andyparkes.co.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blind leading the blind\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/\",\"name\":\"Andy&#039;s Techie Blog\",\"description\":\"Professional Geek\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\",\"name\":\"Andy Parkes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"caption\":\"Andy Parkes\"},\"description\":\"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.\",\"sameAs\":[\"http:\/\/www.andyparkes.co.uk\/blog\"],\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Blind leading the blind - Andy&#039;s Techie Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/","og_locale":"en_US","og_type":"article","og_title":"Blind leading the blind - Andy&#039;s Techie Blog","og_description":"I&#8217;m about two thirds of the way through the Visual Web Developer book i got this week I&#8217;ve just created a site map file, enabled security trimming in the web.config file but couldn&#8217;t get one of my menu entries to only appear when logged in Normally i read it first, then create it myself insteadRead More","og_url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/","og_site_name":"Andy&#039;s Techie Blog","article_published_time":"2007-06-27T22:20:40+00:00","author":"Andy Parkes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Parkes","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/","url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/","name":"Blind leading the blind - Andy&#039;s Techie Blog","isPartOf":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#website"},"datePublished":"2007-06-27T22:20:40+00:00","dateModified":"2007-06-27T22:20:40+00:00","author":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d"},"breadcrumb":{"@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2007\/06\/27\/blind-leading-the-blind\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/andyparkes.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"Blind leading the blind"}]},{"@type":"WebSite","@id":"https:\/\/andyparkes.co.uk\/blog\/#website","url":"https:\/\/andyparkes.co.uk\/blog\/","name":"Andy&#039;s Techie Blog","description":"Professional Geek","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d","name":"Andy Parkes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","caption":"Andy Parkes"},"description":"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.","sameAs":["http:\/\/www.andyparkes.co.uk\/blog"],"url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pmvJ6-1W","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":0,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/120\/revisions"}],"wp:attachment":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}