Shawn Cicoria - CedarLogic

Perspectives and Observations on Technology

Recent Posts

Sponsors

Tags

General





Community

Email Notifications

Blogs I Read

Archives

Other

Use OpenDNS

Note to self–SQL Alias on x64–you need to set both 32/64 cliconfg.exe
1. Start “C:\windows\system32\cliconfg.exe”
2. Start “C:\windows\syswow64\cliconfg.exe”
Office 365 SharePoint and PDF files…

Recently, O365 added some server side rendering of PDF files.  Problem is if you have PDF files and an anonymous site, if a user clicks the PDF link, it will then try to authenticate that users.  Which defeats the purpose of anonymous.

You’ll need to change the links as follows:

Append either to the following (1st opens in the server side PDF reader; 2nd downloads to the client to read.

?Web=1

?Web=0

to the end of the URL.

NuPattern - Home

More from the OuterCurve foundation:

NuPattern is a set of tools and framework that make it easy to create your own branded custom tooling and automation in Visual Studio.

You are now used to seeing different vendors tools and extensions in Visual Studio, some you like, and some offer little value to your project except in the initial phases. But, have you ever considered using and building your own tools, or tools from others developers you follow, ones that create software the way you know you want it created for your projects? Like how your organization or community builds their applications using agreed coding standards, project structures and architectural practices.
NuPattern is the new framework and the tools that enable you to create your own tooling and automation that does exactly that.

Ever tried to create custom tools and templates in Visual Studio? It is impossibly hard, and few can afford to do it, but no longer with
NuPattern. Simply define a model of how you understand the features of your software, and apply templates and automation to it. Then NuPattern will automatically generate a new Visual Studio extension that you can post on a gallery and share with others.

http://nupattern.codeplex.com/

NuPattern - Home

Using S2S for On-Premises Access with Forms Based Access (FBA) in SharePoint 2013

The below diagram represents the flow and interaction when a user, from an external application, makes a OAuth protected call to a SharePoint site. This approach allows for delegated authentication, and since the SharePoint and the external application “can” (they don’t have to) share the Identity Store, we maintain the integrity of the “only 1 identity”.

Note, you can run this without sharing that identity store. In fact, since this is a S2S “High-Trust” approach, all SharePoint cares about is that the external application is “registered” along with a public certificate that will coincide with the signed OAuth token that will appear on the CSOM requests into SharePoint. This certificate, along with the application is registered in SharePoint with the Token Issuer (use the New-SPTrustedSecurityTokenIssuer – and make sure you look up the “-IsTrustBroker” flag).

image 

Spelunking with the SharePoint 2013 App AppContext Tokens and StandardTokens

When writing SharePoint 2013 Provider hosted (autohosted too), SharePoint 2013 Apps provide an App context token, along with other information as part of the initial transition to the provider.  That token, and supporting “tokens” (part of the {standardtoken}) are useful to understand what you have and what you can do wit them.

In the interest of having a simple MVC4 based site, that provides simple Model binding of the SP 2013 App context transition, the sample app in the github repository provides some simple token information, along with a couple CSOM calls back to the SP 2013 environment.

This is purely for getting a better understanding of what’s part of the SP 2013 AppContext, the JwT token, and a simple way to manage this under an MVC4 ASP.NET app.

Here are a couple screen shots:

Source code located here: https://github.com/cicorias/sharepointApps/tree/master/jwtSamples/jwtTokenDump 

Note that there is a hack in there that allows use of HttpSession for keeping the token around.  I didn’t want to much complexity with a cache provider.

SNAGHTML117c637e

SNAGHTML117c9326

SNAGHTML117cbfc1

 

SNAGHTML117ce589 

E-Book Gallery for Microsoft Technologies - TechNet Articles - United States (English) - TechNet Wiki

 

E-Book Gallery for Microsoft Technologies - TechNet Articles - United States (English) - TechNet Wiki

eBook on SignalR…

 

signalR-ebook-done - campusMVP.Net | campusMVP.Net

Visual Studio IE Debug with No Add-ons

 

Sometimes you need IE with no-adds.  For example, colleague of mine was crashing – won’t say which add-on caused it, but easily enough, add a choice to run IE with No-Addons in VS2012.

 

Just add an entry to your Browse with to

ProgramFiles(x86)\Internet Explorer\iexplore.exe

with the  -extoff parameter…

 

clip_image002 

Take a brief look at the Agile management features in TFS 2012

http://msdn.microsoft.com/en-us/magazine/dn189203.aspx

Team Foundation Server

Agile Project Management using TFS 2012

Suliman Battat

Cleaning up IIS Express Sites

Over time, you may end up with lots of sites running in IIS Express.  I like things neat and tidy, and periodically, I’ll run a little cleanup command as follows:

From PowerShell:

$appCmd = "C:\Program Files (x86)\IIS Express\appcmd.exe"

$result = Invoke-Command -Command {& $appCmd 'list' 'sites' '/text:SITE.NAME' }


for ($i=0; $i -lt $result.length; $i++)
{
    Invoke-Command -Command {& $appCmd 'delete' 'site'  $result[$i] }
}
eBook - Better Unit Testing with Microsoft Fakes–available now…

I was fortunate enough to work on a team for the past year on producing an eBook that covers the Microsoft Fakes Framework that shipped as part of Visual Studio 2012.  Note that Fakes is or will be available in the Premium edition of VS2012 with Update 2.

Download the guide: http://vsartesttoolingguide.codeplex.com/releases/view/102290

http://blogs.msdn.com/b/willy-peter_schaub/archive/2013/03/01/better-unit-testing-with-microsoft-fakes-guide-shipped.aspx

Mike Fourie was the lead on this, and w/ out Mike, this wouldn’t be where it is today…

http://mikefourie.wordpress.com/2013/03/05/creating-the-better-unit-testing-with-microsoft-fakes-ebook/

The team was made up of ALM Rangers from Microsoft and partners, providing a broad based set of experiences that helped shape the guide towards real world scenarios.

Brian Blackman, Carsten Duellmann, Dan Marzolini, Darren Rich, David V. Corbin, Hamid Shahid, Hosam Kamel, Jakob Ehn, Joshua Weber, Mehmet Aras, Patricia Wagner, Peter Provost, Richard Albrecht, Richard Fennell, Rob Jarratt, Shawn Cicoria, Waldyr Felix, Willy-Peter Schaub

Here’s the TOC:

Foreword

Introduction

Chapter 1: A Brief Theory of Unit Testing

  • Software testing

  • The fine line between good and flawed unit testing

Chapter 2: Introducing Microsoft Fakes

  • Stubs
  • Shims
  • Choosing between a stub and a shim

Chapter 3: Migrating to Microsoft Fakes

  • Migrating from Moles to Microsoft Fakes
  • Migrating from commercial and open source frameworks

Chapter 4: Miscellaneous Topics

  • Targeting Microsoft .NET Framework 4
  • Adopting Microsoft Fakes in a team
  • You can’t Fake everything!
  • Verbose logging
  • Working with strong named assemblies
  • Optimizing the generation of Fakes
  • Looking under the covers
  • Refactoring code under test
  • Removing Fakes from a project
  • Using Fakes with Team Foundation Version Control
  • Using Microsoft Fakes with ASP.NET MVC

Chapter 5: Advanced Techniques

  • Dealing with Windows Communication Foundation (WCF) service boundaries
  • Dealing with non-deterministic calculations
  • Gathering use-case and other analytical information
  • Analyzing internal state
  • Avoiding duplication of testing structures

Chapter 6: Hands-on Lab

  • Exercise 1: Using Stubs to isolate database access (20 – 30 min)
  • Exercise 2: Using Shims to isolate from file system and date (20 – 30 min)
  • Exercise 3: Using Microsoft Fakes with SharePoint (20 – 30 min)
  • Exercise 4: Bringing a complex codebase under test (20 – 30 min)

In Conclusion

Appendix

Querying a SharePoint 2013 Task List for Subtasks

The CAML for the query easily enough includes a ParentID reference.  However, if you’re spelunking around in SP 2013 using the OData services, you might have a hard time finding the ParendID field.

However, if you just issue the query:

https://<server>/<mp>/web/_api/Web/Lists/getByTitle('TaskListName')/Items/?$filter=ParentID eq ‘101’

You’ll be able to retrieve all Tasks that have task #101 as their parent.

Get your VHD images for testing–all prepped and ready to go…

 

IE6 – WinXP, IE7 – Vista, IE8 – Win7, IE9 – Win7, and IE10 – Win8…

http://www.modern.ie/virtualization-tools

Updating your TFS Service urls to from TfsPreview.com to VisualStudio.com

If you haven’t heard, TFS Service has gone live at http://tfs.visualstudio.com/.

While the old DNS name works, at some point it may retire.

So, Jesse Houwing has a post/script that makes it easy.

http://blog.jessehouwing.nl/2012/11/updating-your-team-foundation-service.html

Here’s the script as well.

 



Get-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\*\TeamFoundation\Instances\*.tfspreview.com Uri | %{set-itemproperty -Path $_.PSPath Uri -Value ( $_.Uri -Replace ".tfspreview.com/", ".visualstudio.com/" )}
 
Get-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\*\TeamFoundation\Instances\*.tfspreview.com\Collections\* Uri | %{set-itemproperty -Path $_.PSPath Uri -Value ( $_.Uri -Replace ".tfspreview.com/", ".visualstudio.com/" )}
 
Get-ChildItem -Path HKCU:\Software\Microsoft\VisualStudio\*\TeamFoundation\Instances\*.tfspreview.com | Rename-Item -NewName { $_.PSChildName -Replace ".tfspreview.com$", ".visualstudio.com" }
Posted: 11-03-2012 5:07 AM by cicorias | with no comments
Filed under:
RealTime communication with SingalR…

The upcoming Fall Release of VS2012 has some really great updates, bringing back OData, SPA, and now SingnalR.

If you get a chance take a look at Scott Guthrie’s keynote session where he goes through it (SignalR -- along with a demo of New Relic – which rocks).

SignalR is a hub/client model that leverages javascript to provide real time broadcast and point to point call backs from the hub to clients.  So, you can make some really cool sh**t with it.

Here’s a simple chat that was done with just a few lines of code:

http://jabbr.net/#/rooms/signalr

Other links

https://github.com/SignalR/SignalR

http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx

http://signalr.net/

Good overview of what’s included here:

http://weblogs.asp.net/jgalloway/archive/2012/10/31/ten-oh-wait-eleven-eleven-things-you-should-know-about-the-asp-net-fall-2012-update.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+jongalloway+%28Jon+Galloway%29

Posted: 11-02-2012 4:38 AM by cicorias | with no comments
Filed under: , ,
More Posts « Previous page - Next page »