<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Magnus Karlsson</title>
        <link>http://geekswithblogs.net/MagnusKarlsson/Default.aspx</link>
        <description> </description>
        <language>en-US</language>
        <copyright>Magnus Karlsson</copyright>
        <managingEditor>magnus8080@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Magnus Karlsson</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/MagnusKarlsson/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>EPiServer 7 &amp;ndash; issue with debugging and creating login user on brand new alloy default site</title>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2013/03/24/episerver-7-ndash-issue-with-debugging-and-creating-login-user.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2013/03/24/episerver-7-ndash-issue-with-debugging-and-creating-login-user.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2013/03/24/episerver-7-ndash-issue-with-debugging-and-creating-login-user.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Today I made a clean, brand new install of EPiServer 7 on a Windows 2012 server using VS2012. For googlers finding this post with any issue present in title, just look for the bold text to try my solutions for your problem&lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Ler" src="https://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/3563e41715bb_F578/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;  &lt;p&gt;I followed the instructions step by step here: &lt;a title="http://world.episerver.com/en/Download/EPiServer-CMS/?id=66773&amp;amp;epslanguage=en&amp;amp;version=7" href="http://world.episerver.com/en/Download/EPiServer-CMS/?id=66773&amp;amp;epslanguage=en&amp;amp;version=7"&gt;http://world.episerver.com/en/Download/EPiServer-CMS/?id=66773&amp;amp;epslanguage=en&amp;amp;version=7&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When the installation was finished I added my license file and browsed the site. So far so good. Then however I tried to start the site in debug mode to be able too look around for any news under the hood of the alloy site. Pressing F5 kept sending me to a page stating "This installation contains only core files."&lt;/p&gt;  &lt;p&gt;Weird. Opened IIS and choose: Browse site. Site starts good and all. Checked the properties for IIS in VS2012. Nothing weird(changed site path from computer name to localhost though). Then I tried Release mode. No luck there either. BUT Release mode without debug mode worked so I tried to attach to process when site running. &lt;strong&gt;This is where I noticed the “Attach to:” was set for Automatically detect(..) option. Switching it to Managed code solved the problem. &lt;/strong&gt;&lt;/p&gt;  &lt;h2&gt;Log in to &lt;a href="http://rootsitename:17000/episerver"&gt;http://rootsitename:17000/episerver&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;User name?? Password?? I have no idea. Guess I should go by the ASP.NET Configuration option and set up a user with administrator rights there. But, for whatever reason I wanted to try out setting the user from code. here goes:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnLoad(System.EventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.OnLoad(e);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Master != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) &lt;span style="color: #008000"&gt;// We only do this initialization for the top-level master page&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;             string username = &lt;span style="color: #006080"&gt;"epiadmin"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;             string password = &lt;span style="color: #006080"&gt;"epiadmin"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;             string email = &lt;span style="color: #006080"&gt;"m.karlsson@outlook.com"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;             Membership.CreateUser(username, password, email);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;             Roles.CreateRole(&lt;span style="color: #006080"&gt;"Administrators"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;             Roles.AddUserToRole(username, &lt;span style="color: #006080"&gt;"Administrators"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;             SetupMetaTags();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;  }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Compiling and then browsing the start page adds my user to the database and I’m able to login. Butt ugly solution I know BUT-quick as a weasel!&lt;/p&gt; &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/152502.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Magnus Karlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2013/03/24/episerver-7-ndash-issue-with-debugging-and-creating-login-user.aspx</guid>
            <pubDate>Sun, 24 Mar 2013 16:54:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/152502.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2013/03/24/episerver-7-ndash-issue-with-debugging-and-creating-login-user.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/152502.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/152502.aspx</trackback:ping>
        </item>
        <item>
            <title>Intellitrace bug causes &amp;ldquo;Operation could destabilize the runtime&amp;rdquo; exception</title>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/08/intellitrace-bug-causes-ldquooperation-could-destabilize-the-runtimerdquo-exception.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/08/intellitrace-bug-causes-ldquooperation-could-destabilize-the-runtimerdquo-exception.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/08/intellitrace-bug-causes-ldquooperation-could-destabilize-the-runtimerdquo-exception.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;  &lt;p&gt;We cant use it when we use simplemembership to handle external authorizations.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h3&gt;Server Error in '/' Application.    &lt;hr size="1" width="100%" /&gt;&lt;/h3&gt;  &lt;h4&gt;&lt;i&gt;Operation could destabilize the runtime.&lt;/i&gt;&lt;/h4&gt; &lt;b&gt;Description: &lt;/b&gt;An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.  &lt;br /&gt;&lt;b&gt;Exception Details: &lt;/b&gt;System.Security.VerificationException: Operation could destabilize the runtime.  &lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt;  &lt;p&gt;&lt;code&gt;An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.&lt;/code&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Stack Trace:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&lt;/code&gt;    &lt;/p&gt;&lt;pre&gt;[VerificationException: Operation could destabilize the runtime.]
   DotNetOpenAuth.OpenId.Messages.IndirectSignedResponse.GetSignedMessageParts(Channel channel) +943
   DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElement.GetExtensionsDictionary(IProtocolMessage message, Boolean ignoreUnsigned) +282
   DotNetOpenAuth.OpenId.ChannelElements.&amp;lt;GetExtensions&amp;gt;d__a.MoveNext() +279
   DotNetOpenAuth.OpenId.ChannelElements.ExtensionsBindingElement.ProcessIncomingMessage(IProtocolMessage message) +594
   DotNetOpenAuth.Messaging.Channel.ProcessIncomingMessage(IProtocolMessage message) +933
   DotNetOpenAuth.OpenId.ChannelElements.OpenIdChannel.ProcessIncomingMessage(IProtocolMessage message) +326
   DotNetOpenAuth.Messaging.Channel.ReadFromRequest(HttpRequestBase httpRequest) +1343
   DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.GetResponse(HttpRequestBase httpRequestInfo) +241
   DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.GetResponse() +361
   DotNetOpenAuth.AspNet.Clients.OpenIdClient.VerifyAuthentication(HttpContextBase context) +136
   DotNetOpenAuth.AspNet.OpenAuthSecurityManager.VerifyAuthentication(String returnUrl) +984
   Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.VerifyAuthenticationCore(HttpContextBase context, String returnUrl) +333
   Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.VerifyAuthentication(String returnUrl) +192
   PrioMvcWebRole.Controllers.AccountController.ExternalLoginCallback(String returnUrl) in c:hiddenforyou
   lambda_method(Closure , ControllerBase , Object[] ) +127
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +250
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass39.&amp;lt;BeginInvokeActionMethodWithFilters&amp;gt;b__33() +87
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass4f.&amp;lt;InvokeActionMethodFilterAsynchronously&amp;gt;b__49() +439
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass4f.&amp;lt;InvokeActionMethodFilterAsynchronously&amp;gt;b__49() +439
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass37.&amp;lt;BeginInvokeActionMethodWithFilters&amp;gt;b__36(IAsyncResult asyncResult) +15
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass2a.&amp;lt;BeginInvokeAction&amp;gt;b__20() +34
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass25.&amp;lt;BeginInvokeAction&amp;gt;b__22(IAsyncResult asyncResult) +221
   System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass1d.&amp;lt;BeginExecuteCore&amp;gt;b__18(IAsyncResult asyncResult) +28
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass4.&amp;lt;MakeVoidDelegate&amp;gt;b__3(IAsyncResult ar) +15
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass4.&amp;lt;MakeVoidDelegate&amp;gt;b__3(IAsyncResult ar) +15
   System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass8.&amp;lt;BeginProcessRequest&amp;gt;b__3(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass4.&amp;lt;MakeVoidDelegate&amp;gt;b__3(IAsyncResult ar) +15
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +523
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) +176&lt;/pre&gt;


&lt;hr size="1" width="100%" /&gt;&lt;b&gt;Version Information:&lt;/b&gt; Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929 &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/151470.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Magnus Karlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/08/intellitrace-bug-causes-ldquooperation-could-destabilize-the-runtimerdquo-exception.aspx</guid>
            <pubDate>Sat, 08 Dec 2012 22:56:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/151470.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/08/intellitrace-bug-causes-ldquooperation-could-destabilize-the-runtimerdquo-exception.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/151470.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/151470.aspx</trackback:ping>
        </item>
        <item>
            <title>Connect to running web role on Azure using Remote Desktop Connection and VS2012</title>
            <category>Azure Web Roles</category>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/03/connect-to-running-web-role-from-remote-desktop-connection-and.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/03/connect-to-running-web-role-from-remote-desktop-connection-and.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/03/connect-to-running-web-role-from-remote-desktop-connection-and.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;  &lt;p&gt;We want to be able to collect IntelliTrace information from our running app and also use remote desktop to connect to the IIS and look around(probably debugging). &lt;/p&gt;  &lt;p&gt;1. Create certificate&lt;/p&gt;  &lt;p&gt;1.1 Right-click the cloud project (marked in red) and select “Configure remote desktop”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/SelectRemoteDesktopConfiguration_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SelectRemoteDesktopConfiguration" border="0" alt="SelectRemoteDesktopConfiguration" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/SelectRemoteDesktopConfiguration_thumb.png" width="874" height="508" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;1.2 In the drop down list of certificates, choose &amp;lt;create&amp;gt; at the bottom. &lt;/p&gt;  &lt;p&gt;1.3. Follow the instructions, you can set it up with default values.&lt;/p&gt;  &lt;p&gt;1.4 When done. Choose the certificate and click “Copy to File…” as seen in the left of the picture above. &lt;/p&gt;  &lt;p&gt;1.5. Save the file with any name you want. &lt;/p&gt;  &lt;p&gt;Now we will save it to local storage to be able to import it to our solution through the azure configuration manager in step 3.&lt;/p&gt;  &lt;p&gt;2. Save certificate to local storage&lt;/p&gt;  &lt;p&gt;Now we need to attach it to our local certificate storage to be able to reach it from our confiuguration manager in visual studio. Microsoft provides the following steps for doing this: &lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/232137" href="http://support.microsoft.com/kb/232137"&gt;http://support.microsoft.com/kb/232137&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;In order to view the Certificates store on the local computer, perform the following steps:&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;Click &lt;b&gt;Start&lt;/b&gt;, and then click &lt;b&gt;Run&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Type "MMC.EXE" (without the quotation marks) and click &lt;b&gt;OK&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Click &lt;b&gt;Console &lt;/b&gt;in the new MMC you created, and then click &lt;b&gt;Add/Remove Snap-in&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;In the new window, click &lt;b&gt;Add&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Highlight the &lt;b&gt;Certificates &lt;/b&gt;snap-in, and then click &lt;b&gt;Add&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Choose the &lt;b&gt;Computer &lt;/b&gt;option and click &lt;b&gt;Next&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Select &lt;b&gt;Local Computer&lt;/b&gt; on the next screen, and then click &lt;b&gt;OK&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Click &lt;b&gt;Close &lt;/b&gt;, and then click &lt;b&gt;OK&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;You have now added the Certificates snap-in, which will allow you to work with any certificates in your computer's certificate store. You may want to save this MMC for later use.&lt;/li&gt;   &lt;/ol&gt; Now that you have access to the Certificates snap-in, you can import the server certificate into you computer's certificate store by following these steps:    &lt;ol&gt;     &lt;li&gt;Open the Certificates (Local Computer) snap-in and navigate to &lt;b&gt;Personal&lt;/b&gt;, and then &lt;b&gt;Certificates&lt;/b&gt;.        &lt;br /&gt;&lt;b&gt;Note: &lt;/b&gt;Certificates may not be listed. If it is not, that is because there are no certificates installed. &lt;/li&gt;      &lt;li&gt;Right-click &lt;b&gt;Certificates&lt;/b&gt; (or &lt;b&gt;Personal&lt;/b&gt; if that option does not exist.) &lt;/li&gt;      &lt;li&gt;Choose &lt;b&gt;All Tasks&lt;/b&gt;, and then click &lt;b&gt;Import&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;When the wizard starts, click &lt;b&gt;Next&lt;/b&gt;. Browse to the PFX file you created containing your server certificate and private key. Click &lt;b&gt;Next&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Enter the password you gave the PFX file when you created it. Be sure the &lt;b&gt;Mark the key as exportable&lt;/b&gt; option is selected if you want to be able to export the key pair again from this computer. As an added security measure, you may want to leave this option unchecked to ensure that no one can make a backup of your private key. &lt;/li&gt;      &lt;li&gt;Click &lt;b&gt;Next&lt;/b&gt;, and then choose the Certificate Store you want to save the certificate to. You should select &lt;b&gt;Personal&lt;/b&gt; because it is a Web server certificate. If you included the certificates in the certification hierarchy, it will also be added to this store. &lt;/li&gt;      &lt;li&gt;Click &lt;b&gt;Next&lt;/b&gt;. You should see a summary of screen showing what the wizard is about to do. If this information is correct, click &lt;b&gt;Finish&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;You will now see the server certificate for your Web server in the list of Personal Certificates. It will be denoted by the common name of the server (found in the subject section of the certificate).&lt;/li&gt;   &lt;/ol&gt; Now that you have the certificate backup imported into the certificate store, you can enable Internet Information Services 5.0 to use that certificate (and the corresponding private key). To do this, perform the following steps:    &lt;ol&gt;     &lt;li&gt;Open the Internet Services Manager (under Administrative Tools) and navigate to the Web site you want to enable secure communications (SSL/TLS) on. &lt;/li&gt;      &lt;li&gt;Right-click on the site and click &lt;b&gt;Properties&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;You should now see the properties screen for the Web site. Click the &lt;b&gt;Directory Security&lt;/b&gt; tab. &lt;/li&gt;      &lt;li&gt;Under the &lt;b&gt;Secure Communications&lt;/b&gt; section, click &lt;b&gt;Server Certificate&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;This will start the Web Site Certificate Wizard. Click &lt;b&gt;Next&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;Choose the &lt;b&gt;Assign an existing certificate&lt;/b&gt; option and click &lt;b&gt;Next&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;You will now see a screen showing that contents of your computer's personal certificate store. Highlight your Web server certificate (denoted by the common name), and then click &lt;b&gt;Next&lt;/b&gt;. &lt;/li&gt;      &lt;li&gt;You will now see a summary screen showing you all the details about the certificate you are installing. Be sure that this information is correct or you may have problems using SSL or TLS in HTTP communications. &lt;/li&gt;      &lt;li&gt;Click &lt;b&gt;Next&lt;/b&gt;, and then click &lt;b&gt;OK&lt;/b&gt; to exit the wizard.&lt;/li&gt;   &lt;/ol&gt; You should now have an SSL/TLS-enabled Web server. Be sure to protect your PFX files from any unwanted personnel.&lt;/blockquote&gt;  &lt;p&gt;Image of a typical MMC.EXE with the certificates up. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/SaveCertificateInPersonalStore_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SaveCertificateInPersonalStore" border="0" alt="SaveCertificateInPersonalStore" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/SaveCertificateInPersonalStore_thumb.png" width="812" height="462" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;3. Import the certificate to you visual studio project.&lt;/p&gt;  &lt;p&gt;3.1 Now right click your equivalent to the MvcWebRole1 (as seen in the first picture under the red oval) and choose properties.&lt;/p&gt;  &lt;p&gt;3.2 Choose Certificates. Right click the ellipsis to the right of the “thumbprint” and you should be able to select your newly created certificate here. After selecting it- save the file. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/AddCertificate_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="AddCertificate" border="0" alt="AddCertificate" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/AddCertificate_thumb.png" width="840" height="249" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;4. Upload the certificate to your Azure subscription. &lt;/p&gt;  &lt;p&gt;4.1 Go to the azure management portal, click the services menu icon to the left and choose the service. Click Upload in the bottom menu. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/UploadCertificateToAzure_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="UploadCertificateToAzure" border="0" alt="UploadCertificateToAzure" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/UploadCertificateToAzure_thumb_1.png" width="565" height="627" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;5. Connect to server.&lt;/p&gt;  &lt;p&gt;Since I tried to use account settings(have to use another name) we have to set up a new name for the connection. No biggie.&lt;/p&gt;  &lt;p&gt;5.1 Go to azure management portal, select your service and in the bottom menu, choose “REMOTE”. This will display the configuration for remote connection. It will actually change your ServiceConfiguration.cscfg file. After you change It here it might be good to choose download and replace the one in your project. Set a name that is not your windows azure account name and not Administrator. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/ConfigureRemoteInAzure_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ConfigureRemoteInAzure" border="0" alt="ConfigureRemoteInAzure" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/ConfigureRemoteInAzure_thumb.png" width="644" height="722" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;5.2 Goto visual studio, click Server Explorer. Choose as selected in the picture below and click “COnnect using remote desktop”. &lt;/p&gt;  &lt;p&gt; &lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/ConnectToServer_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ConnectToServer" border="0" alt="ConnectToServer" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/ConnectToServer_thumb.png" width="487" height="548" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;5.2 You will now be able to log in with the name and password set up in step 5.1.&lt;/p&gt;  &lt;p&gt;and voila! Windows server 2012, IIS and other nice stuff!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/IISinTheCloud_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="IISinTheCloud" border="0" alt="IISinTheCloud" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-Azure-from-Visual-studio_FD24/IISinTheCloud_thumb.png" width="863" height="541" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;To do this one I’ve been using &lt;a title="http://msdn.microsoft.com/en-us/library/windowsazure/ff683671.aspx" href="http://msdn.microsoft.com/en-us/library/windowsazure/ff683671.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ff683671.aspx&lt;/a&gt; where you can collect some of this information and additional one. &lt;/p&gt; &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/151436.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Magnus Karlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/03/connect-to-running-web-role-from-remote-desktop-connection-and.aspx</guid>
            <pubDate>Mon, 03 Dec 2012 19:43:45 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/151436.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/03/connect-to-running-web-role-from-remote-desktop-connection-and.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/151436.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/151436.aspx</trackback:ping>
        </item>
        <item>
            <title>How to use Azure storage for uploading and displaying pictures.</title>
            <category>Azure storage - blobs</category>
            <category>Azure Web Roles</category>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/02/how-to-use-azure-storage-for-images.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/02/how-to-use-azure-storage-for-images.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/02/how-to-use-azure-storage-for-images.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Basic set up of Azure storage for local development and production. &lt;/p&gt;  &lt;p&gt;This is a somewhat completion of the following guide from &lt;a title="http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/" href="http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/"&gt;http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/&lt;/a&gt; that also involves a practical example that I believe is commonly used, i.e. upload and present an image from a user. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;First we set up for local storage and then we configure for them to work on a web role. &lt;/p&gt;  &lt;p&gt;Steps: &lt;/p&gt;  &lt;p&gt;1. Configure connection string locally.&lt;/p&gt;  &lt;p&gt;2. Configure model, controllers and razor views. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;1. Setup connectionsstring&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/1_SetupSettingsForConString_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1_SetupSettingsForConString" border="0" alt="1_SetupSettingsForConString" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/1_SetupSettingsForConString_thumb_1.png" width="917" height="198" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;1.1 Right click your web role and choose “Properties”.&lt;/p&gt;  &lt;p&gt;1.2 Click Settings.&lt;/p&gt;  &lt;p&gt;1.3 Add setting.&lt;/p&gt;  &lt;p&gt;1.4 Name your setting. This will be the name of the connectionstring.&lt;/p&gt;  &lt;p&gt;1.5 Click the ellipsis to the right. (the ellipsis appear when you mark the area.&lt;/p&gt;  &lt;p&gt;1.6 The following window appears- Select “Windows Azure storage emulator” and click ok.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/1_5_ChooseWindowsAzureEmulator_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1_5_ChooseWindowsAzureEmulator" border="0" alt="1_5_ChooseWindowsAzureEmulator" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/1_5_ChooseWindowsAzureEmulator_thumb.png" width="587" height="438" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Now we have a connection string to use. To be able to use it we need to make sure we have windows azure tools for storage. &lt;/p&gt;  &lt;p&gt;2.1 Click Tools –&amp;gt; Library Package manager –&amp;gt; Manage Nuget packages for solution.&lt;/p&gt;  &lt;p&gt;2.2 This is what it looks like after it has been added. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/2_2_DownlaodAzureStorageTools_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2_2_DownlaodAzureStorageTools" border="0" alt="2_2_DownlaodAzureStorageTools" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/2_2_DownlaodAzureStorageTools_thumb.png" width="625" height="159" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Now on to what the code should look like. &lt;/p&gt;  &lt;p&gt;3.1 First we need a view which collects images to upload. Here Index.cshtml. &lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; @model List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;   &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; @{&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     ViewBag.Title = &lt;span style="color: #006080"&gt;"Index"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &amp;lt;h2&amp;gt;Index&amp;lt;/h2&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &amp;lt;form action=&lt;span style="color: #006080"&gt;"@Url.Action("&lt;/span&gt;Upload&lt;span style="color: #006080"&gt;")"&lt;/span&gt; method=&lt;span style="color: #006080"&gt;"post"&lt;/span&gt; enctype=&lt;span style="color: #006080"&gt;"multipart/form-data"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;     &amp;lt;label &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt;&amp;gt;Filename:&amp;lt;/label&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;     &amp;lt;input type=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; name=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; id=&lt;span style="color: #006080"&gt;"file1"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;     &amp;lt;br /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;     &amp;lt;label &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt;&amp;gt;Filename:&amp;lt;/label&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;     &amp;lt;input type=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; name=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; id=&lt;span style="color: #006080"&gt;"file2"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;     &amp;lt;br /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;     &amp;lt;label &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt;&amp;gt;Filename:&amp;lt;/label&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;     &amp;lt;input type=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; name=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; id=&lt;span style="color: #006080"&gt;"file3"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;     &amp;lt;br /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;     &amp;lt;label &lt;span style="color: #0000ff"&gt;for&lt;/span&gt;=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt;&amp;gt;Filename:&amp;lt;/label&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;     &amp;lt;input type=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; name=&lt;span style="color: #006080"&gt;"file"&lt;/span&gt; id=&lt;span style="color: #006080"&gt;"file4"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;     &amp;lt;br /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;     &amp;lt;input type=&lt;span style="color: #006080"&gt;"submit"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;=&lt;span style="color: #006080"&gt;"Submit"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;    &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt; &amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt; @&lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var item &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; Model) {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;     &amp;lt;img src=&lt;span style="color: #006080"&gt;"@item"&lt;/span&gt; alt=&lt;span style="color: #006080"&gt;"Alternate text"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;3.2 We need a controller to receive the post. Notice the “containername” string I send to the blobhandler. I use this as a folder for the pictures for each user. If this is not a requirement you could just call it container or anything with small characters directly when creating the container. &lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ActionResult Upload(IEnumerable&amp;lt;HttpPostedFileBase&amp;gt; file)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;             BlobHandler bh = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; BlobHandler(&lt;span style="color: #006080"&gt;"containername"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;             bh.Upload(file);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;             var blobUris=bh.GetBlobs();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;             &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; RedirectToAction(&lt;span style="color: #006080"&gt;"Index"&lt;/span&gt;,blobUris);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;3.3 The handler model. I’ll let the comments speak for themselves. &lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; BlobHandler&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;         &lt;span style="color: #008000"&gt;// Retrieve storage account from connection string.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;         CloudStorageAccount storageAccount = CloudStorageAccount.Parse(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;         CloudConfigurationManager.GetSetting(&lt;span style="color: #006080"&gt;"StorageConnectionString"&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; imageDirecoryUrl; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// Receives the users Id for where the pictures are and creates &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// a blob storage with that name if it does not exist.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name="imageDirecoryUrl"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; BlobHandler(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; imageDirecoryUrl)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.imageDirecoryUrl = imageDirecoryUrl;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Create the blob client.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;             CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Retrieve a reference to a container. &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;             CloudBlobContainer container = blobClient.GetContainerReference(imageDirecoryUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Create the container if it doesn't already exist.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;             container.CreateIfNotExists();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;             &lt;span style="color: #008000"&gt;//Make available to everyone&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;             container.SetPermissions(&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; BlobContainerPermissions&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;                     PublicAccess = BlobContainerPublicAccessType.Blob&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;                 });&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Upload(IEnumerable&amp;lt;HttpPostedFileBase&amp;gt; file)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Create the blob client.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;             CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt;  39:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Retrieve a reference to a container. &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt;  40:&lt;/span&gt;             CloudBlobContainer container = blobClient.GetContainerReference(imageDirecoryUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt;  41:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt;  42:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (file != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt;  43:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum44"&gt;  44:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var f &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; file)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum45"&gt;  45:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum46"&gt;  46:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (f != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum47"&gt;  47:&lt;/span&gt;                     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum48"&gt;  48:&lt;/span&gt;                         CloudBlockBlob blockBlob = container.GetBlockBlobReference(f.FileName);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum49"&gt;  49:&lt;/span&gt;                         blockBlob.UploadFromStream(f.InputStream);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum50"&gt;  50:&lt;/span&gt;                     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum51"&gt;  51:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum52"&gt;  52:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum53"&gt;  53:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum54"&gt;  54:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum55"&gt;  55:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; GetBlobs()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum56"&gt;  56:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum57"&gt;  57:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Create the blob client. &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum58"&gt;  58:&lt;/span&gt;             CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum59"&gt;  59:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum60"&gt;  60:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Retrieve reference to a previously created container.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum61"&gt;  61:&lt;/span&gt;             CloudBlobContainer container = blobClient.GetContainerReference(imageDirecoryUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum62"&gt;  62:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum63"&gt;  63:&lt;/span&gt;             List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt; blobs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum64"&gt;  64:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum65"&gt;  65:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// Loop over blobs within the container and output the URI to each of them&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum66"&gt;  66:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;foreach&lt;/span&gt; (var blobItem &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; container.ListBlobs())&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum67"&gt;  67:&lt;/span&gt;                 blobs.Add(blobItem.Uri.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum68"&gt;  68:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum69"&gt;  69:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; blobs;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum70"&gt;  70:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum71"&gt;  71:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;3.4 So, when the files have been uploaded we will get them to present them to out user in the index page. Pretty straight forward. In this example we only present the image by sending the Uri’s to the view. A better way would be to save them up in a view model containing URI, metadata, alternate text, and other relevant information but for this example this is all we need. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;4. Now press F5 in your solution to try it out. You can see the storage emulator UI here:&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/4_CheckStorageEmulatorUI_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="4_CheckStorageEmulatorUI" border="0" alt="4_CheckStorageEmulatorUI" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/4_CheckStorageEmulatorUI_thumb.png" width="347" height="266" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;4.1 If you get any exceptions or errors I suggest to first check if the service Is running correctly. I had problem with this and they seemed related to the installation and a reboot fixed my problems. &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/4_1_UI_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="4_1_UI" border="0" alt="4_1_UI" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/4_1_UI_thumb.png" width="529" height="232" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;5. Set up for Cloud storage. To do this we need to add configuration for cloud just as we did for local in step one. &lt;/p&gt;

&lt;p&gt;5.1 We need our keys to do this. Go to the windows Azure menagement portal, select storage icon to the right and click “Manage keys”. (Image from a different blog post though).&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/5_ManageKeys_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="5_ManageKeys" border="0" alt="5_ManageKeys" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/5_ManageKeys_thumb.png" width="608" height="555" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5.2 Do as in step 1.but replace step 1.6 with:&lt;/p&gt;

&lt;p&gt;1.6 Choose “Manually entered credentials”. Enter your account name. &lt;/p&gt;

&lt;p&gt;1.7 Paste your Account Key from step 5.1. and click ok. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/5_2_SetUpCloudPropertiesConString_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="5_2_SetUpCloudPropertiesConString" border="0" alt="5_2_SetUpCloudPropertiesConString" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/2a44952c5603_AB5C/5_2_SetUpCloudPropertiesConString_thumb.png" width="896" height="691" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;5.3. Save, publish and run! &lt;/p&gt;

&lt;p&gt;Please feel free to ask any questions using the comments form at the bottom of this page. I will get back to you to help you solve any questions. Our consultancy agency also provides services in the Nordic regions if you would like any further support.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/151428.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Magnus Karlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/02/how-to-use-azure-storage-for-images.aspx</guid>
            <pubDate>Sun, 02 Dec 2012 12:41:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/151428.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2012/12/02/how-to-use-azure-storage-for-images.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/151428.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/151428.aspx</trackback:ping>
        </item>
        <item>
            <title>Connect to localdb using Sql Server management studio</title>
            <category>SQL database</category>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2012/11/18/connect-to-localdb-using-sql-server-management-studio.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2012/11/18/connect-to-localdb-using-sql-server-management-studio.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2012/11/18/connect-to-localdb-using-sql-server-management-studio.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;  &lt;p&gt;I was trying to find my databse for local db under localhost etc but no luck. &lt;/p&gt;  &lt;p&gt;The following led me to just connect to it, kind of obvious really when you look at your connections string but.. its sunday morning or something.. &lt;/p&gt;  &lt;p&gt;From: &lt;a title="http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx" href="http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx"&gt;http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;h5&gt;High-Level Overview&lt;/h5&gt;    &lt;p&gt;After the lengthy introduction it's time to take a look at LocalDB from the technical side. At a very high level, LocalDB has the following key properties:&lt;/p&gt;    &lt;ol&gt;     &lt;li&gt;LocalDB uses the same sqlservr.exe as the regular SQL Express and other editions of SQL Server. The application is using the same client-side providers (ADO.NET, ODBC, PDO and others) to connect to it and operates on data using the same T-SQL language as provided by SQL Express. &lt;/li&gt;      &lt;li&gt;LocalDB is installed once on a machine (per major SQL Server version). Multiple applications can start multiple LocalDB processes, but they are all started from the same sqlservr.exe executable file from the same disk location. &lt;/li&gt;      &lt;li&gt;LocalDB doesn't create any database services; LocalDB processes are started and stopped automatically when needed. The application is just connecting to "Data Source=(localdb)\v11.0" and LocalDB process is started as a child process of the application. A few minutes after the last connection to this process is closed the process shuts down. &lt;/li&gt;      &lt;li&gt;LocalDB connections support AttachDbFileName property, which allows developers to specify a database file location. LocalDB will attach the specified database file and the connection will be made to it.&lt;/li&gt;   &lt;/ol&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-localdb-using-Sql-Server-mana_9572/ConenctLocalDbSSMS_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ConenctLocalDbSSMS" border="0" alt="ConenctLocalDbSSMS" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Connect-to-localdb-using-Sql-Server-mana_9572/ConenctLocalDbSSMS_thumb_1.png" width="804" height="547" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/151286.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Magnus Karlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2012/11/18/connect-to-localdb-using-sql-server-management-studio.aspx</guid>
            <pubDate>Sun, 18 Nov 2012 09:23:29 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/151286.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2012/11/18/connect-to-localdb-using-sql-server-management-studio.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/151286.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/151286.aspx</trackback:ping>
        </item>
        <item>
            <title>Add SQL Azure database to Azure Web Role and persist data with entity framework code first.</title>
            <category>Azure Web Roles</category>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/31/add-sql-azure-database-to-azure-web-role-and-persist.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/31/add-sql-azure-database-to-azure-web-role-and-persist.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/31/add-sql-azure-database-to-azure-web-role-and-persist.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;By: Magnus Karlsson, http://geekswithblogs.net/MagnusKarlsson&lt;/p&gt;&lt;p&gt;In my last post I went for a warts n all approach to set up a web role on Azure. In this post I’ll describe how to add an SQL Azure database to the project. This will be described with an as minimal as possible amount of code and screen dumps. All questions are welcome in the comments area. Please don’t email since questions answered in the comments field is made available to other visitors. &lt;/p&gt;  &lt;p&gt;As an example we will add a comments section to the site we used in the previous post (Länk här). &lt;/p&gt;  &lt;p&gt;Steps:&lt;/p&gt;  &lt;p&gt;1. Create a Comments entity and then use Scaffolding to set up controller and view, and add ConnectionString to web.config.&lt;/p&gt;  &lt;p&gt;2. Create SQL Azure database in Management Portal and link the new database&lt;/p&gt;  &lt;p&gt;3. Test it online!&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;1. Right click Models folder, choose add, choose “class…” . Name the Class Comment.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/1_AddClass_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="1_AddClass" border="0" alt="1_AddClass" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/1_AddClass_thumb_1.png" width="1004" height="620" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;1.1 Replace the Code in the class with the following:&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt; System.Data.Entity;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;namespace&lt;/font&gt; MvcWebRole1.Models&lt;/p&gt;  &lt;p&gt;{&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;public class&lt;/font&gt; Comment&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;{&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;   public int&lt;/font&gt; CommentId { get; set; }&lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;   public string&lt;/font&gt; Name { get; set; }   &lt;/p&gt;    &lt;p&gt;&lt;font color="#0000ff"&gt;   public string&lt;/font&gt; Content { get; set; }&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;public class&lt;/font&gt; CommentsDb : DbContext&lt;/p&gt;  &lt;p&gt;{&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt; DbSet&amp;lt;Comment&amp;gt; CommentEntries { get; set; }&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;}&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now Entity Framework can create a database and a table named Comment. &lt;/p&gt;  &lt;p&gt;Build your project to assert there are no build errors. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;1.2 Right click Controllers folder, choose add, choose “class…” . Name the Class CommentController and fill out the values as in the example below. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/2_AddController_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2_AddController" border="0" alt="2_AddController" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/2_AddController_thumb.png" width="604" height="356" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;1.3 Click Add. &lt;/p&gt;  &lt;p&gt;Visual Studio now creates default View for CRUD operations and a Controller adhering to these and opens them. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/3_ScaffoldingViews_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="3_ScaffoldingViews" border="0" alt="3_ScaffoldingViews" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/3_ScaffoldingViews_thumb.png" width="904" height="600" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;1.3 Open Web.config and add the following connectionstring in &amp;lt;connectionStrings&amp;gt; node.&lt;/p&gt;  &lt;p&gt;&amp;lt;add name="CommentsDb” &lt;/p&gt;  &lt;p&gt;connectionString="data source=(LocalDB)\v11.0;Integrated Security=SSPI;AttachDbFileName=|DataDirectory|\CommentsDb.mdf;Initial Catalog=CommentsDb;MultipleActiveResultSets=True"&lt;/p&gt;  &lt;p&gt;providerName="System.Data.SqlClient" /&amp;gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;1.4 Save All and press F5 to start the application. &lt;/p&gt;  &lt;p&gt;1.5 Go to &lt;a href="http://127.0.0.1:81/Comments"&gt;http://127.0.0.1:81/Comments&lt;/a&gt; which will redirect you through CommentsController to the Index View which looks like this:&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/4_StartSiteIndexView_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="4_StartSiteIndexView" border="0" alt="4_StartSiteIndexView" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/4_StartSiteIndexView_thumb.png" width="904" height="566" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Click Create new. In the Create-view, add name and content and press Create. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/5_TypeSomeData_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="5_TypeSomeData" border="0" alt="5_TypeSomeData" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/5_TypeSomeData_thumb.png" width="904" height="566" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;//&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #008000"&gt;// POST: /Comments/Create&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; [HttpPost]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ActionResult Create(Comment comment)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (ModelState.IsValid)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;         db.CommentEntries.Add(comment);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;         db.SaveChanges();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; RedirectToAction(&lt;span style="color: #006080"&gt;"Index"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; View(comment);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;The default View() is Index so that is the View you will come to. Looking like this:
  &lt;br /&gt;&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;//&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #008000"&gt;// GET: /Comments/&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ActionResult Index()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; View(db.CommentEntries.ToList());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Resulting in the following screen dump(success!):&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/6_DataPersisted_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="6_DataPersisted" border="0" alt="6_DataPersisted" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/6_DataPersisted_thumb.png" width="904" height="566" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;2. Now, go to the Management portal and Create a new db. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/7_CreateDbInAzure_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="7_CreateDbInAzure" border="0" alt="7_CreateDbInAzure" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/7_CreateDbInAzure_thumb.png" width="804" height="474" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;2.1 With the new database created. Click the DB icon in the left most menu. Then click the newly created database. Click DASHBOARD in the top menu. Finally click Connections strings in the right menu to get the connection string we need to add in our web.debug.config file. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/8_AzureConnectionString_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="8_AzureConnectionString" border="0" alt="8_AzureConnectionString" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/8_AzureConnectionString_thumb.png" width="904" height="548" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;2.2 Now, take a copy of the connection String earlier added to the web.config and paste in web.debug.conifg in the connectionstrings node.&lt;/p&gt;

&lt;p&gt;Replace everything within “ “ in the copied connectionstring with that you got from SQL Azure. You will have something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/9_ConnectionStringInWebDebuConfig_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="9_ConnectionStringInWebDebuConfig" border="0" alt="9_ConnectionStringInWebDebuConfig" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/9_ConnectionStringInWebDebuConfig_thumb.png" width="904" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;2.3 Rebuild the application, right click the cloud project and choose “Package…” (if you haven’t set up publishing profile which we will do in our next blog post). &lt;/p&gt;

&lt;p&gt;Remember to choose the right config file, use debug for staging and release for production so your databases won’t collide. &lt;/p&gt;

&lt;p&gt;You should see something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/10_PackageWebRole_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="10_PackageWebRole" border="0" alt="10_PackageWebRole" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/10_PackageWebRole_thumb.png" width="904" height="574" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;2.4 Go to Management Portal and click the Web Services menu, choose your service and click update in the bottom menu. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/11_UploadInManagementPortal_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="11_UploadInManagementPortal" border="0" alt="11_UploadInManagementPortal" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/11_UploadInManagementPortal_thumb.png" width="904" height="686" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;2.5 Link the newly created database to your application. Click the LINKED RESOURCES in the top menu and then click “Link” in the bottom menu. You should get something like this. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/12_LinkDatabaseToService_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="12_LinkDatabaseToService" border="0" alt="12_LinkDatabaseToService" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/12_LinkDatabaseToService_thumb.png" width="904" height="716" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Alright then. Under the Dashboard you can find the link to your application. Click it to open it in a browser and then go to ~/Comments to try it out just the way we did locally. &lt;/p&gt;

&lt;p&gt;Success and end of this story!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/13_SuccessAndEndOfStory_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="13_SuccessAndEndOfStory" border="0" alt="13_SuccessAndEndOfStory" src="http://gwb.blob.core.windows.net/magnuskarlsson/Windows-Live-Writer/Add-SQL-Azure-database-to-Azure-Web-Rol_1241E/13_SuccessAndEndOfStory_thumb.png" width="904" height="533" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/151147.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Magnus Karlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/31/add-sql-azure-database-to-azure-web-role-and-persist.aspx</guid>
            <pubDate>Wed, 31 Oct 2012 13:50:35 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/151147.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/31/add-sql-azure-database-to-azure-web-role-and-persist.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/151147.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/151147.aspx</trackback:ping>
        </item>
        <item>
            <title>Setup and configure a MVC4 project for Cloud Service(web role) and SQL Azure</title>
            <category>Azure Web Roles</category>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/17/setup-and-configure-a-mvc4-project-for-cloud-serviceweb-role.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/17/setup-and-configure-a-mvc4-project-for-cloud-serviceweb-role.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/17/setup-and-configure-a-mvc4-project-for-cloud-serviceweb-role.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Update Oct. 29 2012: Got a question about how to upload Certificate files. See part 4 for instructions.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;I aim at keeping this blog post updated and add related posts to it. Since there are a lot of these out there I link to others that has done kind of the same before me, kind of a blog-DRY pattern that I'm aiming for. I also keep all mistakes and misconceptions for others to see. As an example; if I hit a stacktrace I will google it if I don't directly figure out the reason for it. I will then probably take the most plausible result and try it out. If it fails because I misinterpreted the error I will not delete it from the log but keep it for future reference and for others to see. That way people that finds this blog can see multiple solutions for indexed stacktraces and I can better remember how to do stuff. To avoid my errors I recommend you to read through it all before going from start to finish.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;The steps:&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;ol style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;li style="padding: 0px; margin: 0px 0px 0.25em; "&gt;&lt;span xmlns=""&gt;Setup project in VS2012. (msdn blog)&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0px; margin: 0px 0px 0.25em; "&gt;&lt;span xmlns=""&gt;Setup Azure Services (half of mpspartners.com blog)&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0px; margin: 0px 0px 0.25em; "&gt;&lt;span xmlns=""&gt;Setup connections strings and configuration files (msdn blog + notes)&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0px; margin: 0px 0px 0.25em; "&gt;&lt;span xmlns=""&gt;Export certificates.&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0px; margin: 0px 0px 0.25em; "&gt;&lt;span xmlns=""&gt;Create Azure package from vs2012 and deploy to staging (same steps as for production).&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0px; margin: 0px 0px 0.25em; "&gt;&lt;span xmlns=""&gt;Connections string error&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;ol style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;li style="padding: 0px; margin: 0px 0px 0.25em; "&gt;&lt;span xmlns=""&gt;Set up the visual studio project:&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;a href="http://blogs.msdn.com/b/avkashchauhan/archive/2011/11/08/developing-asp-net-mvc4-based-windows-azure-web-role.aspx" style="text-decoration: none; color: rgb(102, 153, 204); "&gt;http://blogs.msdn.com/b/avkashchauhan/archive/2011/11/08/developing-asp-net-mvc4-based-windows-azure-web-role.aspx&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; 2. Then login in to Azure to setup the services:&lt;br /&gt;&lt;/span&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Stop following this guide at the "publish website" part since we'll be uploading a package.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;a href="http://www.mpspartners.com/2012/09/ConfiguringandDeployinganMVC4applicationasaCloudServicewithAzureSQLandStorage/" style="text-decoration: none; color: rgb(102, 153, 204); "&gt;http://www.mpspartners.com/2012/09/ConfiguringandDeployinganMVC4applicationasaCloudServicewithAzureSQLandStorage/&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; 3. When set up (connection strings for debug and release and all), follow this guide to set up the configuration files:&lt;br /&gt;&lt;/span&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh369931.aspx" style="text-decoration: none; color: rgb(102, 153, 204); "&gt;http://msdn.microsoft.com/en-us/library/windowsazure/hh369931.aspx&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Trying to package our application at this step will generate the following warning:&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;span style="color: rgb(30, 30, 30); font-family: Consolas; font-size: 9pt; "&gt;3&amp;gt;MvcWebRole1(0,0): warning WAT170: The configuration setting 'Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString' is set up to use the local storage emulator for role 'MvcWebRole1' in configuration file 'ServiceConfiguration.Cloud.cscfg'. To access Windows Azure storage services, you must provide a valid Windows Azure storage connection string.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Right click the web role under roles in solution manager and choose properties. Choose "Service configuration: Cloud". At "specify storage account credentials" we will copy/paste our account name and key from the Azure management platform.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;3.1 &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://2.bp.blogspot.com/-3uVLCUv5yjg/UH6jEvhbWEI/AAAAAAAAAAM/xLPLqGtDiWE/s1600/3.1.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-3uVLCUv5yjg/UH6jEvhbWEI/AAAAAAAAAAM/xLPLqGtDiWE/s1600/3.1.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;4. Right-click the Cloud Project(called BIAB in the screen shot). &lt;/span&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Click "Remote desktop Configuration". In the Remote desktop configuration window, &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Click the "View..." button next to drop down list. I have two certificates in my drop down list. Remember the name of the certificate selected in the list since you might wanna name the file youre exporting to something similar at the end of the process. You will do this this procedure for each certificate you are using. Clicking "View..." will open a new window named "Certificate". &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;In this window, click the "Copy to file..." button in the down right area of the window. &lt;/span&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Select "Yes, export private key" and click next. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Keep the suggesed export format and click next. Name the certificate and choose browse to save it somewhere you'll find it from the portal manager later. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Finally, click "Finish". Now do this again for your other certificates before we go to the Portal manager.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;4.1&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://4.bp.blogspot.com/-DGvlhjVbnME/UH6jFXUfrJI/AAAAAAAAAAQ/Xys4aF5FRBE/s1600/4.1.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-DGvlhjVbnME/UH6jFXUfrJI/AAAAAAAAAAQ/Xys4aF5FRBE/s1600/4.1.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;When the certificates saved to files we can go to the portal manager to upload them to our Cloud Service. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#333333" face="Arial, Tahoma, Helvetica, FreeSans, sans-serif"&gt;&lt;span style="font-size: 15px; line-height: 20px;"&gt;In portal manager: Click "Cloud Services in the left menu. Select your Cloud Service. Choose staging or production depending of the wnvironment you are configuring. In the top menu to the right. Select certificates. Choose upload in the bottom menu and browse for your certificates to upload them. Done.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5 Now right click the cloud project and select package.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.1 Showing dialogue box.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://2.bp.blogspot.com/-aQ2opPQ9nX8/UH6jGGm5XoI/AAAAAAAAAAc/iF_VgBh6sJc/s1600/5.1.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-aQ2opPQ9nX8/UH6jGGm5XoI/AAAAAAAAAAc/iF_VgBh6sJc/s1600/5.1.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.2 Package success&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://3.bp.blogspot.com/-yHu93TVgt4Y/UH6jHTBo0pI/AAAAAAAAAAk/LnPblPrN3nI/s1600/5.2.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-yHu93TVgt4Y/UH6jHTBo0pI/AAAAAAAAAAk/LnPblPrN3nI/s1600/5.2.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Now copy the path to the packaged file and go to management portal again. &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Click your web role and choose staging (or production). Upload. &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.3&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://1.bp.blogspot.com/-P9h-5K7b3_8/UH6jI-DhdeI/AAAAAAAAAAo/xDzlviW9ZKY/s1600/5.3.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-P9h-5K7b3_8/UH6jI-DhdeI/AAAAAAAAAAo/xDzlviW9ZKY/s1600/5.3.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Tick the box about the single instance if that's what you want or you don't know what it means. Otherwise the following will happen (see image 4.6)&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.4 Dialogue box&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://4.bp.blogspot.com/-MtGcZtb1aW8/UH6jJrABY6I/AAAAAAAAAA0/eU9TLGnL0fo/s1600/5.4.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-MtGcZtb1aW8/UH6jJrABY6I/AAAAAAAAAA0/eU9TLGnL0fo/s1600/5.4.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;When you have clicked the symbol for accept- button you will see the following screen with some green indicators down at the right corner. Click them if you want to see status.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.5 Information screen.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://1.bp.blogspot.com/-CFU5SUPwQfo/UH6jLFaYsYI/AAAAAAAAAA4/saf9SvOopyE/s1600/5.5.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-CFU5SUPwQfo/UH6jLFaYsYI/AAAAAAAAAA4/saf9SvOopyE/s1600/5.5.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.6 &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;"Failed to deploy application. &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;The upload application has at least one role with only one instance. We recommend that you deploy at least two instances per role to ensure high availability in case one of the instances becomes unavailable. "&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;To fix, go to step 5.4&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://3.bp.blogspot.com/-W26VZsrWYu0/UH6jL_TUtoI/AAAAAAAAABA/dbDTXvVj_E0/s1600/5.6.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-W26VZsrWYu0/UH6jL_TUtoI/AAAAAAAAABA/dbDTXvVj_E0/s1600/5.6.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;/span&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;If you forgot to (or just didn't know you were supposed to) export your certificates. The following error will occur. &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Side note, the following thread suggests. To prevent: "Enable Remote Desktop for all roles" when right-clicking BIAB and choosing "Package". But in my case it was the not so present certificates. I fund the solution here.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;http://social.msdn.microsoft.com/Forums/en-US/dotnetstocktradersampleapplication/thread/0e94c2b5-463f-4209-86b9-fc257e0678cd&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.7&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://4.bp.blogspot.com/-_bcmabCVpvc/UH6jM1V81sI/AAAAAAAAABM/Ndd2-_2IbC8/s1600/5.7.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-_bcmabCVpvc/UH6jM1V81sI/AAAAAAAAABM/Ndd2-_2IbC8/s1600/5.7.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;/span&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.8 Success! &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://2.bp.blogspot.com/-lKu53N-G_9o/UH6jN4hYf1I/AAAAAAAAABU/-mMkrEFEOdQ/s1600/5.8.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-lKu53N-G_9o/UH6jN4hYf1I/AAAAAAAAABU/-mMkrEFEOdQ/s1600/5.8.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;5.9 Nice URL n' all. (More on that at another blog post).&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://3.bp.blogspot.com/-pHFKo-skpu0/UH6jPGJCGcI/AAAAAAAAABc/bkVFt0_mbdI/s1600/5.9.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-pHFKo-skpu0/UH6jPGJCGcI/AAAAAAAAABc/bkVFt0_mbdI/s1600/5.9.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;6. If you try to login and get&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;div class="separator" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); clear: both; text-align: center; "&gt;&lt;a href="http://1.bp.blogspot.com/-ZsYjHVpJg5E/UH6ljjXwzQI/AAAAAAAAABk/f8EtEwx5qOU/s1600/6.png" imageanchor="1" style="text-decoration: none; color: rgb(102, 153, 204); margin-left: 1em; margin-right: 1em; "&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-ZsYjHVpJg5E/UH6ljjXwzQI/AAAAAAAAABk/f8EtEwx5qOU/s1600/6.png" style="border: none; position: relative; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;/span&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;When this error occurs many web sites suggest this is because you need:&lt;a href="http://nuget.org/packages/Microsoft.AspNet.Providers.LocalDB" style="text-decoration: none; color: rgb(102, 153, 204); "&gt;http://nuget.org/packages/Microsoft.AspNet.Providers.LocalDB&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Or : &lt;a href="http://nuget.org/packages/Microsoft.AspNet.Providers" style="text-decoration: none; color: rgb(102, 153, 204); "&gt;http://nuget.org/packages/Microsoft.AspNet.Providers&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;But it can also be that you don't have the correct setup for converting connectionstrings between your web.config to your debug.web.config(or release.web.config, whichever your using).&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;Run as suggested in the "ordinary project in your solution.&lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;So, hope you find my notes useful and please feel free to send more emails but I would really prefer if you wrote any questions here directly since the answers would benefit other visitors as well then. Happy coding!&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;span xmlns="" style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt; &lt;/span&gt;&lt;br style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px; background-color: rgb(255, 255, 255); " /&gt;&lt;/div&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/151016.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>MagnusKarlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/17/setup-and-configure-a-mvc4-project-for-cloud-serviceweb-role.aspx</guid>
            <pubDate>Wed, 17 Oct 2012 11:13:46 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/151016.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2012/10/17/setup-and-configure-a-mvc4-project-for-cloud-serviceweb-role.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/151016.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/151016.aspx</trackback:ping>
        </item>
        <item>
            <title>Entity Framework 4.1 Code First- Use MSSQLSERVER instead of EXPRESS</title>
            <link>http://geekswithblogs.net/MagnusKarlsson/archive/2012/02/29/entity-framework-4.1-code-first--use-mssqlserver-instead-of-express.aspx</link>
            <description>&lt;p&gt;Originally posted on: &lt;a href='http://geekswithblogs.net/MagnusKarlsson/archive/2012/02/29/entity-framework-4.1-code-first--use-mssqlserver-instead-of-express.aspx'&gt;http://geekswithblogs.net/MagnusKarlsson/archive/2012/02/29/entity-framework-4.1-code-first--use-mssqlserver-instead-of-express.aspx&lt;/a&gt;&lt;/p&gt;&lt;div&gt;This is my first blog post and will be short and concise. I will get back to formatting later.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Edit: Here is the same explanation but from MSDN :)&lt;/div&gt;&lt;div&gt;&lt;a href="http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-code-first-walkthrough.aspx"&gt;http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-code-first-walkthrough.aspx&lt;/a&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Been playing around with MVC, Scaffolding and Razor a couple of weeks now on my spare time. Think I should write som stuff down here to share with others!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I started out here, thanks to Steve Sanderson!&lt;/div&gt;&lt;div&gt;&lt;a href="http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/"&gt;http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/&lt;/a&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, what is not included is how to set up your database if you prefer to use MS SQLSERVER instead of EXPRESS. &lt;/div&gt;&lt;div&gt;Take the name of the persistence class (probably NAMEOFPROJECTcontext.cs) in you models folder and use it like I use TestProject here.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;add name="TestContext"&lt;/div&gt;&lt;div&gt;        connectionString="Server=.;Database=TestContext.mdf;Integrated Security=SSPI;"&lt;/div&gt;&lt;div&gt;        providerName="System.Data.SqlClient" /&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Voila!&lt;/div&gt;&lt;div&gt;This created a TestContext.mdf database directly when my Initializedb ran.&lt;/div&gt; &lt;img src="http://geekswithblogs.net/MagnusKarlsson/aggbug/148848.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>MagnusKarlsson</dc:creator>
            <guid>http://geekswithblogs.net/MagnusKarlsson/archive/2012/02/29/entity-framework-4.1-code-first--use-mssqlserver-instead-of-express.aspx</guid>
            <pubDate>Wed, 29 Feb 2012 16:13:04 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/MagnusKarlsson/comments/148848.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/MagnusKarlsson/archive/2012/02/29/entity-framework-4.1-code-first--use-mssqlserver-instead-of-express.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/MagnusKarlsson/comments/commentRss/148848.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/MagnusKarlsson/services/trackbacks/148848.aspx</trackback:ping>
        </item>
    </channel>
</rss>