<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Anything And Everything by Keith McGuinness</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/keithmg/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/keithmg/feed.xml</link>
    <description />
    <lastBuildDate>Mon, 06 Apr 2015 14:17:16 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Enable Windows Authentication on ASPX page allowing all users without login</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/enable-windows-authentication-on-aspx-page-allowing-all-users-without-login</link>
      <pubDate>Tue, 13 Nov 2012 10:07:39 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2012/11/13/enable-windows-authentication-on-aspx-page-allowing-all-users-without-login/</guid>
      <description><![CDATA[Simple config which is obvious&nbsp;when you remember and dont forge :-)&nbsp;This allows all users...]]></description>
      <content:encoded><![CDATA[<p>Simple config which is obvious&nbsp;when you remember and dont forge :-)&nbsp;This allows all users access your website but also allows you to check via your code or other custom authentication their right to access it.</p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515;">authentication</span><span style="font-size: 9.5pt; font-family: Consolas; color: red;">mode</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 9.5pt; font-family: Consolas;">"<span style="color: blue;">Windows</span>"<span style="color: blue;">&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515;">authentication</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="GramE"><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515;">authorization</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515;">allow</span><span style="font-size: 9.5pt; font-family: Consolas; color: red;">users</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 9.5pt; font-family: Consolas;">"<span style="color: blue;">*</span>"<span style="color: blue;"> /&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515;">deny</span><span style="font-size: 9.5pt; font-family: Consolas; color: red;">users</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 9.5pt; font-family: Consolas;">"<span style="color: blue;">?</span>"<span style="color: blue;"> /&gt;</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515;">authorization</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">&gt;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; mso-layout-grid-align: none; text-autospace: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: blue;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span class="SpellE"><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515;">anonymousIdentification</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: red;">enabled</span><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">=</span><span style="font-size: 9.5pt; font-family: Consolas;">"<span style="color: blue;">false</span>"<span style="color: blue;"> /&gt;</span></span></p>
<p class="MsoNormal">You will get the username etc and will be able to take actions you desire.</p>
<p>Hopefully might come in handy for someone who forgets!</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure: Windows 7 VM, Hyper-V enabled Azure VMs</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/azure-windows-7-vm-hyper-v-enabled-azure-vms</link>
      <pubDate>Tue, 08 May 2012 07:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2012/05/08/azure-windows-7-vm-hyper-v-enabled-azure-vms/</guid>
      <description><![CDATA[If you are trying or wondering if Windows Azure supports Windows 7, Windows 8 or other OS via a...]]></description>
      <content:encoded><![CDATA[<p>If you are trying or wondering if Windows Azure supports Windows 7, Windows 8 or other OS via a Hyper-V on a 2008 VM image uplodaed to Azure you will realise you cant do this.</p>
<p>The operating system that is installed can be one of the following:</p>
<ul>
<li class="unordered">Windows Server 2008 R2 Enterprise (English only)</li>
<li class="unordered">Windows Server 2008 R2 Standard (English only)</li>
</ul>
<p class="unordered">Hyper-V cannot currently be enabled on the VM images to allow you to install operating systems like Windows 7 or something else.</p>
<p class="unordered"><strong>Your scenario:</strong></p>
<ol>
<li>
<div class="unordered">Upload Win2008R2 Image to Azure</div>
</li>
<li>
<div class="unordered">Enable Hyper-V on uploaded Azure image</div>
</li>
</ol>
<p class="unordered">You will fail on step 2.</p>
<p class="unordered">You will get something like this:</p>
<p class="unordered"><em><span style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/23/0435.Hyper-V.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-23/0435.Hyper_2D00_V.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/89/23/0435.Hyper-V.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-89-23/0435.Hyper_2D00_V.png" /></a></span></em></p>
<div class="unordered"><em>The processor on this computer is not compatible with hyper-v .........</em></div>
<div class="unordered"><em></em>&nbsp;</div>
<div class="unordered"><strong>The official Resource from MSDN is</strong> <a title="Azure" href="https://msdn.microsoft.com/en-us/library/windowsazure/gg433107.aspx?corrkey=F9BD91FF-985D-4228-A034-8C93D6C70F80&amp;corrorig=OOBuddy&amp;corrtid=999">here</a>:</div>
<p class="unordered">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Strong name validation failed. (Exception from HRESULT: 0x8013141A)</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/strong-name-validation-failed-exception-from-hresult-0x8013141a</link>
      <pubDate>Tue, 20 Mar 2012 08:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2012/03/20/strong-name-validation-failed-exception-from-hresult-0x8013141a/</guid>
      <description><![CDATA[If you come across this error:
{"Could not load file or assembly 'TheAssemblyYouHaveReferenced' or...]]></description>
      <content:encoded><![CDATA[<p>If you come across this error:</p>
<p>{"Could not load file or assembly 'TheAssemblyYouHaveReferenced' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)":"TheAssemblyYouHaveReferenced'}</p>
<p>And you meet the following criteria</p>
<ul>
<li>You are referencing a Delay Signed Dll in your project</li>
<li>Your OS is Win7 x64 or Vista x64</li>
<li>You have the messages mentioned above.</li>
</ul>
<p>You can create a "MyDisableRegistryFile.reg" file with something like below:</p>
<p><span style="color: #3366ff;">[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,58845dcd9090cc91]</span><br /><span style="color: #3366ff;">[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,58845dcd9090cc91]</span></p>
<p>Where 58845dcd9090cc91(Fictious Value :-)) is the PublicKeyToken. If you create this file you can run it on each deployment or machine as part of your install process.</p>
<p><strong>It should be pointed out that disabling SN verification isnt very secure but you may have your own reasons.</strong></p>
<p>Also beaware your dll thats causing the error may have referenced other dlls that may have the same problem, so you may have to do this multiple times.</p>
<p>Quick fix use<em> <strong>C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sn.exe if on X64 and combine with&nbsp; -Vr &lt;dllpath&gt; if you want to disable verification too(-Vr is case sensitive). </strong></em>This is basically because sn.exe is 32bit and always returns<span style="text-decoration: underline;"><strong> success even in failure</strong></span>.</p>
<p>If you dont have the SDK installed for SN then get it here: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=8279">https://www.microsoft.com/en-us/download/details.aspx?id=8279</a></p>
<p>This blog has some more information too&nbsp;-&gt; <a href="https://blogs.msdn.com/b/shitals/archive/2008/05/01/8446582.aspx">https://blogs.msdn.com/b/shitals/archive/2008/05/01/8446582.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Cannot find the X.509 certificate , load cert WCF</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/cannot-find-the-x-509-certificate-load-cert-wcf</link>
      <pubDate>Tue, 15 Nov 2011 07:28:11 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2011/11/15/cannot-find-the-x-509-certificate-load-cert-wcf/</guid>
      <description><![CDATA[I just had an interesting problem trying to load a cert for my WCF service. The cert was installed...]]></description>
      <content:encoded><![CDATA[<p>I just had an interesting problem trying to load a cert for my WCF service. The cert was installed perfectly into both the Local machine and current user store.</p>
<p>No matter what I could do I couldnt get the WCF service to load the aqppropriate client certificate using its thumprint. It always just couldnt find it.&nbsp;It turns out that its actually quite easy and that I was making one silly mistake that I didnt see anywhere else online. <span style="font-size: small;"><span style="text-decoration: underline;">The certs thumbprint requires you to remove all the spaces</span>.</span></p>
<p><br /><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">WSHttpBinding</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> sampleBinding= </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">new</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> </span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">WSHttpBinding</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">();</span></span></p>
<p>sampleBinding.Security.Mode = <span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SecurityMode</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.Transport;</span></span></p>
<p>sampleBinding.Security.Transport.ClientCredentialType = <span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">HttpClientCredentialType</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.Certificate;</span></span></p>
<p><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">EndpointAddress </span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"></span></span>ea = </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">new </span></span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">EndpointAddress</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">(</span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">" <a href="https://myerviceaddress.svc">https://myerviceaddress.svc</a>"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">);</span></span></p>
<p><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">WsClient</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> wsClient =</span></span>&nbsp;&nbsp;<span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">new</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> <span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">WsClient</span></span></span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">(sampleBinding, ea);</span></span></p>
<p>wsClient.ClientCredentials.ClientCertificate.SetCertificate(<span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">StoreLocation</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.LocalMachine,</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">StoreName</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.My, </span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">X509FindType</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.FindByThumbprint,</span></span>&nbsp;<span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">"6827A9E09EEE24C6290C808ACEDD000FFC825345"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">);</span></span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;" face="Consolas" size="2"><span face="Consolas" size="2"></span></span>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;" face="Consolas" size="2"><span face="Consolas" size="2">If you want the certs properties so that you can just get them as it expects you could also just load them like below and print to intermediate window or look them up through the locals and copy the values in..</span></span></p>
<p><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">X509Certificate2 </span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"></span></span>actualCert = </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">new</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> </span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">X509Certificate2</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">(</span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">@"C:\Certpath\cert.pfx"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">, </span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">"password"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">);</span></span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;" face="Consolas" size="2"><span face="Consolas" size="2">The certmanager does this but I find this easier when your programming it exactly as it should expect</span></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"></span></span></span></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SilverLight Get user or Windows Credentials</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/silverlight-get-user-or-windows-credentials</link>
      <pubDate>Sat, 11 Dec 2010 06:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2010/12/11/silverlight-get-user-or-windows-credentials/</guid>
      <description><![CDATA[SilverLight hosted in ASPX with WCF integration to retrieve user Credentials:
First Setup IIS...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="line-height: 115%; font-size: 14pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">SilverLight hosted in ASPX with WCF integration to retrieve user Credentials:<o:p></o:p></span></span></b></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="line-height: 115%; font-size: 12pt; mso-bidi-font-size: 11.0pt;"><span style="font-family: Calibri;">First Setup IIS <span style="mso-spacerun: yes;">&nbsp;</span>correctly:<o:p></o:p></span></span></b></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: small;">1:Create a new AppPool in IIS <span style="mso-spacerun: yes;">&nbsp;</span>and give it an identity with suitable privileges -<span style="mso-spacerun: yes;">&nbsp; </span>Ill call it &ldquo;NewAppPool&rdquo;<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: small;">2: In IIS add a new application &ldquo;Example&rdquo;<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: small;">3. Edit the Basic Settings so your new app uses the &ldquo;NewAppPool&rdquo;<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: small;">4. In Authentication &ndash; <o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpFirst"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="font-size: small;">Disable Anonymous access<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Enable Windows Access<o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">This example assumes you have an ASPX site hosting your SilverlightApplication and the ASPX Site also exposes a WCF service that you are using to get\send some data which requires some form of user authentication<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">In your WCF Config make sure you have your authentication scheme set to Negotiate. Windows or NTLM will not work when deployed on IIS. NTLM will only work on your ASP.NET Development server when you press F5.<o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">customBinding</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">&gt;</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">binding</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"> </span><span style="font-family: Consolas; color: red; font-size: 9.5pt;">name</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;"><span style="color: blue;"><span style="font-size: x-small;">MyApsxWebSite.MyService</span></span>.customBinding0</span>"<span style="color: blue;">&gt;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">binaryMessageEncoding</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp; </span>/&gt;</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">httpTransport</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"> </span><span style="font-family: Consolas; color: red; font-size: 9.5pt;">authenticationScheme</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">Negotiate</span>"<span style="color: blue;"><span style="mso-spacerun: yes;">&nbsp; </span>/&gt; </span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">binding</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">&gt;</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">customBinding</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Now Configure your WCF service\Silverlight to work on IIS.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><strong>Wcf First and then ASPX binding&rsquo;s:<o:p></o:p></strong></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">In your binding in the web.config, comment out the IMetaDataExchange. This causes the infamous error &ldquo;Security settings for this service require &lsquo;Anonymous authentication but it is not enabled for the IIS application &hellip;.. &rdquo;. This endpoint forces your service to use Anonymous bindings, so remove it or change it.. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 8pt; mso-bidi-font-size: 9.5pt;">services</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">&gt;</span><span style="font-family: Consolas; font-size: 8pt; mso-bidi-font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 8pt; mso-bidi-font-size: 9.5pt;">service</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;"> </span><span style="font-family: Consolas; color: red; font-size: 8pt; mso-bidi-font-size: 9.5pt;">name</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 8pt; mso-bidi-font-size: 9.5pt;">"<span style="color: blue;">MyApsxWebSite.MyService</span>"<span style="color: blue;">&gt;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 8pt; mso-bidi-font-size: 9.5pt;">endpoint</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;"> </span><span style="font-family: Consolas; color: red; font-size: 8pt; mso-bidi-font-size: 9.5pt;">address</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 8pt; mso-bidi-font-size: 9.5pt;">""<span style="color: blue;"> </span><span style="color: red;">binding</span><span style="color: blue;">=</span>"<span style="color: blue;">customBinding</span>"<span style="color: blue;"> </span><span style="color: red;">bindingConfiguration</span><span style="color: blue;">=</span>"<span style="color: blue;">MyApsxWebSite.MyService.customBinding0</span>"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; color: red; font-size: 8pt; mso-bidi-font-size: 9.5pt;">contract</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 8pt; mso-bidi-font-size: 9.5pt;">"<span style="color: blue;">MyApsxWebSite.MyService</span>"<span style="color: blue;"> /&gt;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;!--</span><span style="font-family: Consolas; color: green; font-size: 8pt; mso-bidi-font-size: 9.5pt;">&lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt;</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">--&gt;</span><span style="font-family: Consolas; font-size: 8pt; mso-bidi-font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">&lt;/</span><span style="font-family: Consolas; color: #a31515; font-size: 8pt; mso-bidi-font-size: 9.5pt;">service</span><span style="font-family: Consolas; color: blue; font-size: 8pt; mso-bidi-font-size: 9.5pt;">&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">The system.web should be like below&ndash; Select Windows:<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp; </span>&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">system.web</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">&gt;</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">compilation</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"> </span><span style="font-family: Consolas; color: red; font-size: 9.5pt;">debug</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">=</span><span style="font-family: Consolas; font-size: 9.5pt;">"<span style="color: blue;">true</span>"<span style="color: blue;"> </span><span style="color: red;">targetFramework</span><span style="color: blue;">=</span>"<span style="color: blue;">4.0</span>"<span style="color: blue;"> /&gt;</span><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span><span style="background: yellow; mso-highlight: yellow;">&lt;</span></span><span style="font-family: Consolas; background: yellow; color: #a31515; font-size: 9.5pt; mso-highlight: yellow;">authentication</span><span style="font-family: Consolas; background: yellow; color: blue; font-size: 9.5pt; mso-highlight: yellow;"> </span><span style="font-family: Consolas; background: yellow; color: red; font-size: 9.5pt; mso-highlight: yellow;">mode</span><span style="font-family: Consolas; background: yellow; color: blue; font-size: 9.5pt; mso-highlight: yellow;">=</span><span style="font-family: Consolas; background: yellow; font-size: 9.5pt; mso-highlight: yellow;">"<span style="color: blue;">Windows</span>"<span style="color: blue;">&gt;</span></span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"> </span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span>&lt;/</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">authentication</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">&gt;</span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; color: blue; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp; </span>&lt;/</span><span style="font-family: Consolas; color: #a31515; font-size: 9.5pt;">system.web</span><span style="font-family: Consolas; color: blue; font-size: 9.5pt;">&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoListParagraphCxSpFirst"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="font-size: small;">Now build\save and publish to your IIS location. I have intentionally not mentioned SL app yet.<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="font-size: small;">Once published and setup correctly in ISS Open your SL app in Visual Studio.<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="font-size: small;">If you had an existing service reference to this service <span style="background: yellow; mso-highlight: yellow;">delete</span> it. <o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri; font-size: small;">Now add a new Service Reference and point it at </span><a href="https://mymachinename/Myservice.svc"><span style="font-family: Calibri; color: #0000ff; font-size: small;">https://MyMachineName/Myservice.svc</span></a><span style="font-family: Calibri;"><span style="font-size: small;"> <o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="font-size: small;">Compile\Build the SL App<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="font-size: small;">Locate it in the ClientBin folder of your ASPX build location<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="font-size: small;">Copy it to your published ClientBin folder where IIS accesses it and replace the one that is there with this one.<o:p></o:p></span></span></p>
<p class="MsoListParagraphCxSpLast"><span style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font-size: small;">&middot;</span><span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: Calibri;">Run your service and you should be able to access user credentials by passing them to the SL app via InitParms(Not secure) in your aspx page hosting the SL app.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span><span style="color: blue;">&lt;</span><span style="color: maroon;">param</span> <span style="color: red;">name</span><span style="color: blue;">="initparams"</span> <span style="color: red;">value</span><span style="color: blue;">="UserAccount=</span><span style="background: yellow; mso-highlight: yellow;">&lt;%</span><span style="color: blue;">=</span>HttpContext.Current.User.Identity.Name<span style="background: yellow; mso-highlight: yellow;">%&gt;</span><span style="color: blue;">"</span> <span style="color: blue;">/&gt;<o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">In SL retrieve them by<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span> <span style="color: blue;">void</span> Application_Startup(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">StartupEventArgs</span> e)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>string UserID = e.InitParams[<span style="color: #a31515;">"UserAccount"</span>];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;">&nbsp;</span>}<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Or in WCF use the HttpContext to do as you require and limit windows access.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">You should have your SL app running and retrieving the user credentials you require.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Really hope this helps! <o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Thanks<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Calibri;">Keith<o:p></o:p></span></span></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>
<p class="MsoNormal"><o:p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></o:p></p>]]></content:encoded>
    </item>
    <item>
      <title>Silverlight cant communicate with WCF in certain config situations - solution</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/silverlight-cant-communicate-with-wcf-in-certain-config-situations-solution</link>
      <pubDate>Mon, 29 Nov 2010 14:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2010/11/29/silverlight-cant-communicate-with-wcf-in-certain-config-situations-solution/</guid>
      <description><![CDATA[Sample Error piece: Check InnerException for exception details.&nbsp;&nbsp; at...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;"><strong><span style="color: #ff0000;"><span style="font-size: large;">Sample Error piece: Check InnerException for exception details.&nbsp;&nbsp; at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()</span></span></strong><br /></span></span></span></p>
<p><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">This problem manifests for me in the following situation.</span></span></span></p>
<ul>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Silverlight App hosted in a ASPX site</span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">The Silverlight app is a data-consumer and requires data via a WCF service also hosted in the ASPX Page</span></span></span></li>
</ul>
<p><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Everything works fantastic when you run it via F5 in VS. Once published to IIS it stops communicating with WCF.</span></span></span></p>
<p><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;"><strong>Two problems cause this:</strong></span></span></span></p>
<ol>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">The Silverlight app is defaulting to the <a href="https://localhost:25775/servicename.svc">https://localhost:25775/servicename.svc</a> </span></span></span><ol>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Get rid of the port&nbsp;number as it thinks your trying to communicate across domain&nbsp;<a href="https://localhost:25775/servicename.svc">https://localhost/servicename.svc</a></span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Note this wont work via VS when you change it</span></span></span></li>
</ol></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">If you have that fixed but the silverlight app reverts to being unable to communicate with the WCF service again when called remotely you need to do the following(works for me&nbsp;anyway):</span></span></span><ol>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Publish the Website with all pieces, SIlverlight, WCF etc to your IIS publish&nbsp;location</span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Go back tot he Silverlight App and open your web reference to the service in VS</span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"></span></span><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Change it to point at the newly deployed web service location</span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Change LocalHost to your server name or what ever your setup is. ie <a href="https://localhost:25775/servicename.svc">https://MyServer/servicename.svc</a></span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Press OK in the configure service and build the silverlight app</span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Copy the newly compiled .xap file from the clientbin folder </span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Overwrite the deployed .xap file in the location where you published your service</span></span></span></li>
<li><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">Open up the silverlight app\Website &nbsp;from the published location</span></span></span></li>
</ol></li>
</ol>
<p><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;">This should now communicate fine under the <a href="https://localhost:25775/servicename.svc">https://MyServer/servicename.svc</a>&nbsp;but will not under <a href="https://localhost:25775/servicename.svc">https://localhost/servicename.svc</a> as it will look for the servername&nbsp;and not localhost</span></span></span>
<p><span style="color: #888888;"><span style="color: #ff0000;"><span style="color: #000000;"></span></span></span>&nbsp;Ideally it really should figure this&nbsp;out for&nbsp;itself in a perfect world ;-)</p>
<p>Really hope this helps! </p>
<p><span style="font-size: large;">The Actual errors</span></p>
<p><span style="color: #888888;"><span style="color: #ff0000;"><strong>Webpage error details</strong></span></span></p>
<p><span style="color: #888888;"><strong><span style="color: #ff0000;">User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729)<br />Timestamp: Mon, 29 Nov 2010 21:43:41 UTC</span></strong></span></p>
<p><br /><span style="color: #888888;"><strong><span style="color: #ff0000;">Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid.&nbsp; Check InnerException for exception details.&nbsp;&nbsp; at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()<br />&nbsp;&nbsp; at MyService.GetMyJobsCompletedEventArgs.get_Result()<br />&nbsp;&nbsp; at MyService.MainPage.t_GetMyJobsCompleted(Object sender, GetMyJobsCompletedEventArgs e)<br />&nbsp;&nbsp; at&nbsp; MyService.MyClient.OnGetMyJobsCompleted(Object state)<br /></span></strong></span></p>
<p><strong><span style="color: #ff0000;">An exception occurred during the operation, making the result invalid.&nbsp; Check InnerException for exception details.</span></strong></p>
<p>[ExceptionOccurred]<br />Arguments: <br />Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See <a href="https://go.microsoft.com/fwlink/?linkid=106663&amp;Version=4.0.50917.0&amp;File=System.dll&amp;Key=Async_ExceptionOccurred">https://go.microsoft.com/fwlink/?linkid=106663&amp;Version=4.0.50917.0&amp;File=System.dll&amp;Key=Async_ExceptionOccurred</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p>]]></content:encoded>
    </item>
    <item>
      <title>Installutil Windows Service - Not installing - Where is it? ;-) Service missing!</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/installutil-windows-service-not-installing-where-is-it-service-missing</link>
      <pubDate>Tue, 23 Nov 2010 10:17:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2010/11/23/installutil-windows-service-not-installing-where-is-it-service-missing/</guid>
      <description><![CDATA[Windows Service &ndash; Not installing .Net 4 VS2010&nbsp; - Where is it? ;-)
This is only relevant...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-size: small;"><span style="font-family: Calibri;"><strong>Windows Service &ndash; Not installing .Net 4 VS2010&nbsp; - Where is it? ;-)</strong></span></span></span></p>
<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-size: small;"><span style="font-family: Calibri;">This is only relevant if your service installs perfect but you can find it &ndash; Where is it? It should be identifiable in the services.msc but its not there??<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-size: small;"><span style="font-family: Calibri;">InstallUtil doesn&rsquo;t complain during install so whats the problem.. ??<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-size: small;"><span style="font-family: Calibri;">Simple &amp; obvious when you know why &ndash; in VS2010 when you add your serviceInstaller and your serviceProcessInstaller the <b style="mso-bidi-font-weight: normal;">parent </b>property doesn&rsquo;t get set automatically like in previous versions of VS.<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-size: small;"><span style="font-family: Calibri;">To Fix:<o:p></o:p></span></span></span></b></p>
<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-size: small;"><span style="font-family: Calibri;">Goto your ServiceInstaller and set the <b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;">Parent</i></b> property from <b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;">none</i></b> to your <b style="mso-bidi-font-weight: normal;"><i style="mso-bidi-font-style: normal;">ProjectInstaller</i></b></span></span></span></p>
<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-size: small;"><span style="font-family: Calibri;">OR IN THE CASE WHERE YOU HAVE RENAMED THE PROJECTINSTALLER CHANGE THE SETTIGN THERE!</span></span></span></p>
<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-family: Calibri;"><span style="font-size: small;">Should work like a gem ;-)</span></span></span></p>
<p class="MsoNormal"><span style="mso-ansi-language: EN-IE;" lang="EN-IE"><span style="font-family: Calibri;"><span style="font-size: small;">Keith<o:p></o:p></span></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>WCF - Error 500.21 Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list"</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/wcf-error-500-21-handler-svc-integrated-has-a-bad-module-managedpipelinehandler-in-its-module-list</link>
      <pubDate>Mon, 08 Nov 2010 04:21:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2010/11/08/wcf-error-500-21-handler-svc-integrated-has-a-bad-module-managedpipelinehandler-in-its-module-list/</guid>
      <description><![CDATA[WCF - Error 500.21 Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #ff0000;"><span style="font-size: x-large;">WCF - Error 500.21 Handler "svc-Integrated" has a bad module "ManagedPipelineHandler" in its module list"</span></span></p>
<p><span style="font-size: large;">If you&nbsp; see this error you havent installed the prerequistes for ASP.NET 4. </span></p>
<p><span style="font-size: large;"><b>Try this</b></span></p>
<ol>
<li><span style="font-size: large;">Open Visual Studio Command Prompt</span></li>
<li><span style="font-size: large;">Type the following:</span><span style="font-size: large;">&nbsp;</span><ol>
<li><i><span style="font-size: large;">aspnet_regiis.exe -i</span></i></li>
</ol></li>
<li><span style="font-size: large;">Run the command</span></li>
<li><span style="font-size: large;">Try your service again... <br /></span></li>
<li><span style="font-size: large;">Happy Face - it should be working :-)</span><i><span style="font-size: large;"><br /></span></i></li>
</ol>
<p><span style="font-size: large;"><br /></span></p>
<p><span style="font-size: large;">This basically installs the necessary ASP pieces to get your service up and working! </span></p>
<p><span style="font-size: large;">Enjoy..</span></p>
<p><span style="font-size: large;">Keith</span></p>
<p><span style="font-size: large;"><br /></span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>IIS 7 Change DefaultAppPool to Network Service for this error 'System.DirectoryServices.DirectoryServicesCOMException’</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/iis-7-change-defaultapppool-to-network-service-for-this-error-system-directoryservices-directoryservicescomexception</link>
      <pubDate>Tue, 13 Oct 2009 07:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2009/10/13/iis-7-change-defaultapppool-to-network-service-for-this-error-system-directoryservices-directoryservicescomexception/</guid>
      <description><![CDATA[You may need to do this when your running you web component WCF service or whatever and you receive...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><STRONG><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">You may need to do this when your running you web component WCF service or whatever and you receive unusual errors like</SPAN></STRONG><STRONG><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> ‘</SPAN></STRONG><B style="mso-bidi-font-weight: normal"><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: #c00000; FONT-SIZE: 10pt">System.DirectoryServices.DirectoryServicesCOMException</SPAN></B><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">’ when using directory services.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">This is due to the fact that by default IIS7 runs as ‘<B style="mso-bidi-font-weight: normal">IIS APPPOOL\\DefaultAppPool’</B> <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>and doesn’t have enough permission. Change to Network service and it should be fine!<STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'"><o:p></o:p></SPAN></STRONG></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Quite simple to do it, just in case your more used to IIS6 :-)<o:p></o:p></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></SPAN></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; mso-fareast-font-family: Tahoma"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Start-&gt;Run-&gt; Type <STRONG>'inetmgr'<o:p></o:p></STRONG></SPAN></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold; mso-fareast-font-family: Tahoma"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Expand the server name on the left connections panel&nbsp;and you will see<B style="mso-bidi-font-weight: normal"> </B><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">Application Pools<o:p></o:p></SPAN></STRONG></SPAN></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold; mso-fareast-font-family: Tahoma"><SPAN style="mso-list: Ignore">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></STRONG><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">Click <STRONG>‘DefaultAppPool’<o:p></o:p></STRONG></SPAN></STRONG></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold; mso-fareast-font-family: Tahoma"><SPAN style="mso-list: Ignore">4.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></STRONG><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">Click <STRONG>‘Advanced Settings’<o:p></o:p></STRONG></SPAN></STRONG></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold; mso-fareast-font-family: Tahoma"><SPAN style="mso-list: Ignore">5.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></STRONG><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">Goto <STRONG>‘Process Model’</STRONG> Section<o:p></o:p></SPAN></STRONG></P>
<P style="TEXT-INDENT: -18pt; MARGIN: 0cm 0cm 0pt 36pt; mso-list: l0 level1 lfo1"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold; mso-fareast-font-family: Tahoma"><SPAN style="mso-list: Ignore">6.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN></STRONG><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">Select '<STRONG>Identity'</STRONG><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>= '<STRONG>Network Service'<o:p></o:p></STRONG></SPAN></STRONG></P>
<P style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold"><o:p>&nbsp;</o:p></SPAN></STRONG></P>
<P style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">Hope that helps!<o:p></o:p></SPAN></STRONG></P>
<P style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold"><o:p>&nbsp;</o:p></SPAN></STRONG></P>
<P style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; FONT-WEIGHT: normal; mso-bidi-font-weight: bold">Keith<o:p></o:p></SPAN></STRONG></P>
<P><STRONG></STRONG>&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>HTTP could not register URL https://+ . Another application has already registered this URL with HTTP.SYS</title>
      <link>https://docs.microsoft.com/archive/blogs/keithmg/http-could-not-register-url-http-another-application-has-already-registered-this-url-with-http-sys</link>
      <pubDate>Mon, 10 Aug 2009 11:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Keithmg(MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/keithmg/2009/08/10/http-could-not-register-url-http-another-application-has-already-registered-this-url-with-http-sys/</guid>
      <description><![CDATA[Have you come across this issue HTTP could not register URL https://+ . Another application has...]]></description>
      <content:encoded><![CDATA[<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Have you come across this issue HTTP could not register URL https://+ . Another application has already registered this URL with HTTP.SYS<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">&nbsp;<SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"><IMG src="https://blogs.msdn.com/controlpanel/blogs/%22C:/Users/keithmg/Desktop/WCF%20problem.jpg%22" mce_src='/controlpanel/blogs/"C:\Users\keithmg\Desktop\WCF problem.jpg"'></SPAN><o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Are you self hosting a WCF library service inside a console or windows forms application? Then the most likely cause of this problem is that you have the library project contained within your same solution.<o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">The problem happens because the&nbsp;WCF Service Host running at the same time as your custom host application. You run or&nbsp;debug your app and when your&nbsp;host initialises the WCF stack, you will see an <STRONG><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: red">AddressAlreadyInUseException</SPAN></STRONG> as in the above pic.&nbsp; This is happening because the WCF Service Host in Visual studio is already listening on the same address... <o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Basically remove the wcf lib from the solution and reference it. When you run the host you should now be able to open it. <o:p></o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: #0070c0; FONT-SIZE: 10pt">ServiceHost host = new ServiceHost(typeof(ClientHost));<o:p></o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: #0070c0; FONT-SIZE: 10pt">Host.Open();<o:p></o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; COLOR: #0070c0; FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">Now there should be no error</SPAN><SPAN style="FONT-FAMILY: Wingdings; FONT-SIZE: 10pt; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">J</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">!<o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN" lang=EN>Rick Rainey's <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>suggested a fix to the config file which doesn’t work for me, but may for somebody else which prevents removing it from the project. <A href="https://blogs.msdn.com/rickrain/archive/2008/02/14/Preventing-the-WCF-Service-Host-from-launching-in-Visual-Studio-2008.aspx">https://blogs.msdn.com/rickrain/archive/2008/02/14/Preventing-the-WCF-Service-Host-from-launching-in-Visual-Studio-2008.aspx</A> <o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN" lang=EN>I have not seen if this bug exists in 2010 yet.. I will update when I check it.. <o:p></o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt; mso-ansi-language: EN" lang=EN><o:p>&nbsp;</o:p></SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 10pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
  </channel>
</rss>