<?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>Danimal521</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/danimal521/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/danimal521/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:18:57 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Angular 4 MVC in ECMA 5 JavaScript</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/angular-4-mvc-in-ecma-5-javascript</link>
      <pubDate>Tue, 09 May 2017 15:06:30 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/?p=175</guid>
      <description><![CDATA[I recently made a demo of Angular 4 with ECMA5 JavaScript as there are not too many examples (read...]]></description>
      <content:encoded><![CDATA[I recently made a demo of Angular 4 with ECMA5 JavaScript as there are not too many examples (read NONE). Yes, there is value in using plain JavaScript and Angular. In my case my clients wanted the power and value of Angular but did not want to use Typescript and everything else in the modern app stack. I am not going to walk through the code, it is self-explanatory. It is a minimal project with a get and post of data in a MVC model. It includes the basic Angular file you need etc. Enjoy!

https://github.com/danimal521/AngularJava

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Angular 2 with MVC.Net in simple JavaScript (no NPM. Node.JS, Typescript or magic libraries) walkthrough!</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/angular-2-with-mvc-net-in-simple-javascript-no-npm-node-js-typescript-or-magic-libraries-walkthrough</link>
      <pubDate>Wed, 18 Jan 2017 17:30:27 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/?p=117</guid>
      <description><![CDATA[I could go on and on about the modern apps landscape. It has become pretty complex out there, what...]]></description>
      <content:encoded><![CDATA[<span style="color: #000000;font-family: Calibri">I could go on and on about the modern apps landscape. It has become pretty complex out there, what editor, what package, Node.JS? NPM?</span>

<span style="color: #000000;font-family: Calibri">What is difficult for my clients is how these tools fit with Visual Studio and how to leverage the best tools for their projects. I will not go deep into that in this blog, but I do want people to get a quick start with AngularJS2. AJS1 was great, really easy to start and rapid development. AJS2 adds some really cool time saving things, but where to start? Most demos out there, do not really take into consideration how we use Visual Studio to publish templated applications like HighTrust apps, or MVC. So I have included a sample out-of-the-box MVC project with AJS2. You can download it and get going. I will do a quick walkthrough below.</span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/129.png"><img width="300" height="177" class="alignnone size-medium wp-image-135" alt="1" src="https://msdnshared.blob.core.windows.net/media/2017/01/129-300x177.png" /></a>

<span style="color: #000000;font-family: Calibri">I think the biggest issue in all the demos out there, are they are for none-templated apps, like a simple html app. They also throw in several extra libs and tools like Typescript. These are all great things but I feel it hinders the learning experience. Once again, AJS1 was quick to load and learn.</span>

<span style="color: #000000;font-family: Calibri">The first thing I want to mention is ECMAScript. Many of you know what this is, but if you don’t, this is something to think about when using these modern tools. ReactJS has a similar issue. Most modern languages can run in several modes, ECMAScript 5 is the JavaScript (non-compiled) that you have been working with forever. 2015/6 and beyond will be compiled. Not all browsers support it and its hard to find AJS2 demos that specifically do not reference it. The attached demo is in 5/simple JS.</span>

<span style="color: #000000;font-family: Calibri">A great feature of AJS2 is templates and reusable components. </span><span><span style="color: #000000;font-family: Calibri"> </span></span><span style="color: #000000;font-family: Calibri">I have tried to keep this article simple, but broke it down how you would in a real project:</span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/01/216.png"><img width="261" height="122" class="alignnone size-full wp-image-125" alt="2" src="https://msdnshared.blob.core.windows.net/media/2017/01/216.png" /></a><span style="color: #000000;font-family: Calibri"> </span>

<span style="color: #000000;font-family: Calibri">Here you have a module that references a component, and a component that references a html template. The main is the main app. (simple nuff).</span>

<span style="color: #000000;font-family: Calibri">In AJS2 you pick the dependencies you want to load, this helps in the bloat. I have added the very basic ones you need to get started to make a real app:</span>

<span><span style="color: #000000;font-family: Times New Roman"><a href="https://msdnshared.blob.core.windows.net/media/2017/01/313.png"><img width="232" height="414" class="alignnone wp-image-126" alt="3" src="https://msdnshared.blob.core.windows.net/media/2017/01/313-168x300.png" /></a></span></span><span style="color: #000000;font-family: Calibri"> </span><span style="color: #000000;font-family: Calibri"> </span>

<span style="color: #000000;font-family: Calibri">Most of these are out-of-the-box MVC libs. The first few are the basic libs for AJS2, the platform-browser’s are how AJS2 knows how to render for ECMAScript5. Ultimately if you want to render for 2015/6 or 7 you simpley change the “platform” pretty cool but too much for this article. </span>

<span style="color: #000000;font-family: Calibri">So at this point, download the app and try it out. If you have used AJS1, this should get you going. You can add all that other Modern Apps stuff later, get the basics first.</span>

<span style="color: #000000;font-family: Calibri">Side Note: I wanted to point out that to make this project, I simply created a new MVC.Net app, and followed these steps but modified them to work with Visual Studio and a MVC.Net app: https://angular.io/docs/js/latest/quickstart.html </span>

<strong><span style="color: #000000;font-family: Calibri">Sample AJS2 MVC.Net Project: </span></strong><span style="color: #000000;font-family: Calibri"><a href="https://msdnshared.blob.core.windows.net/media/2017/01/AJS2.zip">ajs2</a></span>]]></content:encoded>
    </item>
    <item>
      <title>How to get the high-trust/PHA issuer ID from central admin</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/how-to-get-the-high-trustpha-issuer-id-from-central-admin</link>
      <pubDate>Tue, 16 Feb 2016 11:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2016/02/16/how-to-get-the-high-trustpha-issuer-id-from-central-admin/</guid>
      <description><![CDATA[Sometimes you need to get the IssuerID from CA AFTER it was configured and the admin&rsquo;s lose...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri; font-size: small;">Sometimes you need to get the IssuerID from CA AFTER it was configured and the admin&rsquo;s lose the ID. </span></p>
<p><span style="font-family: Calibri; font-size: small;">1)</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family: Calibri; font-size: small;">Run Get-SPTrustedSecurityTokenIssuer</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/4505.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/4505.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/4505.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/250x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/4505.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">2)</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family: Calibri; font-size: small;">Make sure you are looking at the correct name (red arrow)</span></p>
<p><span style="font-family: Calibri; font-size: small;">3)</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family: Calibri; font-size: small;">The IssuerID is the first part of the name (before the @ symbol)</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/8171.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/8171.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/8171.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/8171.2.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Emic 2 Text-to-Speech with Windows 10 IoT</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/emic-2-text-to-speech-with-windows-10-iot</link>
      <pubDate>Wed, 06 Jan 2016 13:41:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2016/01/06/emic-2-text-to-speech-with-windows-10-iot/</guid>
      <description><![CDATA[What&rsquo;s a robot that cannot talk?! Actually text-to-speech is very useful for almost any...]]></description>
      <content:encoded><![CDATA[<p>What&rsquo;s a robot that cannot talk?! Actually text-to-speech is very useful for almost any project. The Parallax Emic 2 is a great device that can give your project speech! This post is based on the 10.0.10586 IoT build, please make sure you are on that build or greater.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/5773.ver.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/5773.ver.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/5773.ver.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/5773.ver.png" alt="" border="0" /></a></p>
<p>The Pi has a few serial ports, in this case I am hooked to the pins 8 and 10. These are the TXD0 and RXD0 (transmit and receive) pins. In the SerialDevice.GetDeviceSelector you use the UART0.</p>
<p>Here are the pins and connections (pretty simple send to the receive and receive to the send AND of course power):</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1385.WP_20160106_008.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1385.WP_5F00_20160106_5F00_008.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1385.WP_20160106_008.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1385.WP_5F00_20160106_5F00_008.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/4101.WP_20160106_007.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/4101.WP_5F00_20160106_5F00_007.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/4101.WP_20160106_007.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/4101.WP_5F00_20160106_5F00_007.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Attached is the code, enjoy!&nbsp;</p>
<p>[View:https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/8547.WP_5F00_20160106_5F00_004.mp4]&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/66/32/77/MainPage.xaml.cs" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-66-32-77/MainPage.xaml.cs">MainPage.xaml.cs</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Consuming data/Azure from Raspberry PI and Windows 10 IoT</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/consuming-dataazure-from-raspberry-pi-and-windows-10-iot</link>
      <pubDate>Mon, 28 Dec 2015 12:49:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2015/12/28/consuming-dataazure-from-raspberry-pi-and-windows-10-iot/</guid>
      <description><![CDATA[Windows 10 IoT is relatively new, and it is based on the Windows Universal platform. That said, it...]]></description>
      <content:encoded><![CDATA[<p>Windows 10 IoT is relatively new, and it is based on the Windows Universal platform. That said, it makes normal developer things we do slightly &ldquo;different&rdquo; as this uses different APIs and libraries than we are used to. For example, on a normal .net system we can use the QueueClient in azure; on a Universal app we can use Queue but that does not work on Win10 IoT.</p>
<p><strong>So how do we get data to the Raspberry PI (RPI)?</strong> Enter WebAPI! One of my favorite technologies!</p>
<p>At the end of the day, you probably need more data/server site functionality anyway.</p>
<p>Currently I am using a timer to call my Azure hosted WebAPI to send data down to my RPI.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_dtTimer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = new DispatcherTimer();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_dtTimer.Interval&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = TimeSpan.FromMilliseconds(5000);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_dtTimer.Tick&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; += TimerEvent;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_dtTimer.Start();&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Then in the Timer call use the HttpClient</strong></p>
<p>private void TimerEvent(object o, object e)<br />{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; MakeWebRequest();</p>
<p>}</p>
<p>public async void MakeWebRequest()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpClient http&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = new System.Net.Http.HttpClient();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HttpResponseMessage hrResponse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = await http.GetAsync("https://yoursite.azurewebsites.net/api/yourapi");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string strProgram&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = await hrResponse.Content.ReadAsStringAsync();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Do coo stuff</p>
<p>&nbsp;</p>
<p>On the WebAPI side, for this example I am just returning some data from the Azure Message Bus (Queue) on the Get() method. Here is that code:</p>
<div>public string Get()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string strReturn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = string.Empty;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string strConnectionString&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QueueClient qcClient&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = QueueClient.CreateFromConnectionString(strConnectionString, "Pump");&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BrokeredMessage bm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = qcClient.Peek();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(bm != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = qcClient.Receive();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strReturn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = bm.Properties["Action"].ToString();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bm.Complete();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return strReturn;<br />}</div>
<div>
<p>/*<br /> Microsoft provides programming examples for illustration only, without <br /> warranty either expressed or implied, including, but not limited to, the<br /> implied warranties of merchantability and/or fitness for a particular <br /> purpose.&nbsp;</p>
<p>This sample assumes that you are familiar with the programming language<br /> being demonstrated and the tools used to create and debug procedures. <br /> Microsoft support professionals can help explain the functionality of a<br /> particular procedure, but they will not modify these examples to provide<br /> added functionality or construct procedures to meet your specific needs. <br /> If you have limited programming experience, you may want to contact a <br /> Microsoft Certified Partner or the Microsoft fee-based consulting line <br /> at (800) 936-5200. <br /> */<br />&nbsp;</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Windows 10 IoT web server login and password?</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/windows-10-iot-web-server-login-and-password</link>
      <pubDate>Sat, 26 Dec 2015 13:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2015/12/26/windows-10-iot-web-server-login-and-password/</guid>
      <description><![CDATA[I love robotics, I am not ashamed to admit that! I love Azure and tying old robots to the service...]]></description>
      <content:encoded><![CDATA[<p>I love robotics, I am not ashamed to admit that! I love Azure and tying old robots to the service bus and making them do all sorts of awesome things! So for me it has always been what can the microcontroller do vs. the computer connected to it?</p>
<p>Normally I would use a small laptop consuming service bus messages and an Arduino to control relays and all the other &ldquo;robot&rdquo; stuff. But today I installed Windows 10 IoT on Raspberry PI; wow life changing! With 17 GPIO and full .Net code support, it&rsquo;s all you need! So this short post is really about after you install IoT on your Raspberry and need to connect to it via. Web browser (after Windows 10 IoT is installed, it gives you a small webpage to access).</p>
<p><strong>ID:</strong> Administrator<br /><strong>PW:</strong> p@ssw0rd</p>
<p><strong>Step 1: </strong>Copy IP</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1452.iot.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1452.iot.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1452.iot.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1452.iot.png" alt="" border="0" /></a></p>
<p><br /><strong>Step 2:</strong> Open in browser and enter above credentials</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/7142.iot.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/7142.iot.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/7142.iot.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/7142.iot.png" alt="" border="0" /></a></p>
<p>&nbsp;<br />Bam! Awesomeness!&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/0172.WP_20151022_002.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/0172.WP_5F00_20151022_5F00_002.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/0172.WP_20151022_002.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/0172.WP_5F00_20151022_5F00_002.jpg" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint High Trust Add-In Provider Hosted Quick Start/Walkthrough</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/sharepoint-high-trust-add-in-provider-hosted-quick-startwalkthrough</link>
      <pubDate>Wed, 14 Oct 2015 12:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2015/10/14/sharepoint-high-trust-add-in-provider-hosted-quick-startwalkthrough/</guid>
      <description><![CDATA[So you want to setup a Provider Hosted SharePoint Add-In quickly?! Follow these 7 steps! 
Step 1:...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri; font-size: small;">So you want to setup a Provider Hosted SharePoint Add-In quickly?! Follow these 7 steps! </span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 1: Go to the IIS where your SharePoint is running, open IIS and open Server Certificates.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/2772.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/2772.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/2772.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/2772.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Step 2: On the upper right, select &ldquo;Create Self-Signed Certificate&rdquo;</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1172.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1172.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1172.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/200x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1172.2.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Step 3: Enter &ldquo;PHACert&rdquo; as the friendly name, &ldquo;Personal&rdquo; is fine for the cert store</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/6825.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/6825.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/6825.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/6825.3.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Step 4: Select the newly created cert and select &ldquo;export&rdquo;. Set password to &ldquo;password&rdquo; and put it to a directory you will remember.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1411.4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1411.4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1411.4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1411.4.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Step 5: Double click on the cert, then click &ldquo;details&rdquo;. Then click &ldquo;Copy to File&rdquo;. Leave everything default, save the file as &ldquo;PHACert.cer&rdquo;</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1018.5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1018.5.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/1018.5.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/350x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/1018.5.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Step 6: Open SharePoint 2013 Management Shell as an Administrator. Save then run the attached PowerShell script like this: </span></p>
<p>&nbsp;<span style="font-family: Calibri; font-size: small;">PS C:\site&gt; ./pha.ps1</span></p>
<p><span style="font-family: Calibri; font-size: small;"><strong>For Cert Name: </strong>enter PHACert</span></p>
<p><span style="font-family: Calibri; font-size: small;"><strong>For Cert Path:</strong> enter the full path to PHACert.cer that you saved above.</span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/3173.6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/3173.6.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/3173.6.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/3173.6.png" alt="" border="0" /></a></span></p>
<p><strong><span style="font-family: Calibri; font-size: small;">Save the created Issuer ID at the bottom:</span></strong></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/5582.7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/5582.7.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/5582.7.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/5582.7.png" alt="" border="0" /></a></p>
<p><span style="font-family: Calibri; font-size: small;">Step 7: Create your app!</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/4505.8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/4505.8.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/4505.8.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/4505.8.png" alt="" border="0" /></a>&nbsp;</p>
<ul>
<li>
<p>On screen 2 enter your SharePoint server and provider hosted</p>
</li>
<li>
<p>On screen 3 enter SharePoint&nbsp; 2013</p>
</li>
<li>
<p>On screen 4 select MVC (or aspx)</p>
</li>
</ul>
<p><span style="font-family: Calibri; font-size: small;">OK, on screen 5:</span></p>
<ul>
<li>
<p>Select &ldquo;Use Certificate&rdquo;</p>
</li>
<li>
<p>Enter the full path to the PHACert.pfx you exported on step 4.</p>
</li>
<li>
<p>Enter &ldquo;password&rdquo; for the password.</p>
</li>
<li>
<p>Enter the Issuer ID found at the bottom of that PowerShell script.</p>
</li>
</ul>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/8255.9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/8255.9.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/8255.9.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/8255.9.png" alt="" border="0" /></a></p>
<p><span style="font-family: Calibri; font-size: small;"><strong>Done!</strong> Press finish and F5. You just made a SharePoint Add-In is 7 easy steps!</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/64/78/60/PHA.ps1" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-64-78-60/PHA.ps1">PHA.ps1</a></p>]]></content:encoded>
    </item>
    <item>
      <title>POST to WebAPI from a SharePoint Workflow</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/post-to-webapi-from-a-sharepoint-workflow</link>
      <pubDate>Tue, 13 Oct 2015 11:06:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2015/10/13/post-to-webapi-from-a-sharepoint-workflow/</guid>
      <description><![CDATA[There seems to be a good amount of information on consuming RESTful services in SharePoint workflow,...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri; font-size: small;">There seems to be a good amount of information on consuming RESTful services in SharePoint workflow, but there are limited articles on POST. In this article I will show you how to POST a complex object to WebAPI. I say &ldquo;complex&rdquo; but it is really just a data class, WebAPI only wants one parameter on POST so that parameter better be good! I am just going to jump into the steps and will explain after so you can get going. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 1: Have a WebAPI. If you do not I have one you can use the&nbsp;zipped up at the bottom of this article. </span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 2: Create your workflow</span></p>
<p><span style="font-family: Calibri; font-size: small;">Step 3: Create &ldquo;Header&rdquo; dictionary with the below fields (make sure <strong>Authorization</strong> is blank!)</span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="145">
<p><strong><span style="font-family: Calibri; font-size: small;">Item</span></strong></p>
</td>
<td valign="top" width="128">
<p><strong><span style="font-family: Calibri; font-size: small;">Type</span></strong></p>
</td>
<td valign="top" width="209">
<p><strong><span style="font-family: Calibri; font-size: small;">Value</span></strong></p>
</td>
<td valign="top" width="156">
<p><strong><span style="font-family: Calibri; font-size: small;">Comments</span></strong></p>
</td>
</tr>
<tr>
<td valign="top" width="145">
<p><strong><span style="font-family: Calibri; font-size: small;">Accept</span></strong></p>
</td>
<td valign="top" width="128">
<p><span style="font-family: Calibri; font-size: small;">String</span></p>
</td>
<td valign="top" width="209">
<p><span style="font-family: Calibri; font-size: small;">application/json;odata=verbose</span></p>
</td>
<td valign="top" width="156">
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
</td>
</tr>
<tr>
<td valign="top" width="145">
<p><strong><span style="font-family: Calibri; font-size: small;">content-type</span></strong></p>
</td>
<td valign="top" width="128">
<p><span style="font-family: Calibri; font-size: small;">String</span></p>
</td>
<td valign="top" width="209">
<p><span style="font-family: Calibri; font-size: small;">application/json;odata=verbose</span></p>
</td>
<td valign="top" width="156">
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
</td>
</tr>
<tr>
<td valign="top" width="145">
<p><strong><span style="font-family: Calibri; font-size: small;">Authorization</span></strong></p>
</td>
<td valign="top" width="128">
<p><span style="font-family: Calibri; font-size: small;">String</span></p>
</td>
<td valign="top" width="209">
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
</td>
<td valign="top" width="156">
<p><span style="font-family: Calibri; font-size: small;">This has to be set to </span><strong><span style="font-family: Calibri; font-size: small;">empty string</span></strong><span style="font-family: Calibri; font-size: small;"> to force auth.</span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/7752.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/7752.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/7752.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/7752.1.png" alt="" border="0" /></a></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span><span style="font-family: Calibri; font-size: small;">Step 4: Create &ldquo;Data&rdquo; Dictionary</span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="142">
<p><strong><span style="font-family: Calibri; font-size: small;">Item</span></strong></p>
</td>
<td valign="top" width="125">
<p><strong><span style="font-family: Calibri; font-size: small;">Type</span></strong></p>
</td>
<td valign="top" width="205">
<p><strong><span style="font-family: Calibri; font-size: small;">Value</span></strong></p>
</td>
<td valign="top" width="153">
<p><strong><span style="font-family: Calibri; font-size: small;">Comments</span></strong></p>
</td>
</tr>
<tr>
<td valign="top" width="142">
<p><strong><span style="font-family: Calibri; font-size: small;">Action</span></strong></p>
</td>
<td valign="top" width="125">
<p><span style="font-family: Calibri; font-size: small;">String</span></p>
</td>
<td valign="top" width="205">
<p><span style="font-family: Calibri; font-size: small;">Whatever you want to log</span></p>
</td>
<td valign="top" width="153">
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
</td>
</tr>
<tr>
<td valign="top" width="142">
<p><strong><span style="font-family: Calibri; font-size: small;">ID</span></strong></p>
</td>
<td valign="top" width="125">
<p><span style="font-family: Calibri; font-size: small;">String</span></p>
</td>
<td valign="top" width="205">
<p><span style="font-family: Calibri; font-size: small;">Current Item:ID</span></p>
</td>
<td valign="top" width="153">
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
</td>
</tr>
<tr>
<td valign="top" width="142">
<p><strong><span style="font-family: Calibri; font-size: small;">User</span></strong></p>
</td>
<td valign="top" width="125">
<p><span style="font-family: Calibri; font-size: small;">String</span></p>
</td>
<td valign="top" width="205">
<p><span style="font-family: Calibri; font-size: small;">Current Item:Modified By</span></p>
</td>
<td valign="top" width="153">
<p><span style="font-family: Calibri; font-size: small;">Currently using email address. Domain user will not encode in JSON correctly.</span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/0882.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/0882.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/0882.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/0882.2.png" alt="" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Step 4: Create HTTP Web Service Call and use the following settings:</span></p>
<p><span style="font-family: Calibri; font-size: small;"><strong>Address</strong>: https://YOURSERVER/api/Demo</span></p>
<p><span style="font-family: Calibri; font-size: small;"><strong>RequestHeaders</strong>: Header</span></p>
<p><span style="font-family: Calibri; font-size: small;"><strong>RequestContent</strong>: Data</span></p>
<p><span style="font-family: Calibri; font-size: small;"><strong>RequestType</strong>: HTTP POST</span></p>
<p>&nbsp;&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Step 5: Done! Data will post to your WebAPI and you can save it to SQL or send it to your grandmother via email!</span></p>
<p>&nbsp;&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">OK, that was easy, but let&rsquo;s dig in a little. Here are some thoughts/notes on this whole process:</span></p>
<ul>
<li>
<p>Most issues with the POST are authorization related. Setting the header &ldquo;Authorization&rdquo; to empty string forces the system to perform authentication or it will try anonymous (which will fail miserably).</p>
</li>
<li>
<p>Workflow will handle a moderately complex object, it does not like arrays. This is about as complex as it should get: {"Action":"Some Action", "ID":"10", "User":"Dan Biscup"}</p>
</li>
<li>
<p>Under the covers it is encoding as JSON, claims user names have \\ in there and it will break.</p>
</li>
<li>
<p>WebAPI likes 1 parameter in the POST, so use a complex object, I usually keep these in a separate dll/project that we can use in other projects.</p>
</li>
<li>
<p>I like to keep a "GetAll" method that just returns the controller name so I can make sure it is running in IIS like /api/demo.</p>
</li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/64/75/84/DemoWebAPI.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-64-75-84/DemoWebAPI.zip">DemoWebAPI.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Infrastructure as Code</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/sharepoint-infrastructure-as-code</link>
      <pubDate>Thu, 03 Sep 2015 13:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2015/09/03/sharepoint-infrastructure-as-code/</guid>
      <description><![CDATA[On a recent project, a developer was having many issues in migrating a cloud CAM application to...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">On a recent project, a developer was having many issues in migrating a cloud CAM application to on-premises SharePoint. One would ask why go from cloud to on-prem, the answer is Government; but that is a different story! </span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">When writing enterprise applications with multiple people on a project team, it is very important to be able to recreate data structures and reference data to different environments accurately, quickly and efficiently. In the SQL application world, people have been doing this forever. They script DB builds and auto load reference data. They sometimes take it up a notch and use tools like Entity Framework and Typed Datasets to help generate compile time errors to prevent run time errors when the data structures change. This is currently referred to as &ldquo;Infrastructure as Code&rdquo;.</span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">In the CAM/Add-in world, SharePoint lists</span><span style="font-family: arial,helvetica,sans-serif; font-size: small;"> can be a challenge to manage. There are ways, like &ldquo;export to template&rdquo; that can do this but it is hard to keep the data in-sync and up-to-date with new reference data etc. There are a few admin steps to activate these features and enable them. Some people make a list of the lists they need to move and manually add them to the different site collections. Typos anyone? This can be really hard to trouble-shoot in a new system and in the end, the developer will have to use the &ldquo;works on my box&rdquo; line; not good.</span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Enter the DataApp! A simple solution to get your team to an enterprise development standard. This DataApp should be able to create and load all data structures and any reference data your application needs. It does not have to be glamorous or efficient. The DataApp just has to be able to create the data structures and data. When a change is needed, you make it in the DataApp and have the DataApp push it to your SharePoint site. This allows your projects to always have a way to reproduce data and structures. To take it one step further, this DataApp can also generate constants for your application to use. If your application uses the constants, when a column is renamed or deleted, the complier will give you an error; runtime error avoided! How cool is that!</span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Let&rsquo;s walk through the DataApp, it consists of a JSON file with all the configurations and a CSOM app.</span></p>
<p><span style="font-family: arial,helvetica,sans-serif; text-decoration: underline;"><span style="font-size: small;">JSON Configuration File</span></span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">In this file, you define your tables and relationships. You can also add reference data rows. In the head of the file you specify your log-in credentials and if this is talking to o365 OR on-prem (handles both really cool!). </span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/0523.project.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/0523.project.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/71/48/0523.project.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/150x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-71-48/0523.project.png" alt="" border="0" /></a></p>
<p><strong>JSON File:</strong>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"ApplicationName"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">null</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Server"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"https://win-ebqb1hd3ns1/DansBikes"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"User"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Administrator"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Password"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"xxx"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Domain"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"win-ebqb1hd3ns1"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p style="margin: 0in 0in 8pt;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Iso365"</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: blue; background: white; mso-highlight: white;">false</span></p>
<p><span style="color: #000000; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">These are all pretty self explanatory. In my example I did not use an application name, feel free to. The next part is defining a table.</span></p>
<p>&nbsp;<span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">{</span></p>
<p>&nbsp;<span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Type"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"List"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Customer"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Ignore"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">false</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"TitleName"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Email"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span></p>
<p>&nbsp;<span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"SharePointColumns"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">[</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"First"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Type"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Text"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Parent"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">null</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Data"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">null</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>},</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Last"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Type"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Text"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Parent"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">null</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Data"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">null</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>},</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Phone"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Type"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Text"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Parent"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">null</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Data"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">null</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span>&nbsp;</p>
<p style="margin: 0in 0in 8pt;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>]</span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">This creates a &ldquo;List&rdquo; named &ldquo;Customer&rdquo; with the columns below: First, Last and Phone. In the head of this area, there is a switch to override the &ldquo;Title&rdquo; field. Here we rename it to &ldquo;Email&rdquo;. You can&rsquo;t really get rid of the Title field, so use it well, it&rsquo;s a primary key usually. For a customer table, Email is a great key. After the structure is created, you can add reference rows like this:</span></p>
<p>&nbsp;<span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"SharePointReferenceRows"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: [</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"SharePointReferenceColumns"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: [</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"First"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Value"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Dan"</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>},</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Title"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Value"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Dan.Biscup@Microsoft.com"</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>},</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;</span><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Last"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Value"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Biscup"</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>},</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Name"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Phone"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">,</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Value"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"(813) 123-1234"</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>]</span>&nbsp;</p>
<p style="margin: 0in 0in 8pt;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}</span>&nbsp;</p>
<p style="margin: 0in 0in 8pt;"><span style="color: black; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">JSON is really fast, add as many rows as you need here.</span>&nbsp;</p>
<p style="margin: 0in 0in 8pt;"><span style="color: black; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">In the application, there really is nothing special going on, it&nbsp;uses this JSON file and builds the structures. It is not the best code in the world, and if you notice it creates the SP context a ton of times. Using o365 gave a few context issues, so this is the reason. Once again the importance here is the ability to create the infrastructure quickly and efficiently. </span></p>
<p><span style="color: black; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">One thing to note is that sometimes you just want to do a partial build. In the head of the list creation you can set &ldquo;Ignore&rdquo; to true. This will skip the rebuild of the table. When this builds the structures, it deletes them first. Make note of that.</span></p>
<p><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: #2e75b6; background: white; mso-highlight: white;">"Ignore"</span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">: </span><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: blue; background: white; mso-highlight: white;">false</span></p>
<p>&nbsp;</p>
<p><span style="color: black; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">After the data app runs, it creates a .cs file with constants in them. This can be referenced on your consuming application. This will prevent column name change errors. If your infrastructure changes, the compiler will know. Hardcoding columns in your SharePoint<span style="mso-spacerun: yes;">&nbsp;</span>item&nbsp;is so dangerous. As soon as the lists change you will get strange, hard to troubleshoot errors. Use constants! </span></p>
<p><span style="color: black; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">In this example </span><span style="color: black; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">JSON file, an Entities.cs file was created. For the customer table it created this:</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">public </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">class </span><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">Entities_Customer</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">{</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">public </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">string</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> ListName = </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Customer"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;">&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">public </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">string</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> First = </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"First"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">public </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">string</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> Last = </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Last"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">public </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">string</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> Phone = </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Phone"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span>&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">public </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">const </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">string</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> Email = </span><span style="font-size: 9.5pt; font-family: Consolas; color: #a31515; background: white; mso-highlight: white;">"Title"</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">;</span></p>
<p style="margin: 0in 0in 8pt;"><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">}</span></p>
<p style="margin: 0in 0in 8pt;">&nbsp;</p>
<p style="margin: 0in 0in 8pt;"><span style="color: black; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">In my SharePoint add-in I add a link/reference to the Entities.cs file and add a new customer like this:</span></p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;">&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;">&nbsp;</p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">List</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> lCustomerList&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = ctx.Web.Lists.GetByTitle(Entities.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">Entities_Customer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.ListName);</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">ListItemCreationInformation</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> liciCustomer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white; mso-highlight: white;">new </span><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">ListItemCreationInformation</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">();</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">ListItem</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;"> liCustomer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = lCustomerList.AddItem(liciCustomer);</span></p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">liCustomer[Entities.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">Entities_Customer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.Email]&nbsp;&nbsp; = Model.Email;</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">liCustomer[Entities.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">Entities_Customer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.First]&nbsp;&nbsp; = Model.FirstName;</span></p>
<p style="margin: 0in 0in 0pt; line-height: normal; ; mso-layout-grid-align: none;"><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">liCustomer[Entities.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">Entities_Customer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.Last]&nbsp;&nbsp;&nbsp; = Model.LastName;</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">liCustomer[Entities.</span><span style="font-size: 9.5pt; font-family: Consolas; color: #2b91af; background: white; mso-highlight: white;">Entities_Customer</span><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">.Phone]&nbsp;&nbsp; = Model.Phone;</span></p>
<p><span style="font-size: 9.5pt; font-family: Consolas; color: black; background: white; mso-highlight: white;">liCustomer.Update();</span></p>
<p><span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: black; background: white; mso-highlight: white;">ctx.ExecuteQuery();</span></p>
<p>&nbsp;&nbsp;</p>
<p style="margin: 0in 0in 8pt;"><span style="color: #000000; line-height: 107%; font-family: arial,helvetica,sans-serif; font-size: 9.5pt;">Everything is a constant. If the &ldquo;Last&rdquo; field in the &ldquo;Customer&rdquo; table changes to &ldquo;LastName&rdquo;, this code will break at compile time!&nbsp;This codebase is changing frequently. I plan on releasing it soon to GitHub to see what people add like&nbsp;views etc!&nbsp;&nbsp;</span>&nbsp;&nbsp;</p>
<p style="margin: 0in 0in 8pt;"><span style="color: #000000; font-family: arial,helvetica,sans-serif;"><span style="line-height: 107%; font-size: 9.5pt;"><span style="color: #ff0000;">NOTICE</span>: I will be presenting at COSPUG 9/10/2015 on this topic: </span><span style="line-height: 107%; font-size: 10pt;"><a href="https://www.cospug.com/"><span style="color: #000000;">https://www.cospug.com/</span></a></span></span></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/63/95/35/DataApp.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-63-95-35/DataApp.zip">DataApp.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Passing parameters from a workflow email to a provider hosted app</title>
      <link>https://docs.microsoft.com/archive/blogs/danimal521/passing-parameters-from-a-workflow-email-to-a-provider-hosted-app</link>
      <pubDate>Wed, 15 Jul 2015 08:58:00 GMT</pubDate>
      <dc:creator><![CDATA[Danimal521]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/danimal521/2015/07/15/passing-parameters-from-a-workflow-email-to-a-provider-hosted-app/</guid>
      <description><![CDATA[On a recent project, we had a need to redirect a user from a workflow email to a provider hosted...]]></description>
      <content:encoded><![CDATA[<p>On a recent project, we had a need to redirect a user from a workflow email to a provider hosted SharePoint application. The scenario is that as the workflow runs it pace (emailing people etc.), we might want one of the steps to be editing the data in a provider hosted or CAM (cloud application model) app. This posed a few issues: how do we pass variables, such as an ItemID to our CAM app, and establish the correct SharePoint context for the provider model. Also there is the whole authentication/authorization issue. As there are a few ways to do this, I am going to show a neat way to handle this with minimal maintenance.</p>
<p><br /><strong>Disclaimer:</strong><br />Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose.</p>
<p>This sample assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. if you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at <span class="baec5a81-e4d6-4674-97f3-e9220f0136c1" style="white-space: nowrap;">(800) 936-5200<a style="margin: 0px; border: currentColor; left: 0px; top: 0px; width: 16px; height: 16px; right: 0px; bottom: 0px; overflow: hidden; vertical-align: middle; float: none; display: inline; white-space: nowrap; position: static !important;" title="Call: (800) 936-5200" href="#"><img style="margin: 0px; border: currentColor; left: 0px; top: 0px; width: 16px; height: 16px; right: 0px; bottom: 0px; overflow: hidden; vertical-align: middle; float: none; display: inline; white-space: nowrap; position: static !important;" title="Call: (800) 936-5200" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABcklEQVR4XpXTPUvDUBTH4aR2c2hBQXGpTiIORhBcBOvgYKf0Awi+4Ggr1MVPIIrYdnEpShddHIyLi6AVXVxsRRDRwbi4KNgu4lCIv8i/i6QRDzycy+09555LqOl5nhEUptPoJe1iDHU8oYlrlDw79m4QEbSLPexzsIc8hDRm8YBjLpj4q8EgxQdab+MNd4ghhQ2adIc1+ORAFEnWWfTDRp7GDfImlsIavKALLuqoqMGUCs4wHtagiQ5uc8kDyCOBKlP1k78QNTOZnMXCQRxWsbjl6iuskV41SQG2Gj9rikvcR1WcgKFDBa1LOEUK56hqv8BUFV3SGWkVS9JQ6Dsv4wQ1DKMPORUvkm78BhdQMI1CTa5I0yrcwSFqFD+SZ7DQesIkCG5S/JpkHYERQRmuNsrZ7Grc+Ef8/Bcoslkfae8Wc7CUHZ++TuAEBj86pHntjaDKXllPy6PW/gkKFaThwp/K87N8hDcQTTKKFTioSxqB8Q2BNX5JtAljwgAAAABJRU5ErkJggg==" alt="" /></a></span>.</p>
<p><br />Furthermore, there are many ways to do this. I <strong><span style="text-decoration: underline;">personally</span></strong> found this to be a nice, easy way to do it.</p>
<p><br />OK,</p>
<p><br />The basic idea is, from the workflow email, the user clicks a link to a page inside the host web (SharePoint), then some JavaScript redirects them back to the CAM app with an ItemID in the querystring you can read in the app and load the work item accordingly. What is nice about this approach is redirecting them back to SharePoint first, establishes the authentication and authorization and gives you a chance to track or log activities or anything else before the app. Also you might want to redirect them to another version or some instructional page. Going to SharePoint first allows an easy way to manage this without having to edit the workflow each time. You are basically hardcoding the url to the redirect page in the workflow to a SharePoint page, then in the page redirecting them to the app.</p>
<p><br />To establish SharePoint context, the framework needs a few things: HostURL, AppURL, Language, ClientTag, ProductNumber and RemoteAppURL. An easy way to get these parameters is clicking on your app the first time. In the querystring you will see all this populated:</p>
<p><br /><a href="https://URL?SPHostUrl=URL&amp;SPLanguage=en%2DUS&amp;SPClientTag=0&amp;SPProductNumber=15%2E0%2E4719%2E1000&amp;SPAppWebUrl=APPWEBURL">https://URL?SPHostUrl=URL&amp;SPLanguage=en%2DUS&amp;SPClientTag=0&amp;SPProductNumber=15%2E0%2E4719%2E1000&amp;SPAppWebUrl=APPWEBURL</a></p>
<p>The next part is adding the parameters you need, like ItemID and going to the page that loads your work item:</p>
<p><a href="https://URLToCAMApp?ItemID=55&amp;SPHostUrl=URL&amp;SPLanguage=en%2DUS&amp;SPClientTag=0&amp;SPProductNumber=15%2E0%2E4719%2E1000&amp;SPAppWebUrl=APPWEBURL">https://URLToCAMApp?<strong>ItemID=55</strong>&amp;SPHostUrl=URL&amp;SPLanguage=en%2DUS&amp;SPClientTag=0&amp;SPProductNumber=15%2E0%2E4719%2E1000&amp;SPAppWebUrl=APPWEBURL</a></p>
<p><br />In your app you will need to read the ItemID and load data etc.</p>
<p><br />string strItemID = Request.QueryString[&ldquo;ItemID&rdquo;];</p>
<p><br />//Load work item etc.</p>
<p><br />After all that is setup, the next part is putting some JavaScript on a page in SharePoint that redirects them to your app. I personally like the XML editor over the content editor webpart. So add a webpart to a page named &ldquo;Redirect.aspx&rdquo; and add this code:</p>
<p>/*<br />Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. <br />This sample assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. if you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at <span class="baec5a81-e4d6-4674-97f3-e9220f0136c1" style="white-space: nowrap;">(800) 936-5200<a style="margin: 0px; border: currentColor; left: 0px; top: 0px; width: 16px; height: 16px; right: 0px; bottom: 0px; overflow: hidden; vertical-align: middle; float: none; display: inline; white-space: nowrap; position: static !important;" title="Call: (800) 936-5200" href="#"><img style="margin: 0px; border: currentColor; left: 0px; top: 0px; width: 16px; height: 16px; right: 0px; bottom: 0px; overflow: hidden; vertical-align: middle; float: none; display: inline; white-space: nowrap; position: static !important;" title="Call: (800) 936-5200" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABcklEQVR4XpXTPUvDUBTH4aR2c2hBQXGpTiIORhBcBOvgYKf0Awi+4Ggr1MVPIIrYdnEpShddHIyLi6AVXVxsRRDRwbi4KNgu4lCIv8i/i6QRDzycy+09555LqOl5nhEUptPoJe1iDHU8oYlrlDw79m4QEbSLPexzsIc8hDRm8YBjLpj4q8EgxQdab+MNd4ghhQ2adIc1+ORAFEnWWfTDRp7GDfImlsIavKALLuqoqMGUCs4wHtagiQ5uc8kDyCOBKlP1k78QNTOZnMXCQRxWsbjl6iuskV41SQG2Gj9rikvcR1WcgKFDBa1LOEUK56hqv8BUFV3SGWkVS9JQ6Dsv4wQ1DKMPORUvkm78BhdQMI1CTa5I0yrcwSFqFD+SZ7DQesIkCG5S/JpkHYERQRmuNsrZ7Grc+Ef8/Bcoslkfae8Wc7CUHZ++TuAEBj86pHntjaDKXllPy6PW/gkKFaThwp/K87N8hDcQTTKKFTioSxqB8Q2BNX5JtAljwgAAAABJRU5ErkJggg==" alt="" /></a></span>.<br />*/<br />&lt;script src="../SiteAssets/jquery-1.11.3.js"&gt;&lt;/script&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;script&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(document).ready(function () {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var nItemID = qs("ItemID");<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(nItemID != -1)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; location.href = "<a href="https://AppURL?ItemId">https://AppURL?ItemId</a>=" + nItemID + "ItemID=55&amp;SPHostUrl=URL&amp;SPLanguage=en%2DUS&amp;SPClientTag=0&amp;SPProductNumber=15%2E0%2E4719%2E1000&amp;SPAppWebUrl=APPWEBURL";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function qs(key) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "<a href="file://\\$">\\$</a>&amp;"); // escape RegEx meta chars<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var match = location.search.match(new RegExp("[?&amp;]" + key + "=([^&amp;]+)(&amp;|$)"));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return match &amp;&amp; decodeURIComponent(match[1].replace(/\+/g, " "));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; &lt;/script&gt;</p>
<p>After that is in place, calling Redirect?ItemID=55 from your workflow (or anywhere) will launch your CAM application with the correct context and pass the ItemID where you can load the work item.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>