<?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>Laurie Atkinson</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/laurieatkinson/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/feed.xml</link>
    <description>Shining my light on the world of ASP.NET, JavaScript, AngularJS, and SharePoint.</description>
    <lastBuildDate>Sat, 01 Oct 2016 17:28:06 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Build a Reusable View Component in ASP.NET Core</title>
      <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/build-a-reusable-view-component-in-asp-net-core</link>
      <pubDate>Sat, 01 Oct 2016 17:25:26 GMT</pubDate>
      <dc:creator><![CDATA[Laurie Atkinson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/laurieatkinson/?p=145</guid>
      <description><![CDATA[View Components have been added to ASP.NET MVC to replace functionality previously accomplished...]]></description>
      <content:encoded><![CDATA[View Components have been added to ASP.NET MVC to replace functionality previously accomplished using partial views. It is possible to include reusable components in their own class library and consume them in multiple MVC projects.

This post walks through the steps required to create a dynamic navigation menu that is then inserted into an MVC page.
<h3>Create the View Component</h3>
1. Create a Class Library (.NET Core) project in Visual Studio 2015 named ComponentLibrary

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture.jpg" alt="Class Library Project" class="alignnone size-full wp-image-155" width="472" height="49" /></a>

2. Modify the project.json to include MVC and Razor and indicate to embed the Views in the resulting DLL.

<img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture3.jpg" alt="project.json" class="size-full wp-image-185" width="570" height="483" />

3. Add a Models folder and add 2 classes to represent a model for the navigation links.

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture1.jpg" alt="NavBarItemViewModel" class="alignnone size-full wp-image-165" width="545" height="333" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture2.jpg" alt="NavBarViewModel" class="alignnone size-full wp-image-175" width="636" height="279" /></a>

4. Add a Components folder and add the NavBarComponent view component class. In a real application these menu items would be constructed using your business rules and/or database information. And the await would be necessary when retrieving the necessary data asynchronously. Task.Run() is just for demo purposes to mimic an async process.

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture4.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture4.jpg" alt="NavBarViewComponent" class="alignnone size-full wp-image-195" width="781" height="385" /></a>

5. Add the view for this component in Views &gt; Shared &gt; Components &gt; NavBarComponent &gt; Default.cshtml

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture5.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture5.jpg" alt="NavBar View" class="alignnone size-full wp-image-205" width="572" height="238" /></a>

6. The project should now look like this:

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture6.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture6.jpg" alt="VIewComponent project structure" class="size-full wp-image-206" width="258" height="271" /></a>
<h3>Use the View Component in a separate MVC project</h3>
1. Create an ASP.NET Core Web Application (.NET Core) project in Visual Studio 2015.

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture7.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture7.jpg" alt="MVC project" class="size-full wp-image-215" width="451" height="38" /></a>

2. Add a reference to the ComponentLibrary project.

3. Add the NavBar component to your view.

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture8.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture8.jpg" alt="Capture" class="alignnone size-full wp-image-225" width="646" height="34" /></a>

4. Configure Razor to look for views as embedded resources in our ComponentLibrary DLL.

<a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture9.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture9.jpg" alt="ConfigureServices" class="alignnone size-full wp-image-226" width="760" height="321" /></a>
<h4><a href="https://msdnshared.blob.core.windows.net/media/2016/10/Capture11.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/10/Capture11.jpg" alt="Demo App" class="alignnone size-full wp-image-245" width="612" height="208" /></a></h4>
<h4>Error you may encounter</h4>
<div class="titleerror">InvalidOperationException: The view 'Components/NavBarComponent/Default' was not found.</div>
<div class="titleerror"></div>
<div class="titleerror">SOLUTION:</div>
<ul>
 	<li class="titleerror">Make sure the project.json of the Class Library project indicates to embed the views into the DLL using this code:</li>
</ul>
<code class="titleerror">  "buildOptions": {
"embed": "Views/**/*.cshtml"
}</code>
<ul>
 	<li class="titleerror">Add necessary code to ConfigureServices() provided in step 4.</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Using Data-binding with Angular 2 to disable a button</title>
      <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/using-data-binding-with-angular-2-to-disable-a-button</link>
      <pubDate>Mon, 12 Sep 2016 00:03:48 GMT</pubDate>
      <dc:creator><![CDATA[Laurie Atkinson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/laurieatkinson/?p=115</guid>
      <description><![CDATA[I received a question from a customer new to AngularJS asking for the right way to disable a...]]></description>
      <content:encoded><![CDATA[<div class="post">
<div class="body">
<div id="c9087d1b-da5d-493d-98b7-1b8781398856" class="postBody" style="margin: 4px 0px 0px;border-width: 0px;padding: 0px">

I received a question from a customer new to AngularJS asking for the right way to disable a button until at least one checkbox was checked. The customer’s first thought was to recognize an event on the checkbox and react to it, but this is not necessary with the data-binding feature of Angular.

You can use 2-way data-binding on the checkbox to a Boolean property on the component. So, as soon as the user modifies the checkbox, the change is reflected in the component. Also, use 1-way data-binding on the disabled property of the button to a method on the component that returns the condition you want to test. In this case the method returns true if any items have been selected.
<div class="post">
<div class="body">
<div id="c9087d1b-da5d-493d-98b7-1b8781398856" class="postBody" style="margin: 4px 0px 0px;border-width: 0px;padding: 0px">
<h3>Component Template</h3>
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/html.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/09/html.png" alt="&lt;table class=&quot;table&quot;&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Select&lt;/th&gt; &lt;th&gt;Name&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr *ngFor=&quot;let item of items&quot;&gt; &lt;td&gt;&lt;input type=&quot;checkbox&quot; [(ngModel)]=&quot;item.chosen&quot;&gt;&lt;/td&gt; &lt;td&gt;{{item.name}}&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;button [disabled]=&quot;noneSelected()&quot;&gt;OK&lt;/button&gt;" width="730" height="342" class="alignnone wp-image-125 size-full" /></a>
<div class="post">
<div class="body">
<div id="c9087d1b-da5d-493d-98b7-1b8781398856" class="postBody" style="margin: 4px 0px 0px;border-width: 0px;padding: 0px">
<h3>Component Class</h3>
<a href="https://msdnshared.blob.core.windows.net/media/2016/09/class.png"><img src="https://msdnshared.blob.core.windows.net/media/2016/09/class.png" alt="import {Component} from '@angular/core' @Component({ selector: 'my-test', templateUrl: 'app/home/test.component.html' }) export class TestComponent { items = [ { name: 'Fred', chosen: false }, { name: 'Barney', chosen: false }, { name: 'Dino', chosen: false } ]; noneSelected() { return !this.items.some(item =&gt; item.chosen); } }" width="568" height="392" class="alignnone wp-image-135 size-full" /></a>

</div>
</div>
</div>
<div class="post">
<div class="body">
<div class="post">
<div class="body">
<div id="c9087d1b-da5d-493d-98b7-1b8781398856" class="postBody" style="margin: 4px 0px 0px;border-width: 0px;padding: 0px">

Note: This code has been tested with RC6 of Angular 2.

</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>File order matters with TypeScript inheritance</title>
      <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/file-order-matters-with-typescript-inheritance</link>
      <pubDate>Wed, 27 Apr 2016 21:18:36 GMT</pubDate>
      <dc:creator><![CDATA[Laurie Atkinson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/laurieatkinson/?p=75</guid>
      <description><![CDATA[If you receive the following JavaScript error and your code contains a TypeScript class derived from...]]></description>
      <content:encoded><![CDATA[If you receive the following JavaScript error and your code contains a TypeScript class derived from another class, it is likely that your parent class has not been defined prior to the definition of your child class.
<h4><span style="color: #000080">Unable to get property ‘prototype’ of undefined or null reference</span></h4>
<a href="https://msdnshared.blob.core.windows.net/media/2016/04/image1102.png"><img class="alignnone size-full wp-image-85" src="https://msdnshared.blob.core.windows.net/media/2016/04/image1102.png" alt="image1" width="340" height="233" /></a>

To see the actual error, you will need to view the generated JavaScript file, which may look like this:

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/image2100.png"><img class="alignnone size-full wp-image-95" src="https://msdnshared.blob.core.windows.net/media/2016/04/image2100.png" alt="image2" width="726" height="117" /></a>
<blockquote><span style="font-family: Consolas">var __extends = (this &amp;&amp; this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};</span></blockquote>
The cause of this problem is that TypeScript requires the parent class to appear before the child class. If the classes have been defined in separate files, then the scripts must be loaded onto the page in the correct order.

In my case I am using the ASP.NET MVC bundler which loads files alphabetically. So one solution could be to name my file appropriately, however I decided instead to specifically list the files in the correct order within the bundle. For example:

<a href="https://msdnshared.blob.core.windows.net/media/2016/04/image3107.png"><img class="alignnone  wp-image-105" src="https://msdnshared.blob.core.windows.net/media/2016/04/image3107.png" alt="image3" width="743" height="233" /></a>]]></content:encoded>
    </item>
    <item>
      <title>Implementing a Save Warning in an Angular SPA</title>
      <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/implementing-a-save-warning-in-an-angular-spa</link>
      <pubDate>Sat, 23 Aug 2014 22:21:44 GMT</pubDate>
      <dc:creator><![CDATA[Laurie Atkinson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/laurieatkinson/2014/08/23/implementing-a-save-warning-in-an-angular-spa/</guid>
      <description><![CDATA[I have an Single Page Application written in AngularJS and need to provide a warning to the user if...]]></description>
      <content:encoded><![CDATA[<p>I have an Single Page Application written in AngularJS and need to provide a warning to the user if he or she attempts to close a window without saving. Since Angular automatically updates the DOM with a dirty flag this should not be a difficult feature to implement. However, it becomes more difficult when the user is able to open multiple tabs, edit different items, and still receive a warning even if the unsaved changes are in a tab not currently open.</p>  <h3>The sample application</h3>  <p>The user can select or search for a name and the grid is replaced by an edit view.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0882.image_05F8F0E5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0882.image_5F00_05F8F0E5.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0728.image_thumb_5A4826E8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0728.image_5F00_thumb_5F00_5A4826E8.png" width="562" height="270" /></a> </p>  <h3>The application after opening multiple tabs</h3>  <p>The user can continue to open additional persons and a link is created in the left-nav for that person so that the user can navigate between people. Modifications are only saved in the local Angular model and not committed to the server until the user clicks Save for a particular person.</p>  <p>Each name in the left-nav is a link to another person that is in the process of being editing and may or may not have been saved.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/7268.image_5565732C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/7268.image_5F00_5565732C.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2084.image_thumb_50EEF265.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2084.image_5F00_thumb_5F00_50EEF265.png" width="561" height="561" /></a></p>  <h3>Expected behavior if the user clicks the close button or attempts to close the browser window</h3>  <p>(1) User clicks the Close button while editing a person which contains unsaved changes.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0434.image_3786EF2B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0434.image_5F00_3786EF2B.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8272.image_thumb_33106E64.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8272.image_5F00_thumb_5F00_33106E64.png" width="561" height="291" /></a> </p>  <p>(2) User attempts to close the browser while editing a person which contains unsaved changes.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0880.image_6DF7A12D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0880.image_5F00_6DF7A12D.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8625.image_thumb_1B78C0F1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8625.image_5F00_thumb_5F00_1B78C0F1.png" width="562" height="286" /></a> </p>  <p>(3) User attempts to close the browser while editing a person which contains NO unsaved changes, but there are unsaved changes on a different tab that is not open.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8231.image_1702402A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8231.image_5F00_1702402A.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6661.image_thumb_44835FED.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6661.image_5F00_thumb_5F00_44835FED.png" width="559" height="282" /></a> </p>  <h3>Save and restore the dirty flag from and to the DOM</h3>  <p>Since we need to read and write a value in the DOM, this means we need to use a directive. I'm using TypeScript, so you might have to squint a bit to see the underlying JavaScript.</p>  <p><strong>The view</strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0317.image_400CDF26.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0317.image_5F00_400CDF26.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2772.image_thumb_66DAF566.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2772.image_5F00_thumb_5F00_66DAF566.png" width="359" height="44" /></a> </p>  <p><strong>DirtyFlag directive</strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2311.image_3FA0AC31.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2311.image_5F00_3FA0AC31.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4073.image_thumb_7AF411EF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4073.image_5F00_thumb_5F00_7AF411EF.png" width="562" height="532" /></a> </p>  <p><strong>The important lines of code:</strong></p>  <p><strong><font color="#008080">26-30:</font></strong> When the user navigates away from this view, check the value of the $dirty flag on this form. If it is dirty (indicating unsaved changes), then store the id of the current person as dirty using a service named personManger.</p>  <p><font color="#008080"><strong>23-24:</strong></font> When the directive is first invoked, check if the stored dirty value is true and if so set the $dirty flag on the form.</p>  <h3>Related code:</h3>  <p><strong>personManger Service</strong></p>  <p>Method to save the dirty flag in the model.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4786.image_5662846B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4786.image_5F00_5662846B.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0677.image_thumb_76115E33.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0677.image_5F00_thumb_5F00_76115E33.png" width="455" height="185" /></a> </p>  <p><strong>personCtl Controller</strong></p>  <p>When the user saves a person, make sure to reset the dirty value saved in the model as well as the $dirty flag on the form.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4403.image_719ADD6C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4403.image_5F00_719ADD6C.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4010.image_thumb_712EAA77.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4010.image_5F00_thumb_5F00_712EAA77.png" width="561" height="130" /></a> </p>  <h3>Create a directive that warns the user to save</h3>  <p>We are interacting with the UI, so this means we need another directive.</p>  <p><strong>The view</strong></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5811.image_05B3F9F6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5811.image_5F00_05B3F9F6.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4338.image_thumb_333519B9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4338.image_5F00_thumb_5F00_333519B9.png" width="539" height="39" /></a> </p>  <p><strong>Confirm On Close Directive</strong></p>  <p>This directive uses the modal dialog from <a href="https://angular-ui.github.io/bootstrap/">AngularUI</a>. </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5758.image_7CC6F867.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5758.image_5F00_7CC6F867.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6443.image_thumb_50A9FB76.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6443.image_5F00_thumb_5F00_50A9FB76.png" width="558" height="928" /></a> </p>  <h3>Related code:</h3>  <p><strong>personManger Service</strong></p>  <p>Method which returns whether or not there are any unsaved changes.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5488.image_00D3D6EB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5488.image_5F00_00D3D6EB.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/1072.image_thumb_59998DB5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/1072.image_5F00_thumb_5F00_59998DB5.png" width="459" height="188" /></a></p>  <p>And with that your application should present the expected warning dialogs when attempting to close without saving changes.</p>]]></content:encoded>
    </item>
    <item>
      <title>Rules for the list name used with ListData.svc</title>
      <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/rules-for-the-list-name-used-with-listdata-svc</link>
      <pubDate>Thu, 19 Jun 2014 17:46:34 GMT</pubDate>
      <dc:creator><![CDATA[Laurie Atkinson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/laurieatkinson/2014/06/19/rules-for-the-list-name-used-with-listdata-svc/</guid>
      <description><![CDATA[The ListData.svc web service introduced with SharePoint 2010 offers a great option for querying a...]]></description>
      <content:encoded><![CDATA[<p>The ListData.svc web service introduced with SharePoint 2010 offers a great option for querying a list to be consumed by JavaScript. The syntax is:</p>  <pre><a href="https://&lt;sharepoint-server&gt;/_vti_bin/ListData.svc/&lt;list-name">https://&lt;sharepoint-server&gt;/_vti_bin/ListData.svc/&lt;list-name</a>&gt;</pre>

<p>Determining the correct list name may not be obvious and there are a number of rules of which you should be aware. To illustrate we will use an example list named <em><strong>today’s quote.</strong></em></p>

<h4>Use the display name (not the internal name).</h4>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6866.image_60E99282.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6866.image_5F00_60E99282.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0647.image_thumb_151DBBC9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0647.image_5F00_thumb_5F00_151DBBC9.png" width="449" height="100" /></a> </p>

<h4>Check your spelling – list name is case sensitive.</h4>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/1423.image_63798A7D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/1423.image_5F00_63798A7D.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5732.image_thumb_77FED9FB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5732.image_5F00_thumb_5F00_77FED9FB.png" width="473" height="29" /></a> </p>

<h4>Well almost… The first letter of each word is always capitalized.</h4>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6153.image_6549E044.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6153.image_5F00_6549E044.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4186.image_thumb_32E60CC5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4186.image_5F00_thumb_5F00_32E60CC5.png" width="505" height="31" /></a> </p>

<h4>Make sure to remove all spaces.</h4>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6574.image_630FE839.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6574.image_5F00_630FE839.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4530.image_thumb_109107FD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4530.image_5F00_thumb_5F00_109107FD.png" width="537" height="32" /></a> </p>

<h4>Apostrophes are removed and the character following the apostrophe is capitalized.</h4>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8255.image_5DC10188.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8255.image_5F00_5DC10188.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6521.image_thumb_72465106.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6521.image_5F00_thumb_5F00_72465106.png" width="577" height="35" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Using OAuth in an App for Office</title>
      <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/using-oauth-in-an-app-for-office</link>
      <pubDate>Tue, 03 Jun 2014 01:28:46 GMT</pubDate>
      <dc:creator><![CDATA[Laurie Atkinson]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/laurieatkinson/2014/06/03/using-oauth-in-an-app-for-office/</guid>
      <description><![CDATA[I will walk through the steps to combine an ASP.NET MVC5 application with an App for Office to allow...]]></description>
      <content:encoded><![CDATA[<p>I will walk through the steps to combine an ASP.NET MVC5 application with an App for Office to allow the app to authenticate using a Microsoft Account or using Facebook. Similar steps could also be followed to authenticate using Google.</p>  <h4>Step 1 (Create an App for Office)</h4>  <p> Using Visual Studio 2013 or Visual Studio 2012 with MVC5, create a new App for Office application.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/3678.image_284A64AF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/3678.image_5F00_284A64AF.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/7713.image_thumb_5C7E8DF5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/7713.image_5F00_thumb_5F00_5C7E8DF5.png" width="532" height="306" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/3443.image5_77B6E6F6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/3443.image5_5F00_77B6E6F6.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/3554.image5_thumb_67AAA8F0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/3554.image5_5F00_thumb_5F00_67AAA8F0.png" width="389" height="330" /></a> </p>  <p>Note that the web application project which is automatically created and added to the solution includes an html page and the default Source Location of the app is that html page. We will change this later to reference our ASP.NET MVC5 web application instead.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5127.image_7BC3C579.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5127.image_5F00_7BC3C579.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/1263.image_thumb_12F1D0A9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/1263.image_5F00_thumb_5F00_12F1D0A9.png" width="511" height="399" /></a> </p>  <h4>Step 2 (Create an ASP.NET MVC5 Application)</h4>  <p>Add a new ASP.NET MVC project to the solution and click the button to Change Authentication.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8540.image15_4D6CD07D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8540.image15_5F00_4D6CD07D.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/3872.image15_thumb_5D0F6C3F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/3872.image15_5F00_thumb_5F00_5D0F6C3F.png" width="517" height="291" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8015.image20_3F30E83E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8015.image20_5F00_3F30E83E.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8182.image20_thumb_2871A0B5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8182.image20_5F00_thumb_5F00_2871A0B5.png" width="518" height="366" /></a> </p>  <p>By default authentication is set to No Authentication, so change that to Individual Accounts.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/3817.image25_07EA6103.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/3817.image25_5F00_07EA6103.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/1682.image25_thumb_0373E03C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/1682.image25_5F00_thumb_5F00_0373E03C.png" width="422" height="256" /></a> </p>  <h4>Step 3 (Copy CSS and JavaScript assets to your MVC project)</h4>  <p>Copy the css files from the App and App\Home folders and paste into the Content folder of your MVC project.</p>  <p>Copy the js files from the App and App\Home folders and paste into a folder within the Scripts folder of your MVC project.</p>  <p>Copy the stylesheet references from the auto-generated Home.html into _Layout.cshtml in your MVC project.</p>  <p>Copy the script references from Home.html into either _Layout.cshtml or the scripts section of Index.cshtml.</p>  <h4>Step 4 (Remove the HTML Web project)</h4>  <p>Delete the auto-generated Web project from your solution.</p>  <h4>Step 5 (Configure authentication and register with each provider)</h4>  <p>You will edit Startup.Auth.cs with the login providers you wish to support. The class that is created for you by MVC contains commented out code that can be filled in to automatically add support for each provider.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/3660.image_0C63727B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/3660.image_5F00_0C63727B.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5355.image_thumb_23254AB5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5355.image_5F00_thumb_5F00_23254AB5.png" width="553" height="320" /></a></p>  <p>This code makes use of OWIN middleware and requires a reference to each of the providers you plan to use.</p>  <blockquote>   <p><strong><font color="#0000ff">using</font></strong> Microsoft.Owin.Security.Facebook;       <br /><strong><font color="#0000ff">using</font></strong> Microsoft.Owin.Security.Google;       <br /><strong><font color="#0000ff">using</font></strong> Microsoft.Owin.Security.MicrosoftAccount;       <br /><strong><font color="#0000ff">using</font></strong> Microsoft.Owin.Security.Twitter;</p> </blockquote>  <p>In order to obtain the properties that this authentication code needs, you must first register your app with each of the authentication service providers. And this requires that you create a developer account for each one.</p>  <p><strong><em><font size="3">MICROSOFT ACCOUNT:</font></em></strong></p>  <p><a title="https://account.live.com/developers/applications" href="https://account.live.com/developers/applications">https://account.live.com/developers/applications</a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/1651.image_777480B8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/1651.image_5F00_777480B8.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0576.image_thumb_10041E09.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0576.image_5F00_thumb_5F00_10041E09.png" width="525" height="342" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/7444.image_006412F8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/7444.image_5F00_006412F8.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2664.image_thumb_2DE532BB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2664.image_5F00_thumb_5F00_2DE532BB.png" width="542" height="419" /></a> </p>  <p>The Client ID and Client Secret will be listed under App Settings and should be copied and pasted into Startup.Auth.cs</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5228.image54_5B66527E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5228.image54_5F00_5B66527E.png"><img title="image" style="border: 0px currentcolor; display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0458.image54_thumb_08E77242.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0458.image54_5F00_thumb_5F00_08E77242.png" width="546" height="316" /></a> </p>  <p><strong><font size="3">Startup.Auth.cs</font></strong></p>  <p>Uncomment the Microsoft Account section and enter the ClientId and ClientSecret. If your app requires access to particular properties (such as the email address in this code example), that field may be requested.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8484.image_36689205.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8484.image_5F00_36689205.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/7220.image_thumb_3D1B9B88.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/7220.image_5F00_thumb_5F00_3D1B9B88.png" width="483" height="179" /></a></p>  <h5><font size="4"><strong><em>FACEBOOK:</em></strong></font></h5>  <p><a title="https://developers.facebook.com" href="https://developers.facebook.com">https://developers.facebook.com</a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/7725.image_188A0E04.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/7725.image_5F00_188A0E04.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/7331.image_thumb_2D0F5D82.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/7331.image_5F00_thumb_5F00_2D0F5D82.png" width="551" height="142" /></a> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6281.image_2CA32A8D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6281.image_5F00_2CA32A8D.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2500.image_thumb_63800F84.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2500.image_5F00_thumb_5F00_63800F84.png" width="552" height="375" /></a> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5557.image_50CB15CD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5557.image_5F00_50CB15CD.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4578.image_thumb_7322AB46.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4578.image_5F00_thumb_5F00_7322AB46.png" width="554" height="401" /></a> </p>  <p><strong><font size="3">Startup.Auth.cs</font></strong></p>  <p>Uncomment the Facebook Authentication section and enter the AppId and AppSecret. Again, this example shows the syntax to request the email address.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/1460.image_678CEE07.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/1460.image_5F00_678CEE07.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/0285.image_thumb_7C123D85.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/0285.image_5F00_thumb_5F00_7C123D85.png" width="528" height="187" /></a> </p>  <p><strong><font size="3">AccountController.cs</font></strong></p>  <p>If your authentication code requests additional properties such as the email address, modify ExternalLoginCallback() to retrieve the claim attached to the identity. </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4034.image_7BA60A90.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4034.image_5F00_7BA60A90.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/8540.image_thumb_70104D51.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/8540.image_5F00_thumb_5F00_70104D51.png" width="578" height="254" /></a> </p>  <h4>Step 6 (Update the App manifest file)</h4>  <p><strong><font size="3">YourAppForOffice.xml</font></strong></p>  <p>The Source location should contain the url for the root of your MVC web application.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5428.image_647A9012.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5428.image_5F00_647A9012.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/4454.image_thumb_6B2D9995.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/4454.image_5F00_thumb_5F00_6B2D9995.png" width="529" height="43" /></a> </p>  <p>In addition you need to include the domains that provide the authentication in the app manifest.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5852.image_71E0A318.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5852.image_5F00_71E0A318.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2350.image_thumb_28BD8810.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2350.image_5F00_thumb_5F00_28BD8810.png" width="531" height="305" /></a> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2843.image_3CD6A499.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2843.image_5F00_3CD6A499.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2262.image_thumb_4389AE1C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2262.image_5F00_thumb_5F00_4389AE1C.png" width="500" height="146" /></a></p>  <h4>Step 7 (Enable SSL)</h4>  <p>Before testing your app you will need to make sure your web project has the SSL Enabled property set to True.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/3364.image_0CAF59D6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/3364.image_5F00_0CAF59D6.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/2100.image_thumb_0838D90F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/2100.image_5F00_thumb_5F00_0838D90F.png" width="260" height="182" /></a> </p>  <p>And your App for Office will not be satisfied with a self-signed certificate.</p>  <p>This problem is quickly solved by deploying your web app to Microsoft Azure. If you are using the *.azurewebsites.net domain assigned to your web site by Azure then your site is already secured by a certificate provided by Microsoft. You may access your free ASP.NET web sites <a href="https://account.windowsazure.com/signup?offer=Azure_MSDN">through MSDN</a> or <a href="https://azure.microsoft.com/en-us/develop/net/aspnet/">here</a> for those without an MSDN subscription.</p>  <p>The Source location in the app manifest should now be updated to contain the url of your Azure web site.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/6837.image_07CCA61A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/6837.image_5F00_07CCA61A.png"><img title="image" style="display: inline;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/66/metablogapi/5466.image_thumb_1532B920.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-66-metablogapi/5466.image_5F00_thumb_5F00_1532B920.png" width="575" height="423" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>About Me</title>
      <link>https://docs.microsoft.com/archive/blogs/laurieatkinson/about-me</link>
      <pubDate>Tue, 14 Jan 2014 15:02:49 GMT</pubDate>
      <dc:creator><![CDATA[laurieatkinson@gmail.com]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/laurieatkinson/2014/01/14/about-me/</guid>
      <description><![CDATA[I am a consultant in the Premier Developer Practice at Microsoft where I guide customers in the...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: medium;">I am a consultant in the Premier Developer Practice at Microsoft where I guide customers in the architecture, design and implementation of software solutions. My areas of expertise are in .NET, HTML5, JavaScript, SharePoint, and Office. My support is through hands-on workshops, remote webcasts, proof of concept work, and side-by-side assistance as developers migrate to new platforms.</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>