Subscribe: Jeff Widmer's Blog
Added By: Feedage Forager Feedage Grade B rated
Language: English
account  azure files  azure  file  files  machine  net  new  nuget  onenote  server  sql server  version  web  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Jeff Widmer's Blog

Jeff Widmer's Blog

ASP.NET, ASP.NET MVC, C#, VB.NET, IIS7, Windows Forms, VB6, ASP 3.0


How to get Fiddler to show Azure Service API requests

Mon, 15 Dec 2014 11:29:00 GMT

How to get Fiddler to show outbound requests such as to the Azure Service APIs:

Add the following into your web.config:" usesystemdefault="false" />

See this post for other ways to set up the proxy but I found this the easiest -

And then enable Fiddler to decrypt HTTPS traffic:


Note: Regardless of other settings, .NET will always bypass the Fiddler proxy for URLs containing localhost. So, rather than using localhost, change your code to refer to the machine name.

Where’s the SQL Server Configuration Manager in Windows 8?

Sun, 10 Aug 2014 11:29:00 GMT

The SQL Server Configuration Manager is helpful for stopping/starting the SQL Server Services on your machine and also making sure all of the appropriate connection protocols are enabled.  In particular it really helps when you are running multiple instances of SQL Server since it allows you to view and control all of them from one place. 

But in Windows 8 and Windows 8.1, the SQL Server Configuration Manager is no longer found in your list of programs and it does not show up when you search (Windows-S) for it by name.  So how do you get to it?

This article has details on how to get to the SQL Server Configuration Manager:

To access SQL Server Configuration Manager Using Windows 8, because SQL Server Configuration Manager is a snap-in for the Microsoft Management Console program and not a stand-alone program, SQL Server Configuration Manager not does not appear as an application when running Windows 8. To open SQL Server Configuration Manager, in the Search charm, under Apps, type SQLServerManager11.msc (for SQL Server 2012) or SQLServerManager10.msc for (SQL Server 2008), and then press Enter.

In SQL Server 2014 the SQL Server Configuration Manager is back in All Programs:



How to get to the SQL Server 2012 Configuration Manager in Windows 8 or Windows 8.1

Start > Run > SQLServerManager11.msc


OneNote Page to PDF without Footer

Mon, 28 Jul 2014 11:29:00 GMT

A very useful feature of OneNote is that you can Export or Save a page (or section) as a PDF.  I use this for generating invoices for my clients but there are lots of ways quickly turning your OneNote page into a PDF can help your daily workflow.  You can create a PDF out of your OneNote page by going to File > Export and then choosing the PDF format from the list of options on the right. The exported PDF will include a footer which by default is the OneNote section name and the page number in the PDF:   The File > Export dialog does not have a settings section to turn off the footer but you can do this by using the Print Preview dialog which controls the same footer format. If you go to File > Print > Print Preview The Print Preview Dialog will allow you to control the footer format with several different layout options including one for not including a footer at all. Change the footer to “(none)”: Close this dialog and now when you Export your OneNote page to a PDF there will be no footer: The setting is maintained for the life of your OneNote session but once you close and open OneNote again it is lost and resets to the default which is to include the footer.  In any case it is good to know there is a way to get rid of the footer when exporting your OneNote page as a PDF.[...]

Getting Started with Azure Files Preview

Fri, 18 Jul 2014 11:27:00 GMT

Azure Files allows Virtual Machines (VMs) in an Azure Data Center to mount a shared file system and then these VMs will be able to access these files using standard Windows file APIs (CreateFile, ReadFile, WriteFile, etc.). Many VMs can attach to these files concurrently, allowing you to share persistent data easily between various roles and instances. In addition to accessing your files through the Windows file APIs, you can access your data using the Azure Files REST API.  Below I will take you through getting started with the Azure Files Preview and then end with mounting the Azure Files Share as a drive in your Azure Virtual Machine.  See Introducing Microsoft Azure File Service for a more detailed look at Azure Files. To get started with the Azure Files Preview, you will first need to apply for the preview and have it activated on your Azure account.  Start at the Azure Preview features scroll down to the Azure Files section and click the “Try it” button. Your account will then be added to the queue to get activated with the Azure Files Preview, and while that sounds like it will take a long time, the email shows about in about 5 minutes saying Azure Files preview has been activated in your Azure account. Once your account has been activated with the Azure Files preview, log into the Azure Management Portal and drill down into the Storage feature. The Azure Files Preview is added on top of a storage account which means it is kind of hidden that you have the Preview activated on your account until you create a new storage account.  Go ahead and create a new storage account by using the New button. IMPORTANT: Mounting the Azure Files share as a drive in a virtual machine requires that you have the Storage Account and Virtual Machine in the same Location.  For example, if you create the storage account in South Central US then the Azure Virtual Machine must also be in the South Central US location.  If you want to mount the Azure Files Share in a preexisting Azure Virtual Machine, make sure the Locations match between both. Once the new storage account is provisioned, drill down into it and then click on the Dashboard tab.  Here you will see the new Azure Files Preview is activated on the storage account with an endpoint for the new Azure Files service (https://[storage_account_name]   Now the fun part begins where you can create shares and add directories and files to your share.  The storage account that you just created contains zero or more Azure File shares.  In each of those shares is where your put your directory and file hierarchy.  You can read more about this from the Microsoft Azure Documentation Naming and Referencing Shares, Directories, Files, and Metadata. First thing we’ll do is create a share and the easiest way to do that is through PowerShell and the PowerShell Cmdlets for Files which can be found from reading Introducing Microsoft Azure File Service - How do I install the PowerShell Cmdlets for Files?  From this documentation FAQ, download the zip from and then make sure to unblock the zip file before extracting.  Now go ahead and extract the files, open a PowerShell console, and change to the folder containing the extracted files.  If everything goes well you will end up with a directory containing the following: And your PowerShell console opened to this directory: Introducing Microsoft Azure File Service has detailed instructions on using the PowerShell Cmdlet for creating your share and adding directories and files.  To create that first share, you will import the PowerShell module, create a new Azure Storage Context, and then create the share: import-module .\AzureStorageFile.psd1$ctx=New-AzureStorageContext New-AzureStorageShare -Context $ctx is the storage account name that y[...]

Could not load file or assembly 'System.Web.Http.WebHost'

Thu, 10 Jul 2014 23:26:00 GMT


We ran into this error when deploying a solution from the build server:

Could not load file or assembly 'System.Web.Http.WebHost, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Since this was a new web server and this solution used Nuget (and Nuget Package Restore) for Web Api, we assumed the Nuget packages needed to be updated but whatever type of updating we tried, we were unable to resolve the issue on the deployed web server.  After all sorts of checking and confirming of installed packages and assemblies, we just deleted the packages folder on the build server (the one created by Nuget Package Restore):


And then a fresh build solved the problem!

We are not exactly sure what happened here but most likely Nuget Package Restore had pulled down a newer version of the System.Web.Http.WebHost assembly that was not compatible with our project.  But we are not exactly sure why the Visual Studio project (MSBuild) kept trying to use the newer version instead of the proper version for the project reference.  This project had been upgraded to .NET Framework 4.5 several weeks ago and then rolled back to .NET Framework 4.0 because of a different issue.  This could explain where the incorrect version of System.Web.Http.WebHost came from but why Nuget Package Restore kept the wrong one is unknown and why the project kept building with the incorrect assembly is unknown too. 

In any case, for anyone that runs into the same issue, delete your packages folder and let Nuget Package Restore pull a fresh set of assemblies.


Full Exception information:
    Exception type: HttpException
    Exception message: Could not load file or assembly 'System.Web.Http.WebHost, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
   at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
   at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

Could not load file or assembly 'System.Web.Http.WebHost, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at Global.Application_Start(Object sender, EventArgs e)

Microsoft Build (MSBuild) 12

Thu, 10 Jul 2014 11:24:00 GMT

Did you know that you can install MSBuild to your build and deployment server individually without needing to install Visual Studio?

You can get MSBuild 12 – aka Microsoft Build Tools 2013 – from

Downloading and installing will give you MSBuild.exe in C:\Program Files (x86)\MSBuild\12.0\Bin


The 64-bit version is located in C:\Program Files (x86)\MSBuild\12.0\Bin\amd64.

Update Nuget.exe in.nuget package restore folder

Thu, 19 Jun 2014 23:24:00 GMT

When upgrading to the latest version of MVC with a build server using Nuget package restore, you may get these errors indicating that Nuget is out of date:

The schema version of 'Microsoft.AspNet.Mvc' is incompatible with version 2.2.31210.9045 of NuGet. Please upgrade NuGet to the latest version from
The schema version of 'Microsoft.AspNet.WebPages' is incompatible with version 2.2.31210.9045 of NuGet. Please upgrade NuGet to the latest version from

The links in those errors only point you to the Nuget home page which is confusing because it does not really tell you how to update Nuget.

From this StackOverflow answer, you can use the Nuget.exe executable and tell it to update itself.  To do this open a command window in the folder where you have the old version of Nuget.exe and execute the command:

nuget.exe update –self


Nuget.exe will start, check for the latest version, and update itself if there is a newer version:


Web Application Project is configured to use IIS. Unable to access the IIS metabase.

Thu, 19 Jun 2014 11:22:00 GMT

On a new install of Visual Studio 2013 on Windows Server 2012 R2 I ran into the following error when trying to open a Visual Studio Web Application project:



Even though I am an administrator on the machine, Visual Studio is not running as administrator so it does not have permission to the IIS metabase files.  One solution is to run Visual Studio as administrator.  This works but you can also take ownership of the IIS metabase files to fix this too. 

Browse to C:\Windows\System32\inetsrv and then double-click the “config” directory to get this warning dialog:


Do the same for the C:\Windows\System32\inetsrv\config\export directory and also the other directories in C:\Windows\System32\inetsrv.

Now you will be able to open the Visual Studio Web Application Project without a problem.

Microsoft Visual Studio

The Web Application Project is configured to use IIS. Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.


OneNote: Do not show Send To OneNote tool in TaskBar

Wed, 18 Jun 2014 11:21:00 GMT

OneNote has a Send To OneNote tool which can be helpful but also adds an icon to your TaskBar.  I don’t use it enough (especially on my desktop PC) to always have the Send To OneNote tool running and pinned to my TaskBar, so I like to turn it off.  Whenever I install a new instance of Office, it always takes me forever to figure out how to stop the Send To OneNote tool from running in the TaskBar when OneNote starts up. To stop the Send To OneNote tool from showing in the TaskBar, click on the Send To OneNote icon in the TaskBar to bring up the tool: And then just uncheck the “Start with OneNote” option at the bottom of the window… that’s it! It seems like this should be pretty easy to find but this is not the first time I could not figure it out quickly (yes, I install my OS and Office multiple times a year). What makes this confusing is I run Windows Server usually for development and the Send To OneNote tool, which clearly shows in the taskbar icon in Windows 8.1, does not show in Windows Server (at least with the default display options running through remote desktop). Under Windows 8.1 you can see the “Start with OneNote” checkbox in the thumbnail: Under Windows Server you just get the generic thumbnail icon:   Important: Some articles say you can turn off the Send To OneNote tool by unchecking the “Place OneNote icon in the notification area of the taskbar”.  While this is true and if you uncheck that option you will no longer have the Send To OneNote tool, you then also lose the quick keys such as Windows+Shift+S to grab a screen clipping.  I use the OneNote screen clipping key combination so much that I can’t do without it so turning off the OneNote icon is not acceptable. [...]

Install OneDrive on Windows Server 2012 R2

Fri, 13 Jun 2014 11:20:00 GMT

Go to

Choose PC/Mac from the Device drop down:


Then click on the Download for Windows 8 (even though Windows Server 2012 R2 is Windows 8.1 this downloader will still work).




Now just use this installer to install OneDrive.

OneDrive Taskbar icon in Windows Server 2012 R2:


Reference assemblies for .NET Framework v4.5 were not found

Sat, 19 Apr 2014 11:19:00 GMT

Setting up a build server on a new install of Windows Server 2012 R2 and ran into the following warning when building the projects:

Warning MSB3644 - The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

The build server was a fresh machine and the issue was Visual Studio 2013 needing to be installed on the server.  Installing Visual Studio Professional 2013 without any options resolved the issue.

  • Under optional Features uncheck all the options to speed up the install.

Vault Login Failed: The server uses a protocol that is not supported by this client.

Fri, 18 Apr 2014 11:18:00 GMT

Installing CruiseControl.NET on a new server and ran into an issue with CruiseControl.NET pulling from the Vault server.  I found the following error in the CruiseControl.NET Log:

[PROJECT:ERROR] Vault Standard Login Failed Twice.:The server uses a protocol that is not supported by this client.

Vault Standard Login Failed: The server uses a protocol that is not supported by this client.

The problem turned out to be an incorrect version of the Vault Plug-In.  I had accidentally grabbed the latest version (7.0) but the Vault server is running an older version of Vault (6.1).  The older version could be found on the Previous Vault Downloads page.  Installing the correct version of the Vault plugin to match the Vault server solved the problem.

Your current security settings do not allow this file to be downloaded.

Sun, 13 Apr 2014 23:17:00 GMT

When running a new Windows Server 2012 R2 server install, Internet Explorer is locked down and you will end up getting prompted multiple times when visiting sites and most likely you will not be able to download any setup files: ---------------------------Security Alert---------------------------Your current security settings do not allow this file to be downloaded.---------------------------OK   ---------------------------   Follow the steps below to modify the default Internet Explorer security settings to bring it down to a level which is more realistic for system administrator tasks: Disable Internet Explorer Enhanced Security Configuration Open Server Manager > Local Server Click on IE Enhanced Security Configuration: Within the dialog switch IE Enhanced Security off for both Administrators and Users (you will turn it back on for Users later). Modify Security Settings in Internet Explorer Open Internet Explorer > Internet Options Change to the Security tab and move the slider to “Medium-high” and uncheck the “Enable Protected Mode” checkbox. Medium-high enables file downloads which is pretty important for system administrators Note: It was necessary to turn off Internet Explorer Enhanced Security for “Users” in order to move the security level slider.  If the slider is disabled check to make sure Internet Explorer Enhanced Security is disabled for both Users and Administrators. Ok you way out of here and then close Internet Explorer. Note: Since this is a server there may be other users logged on.  It may be necessary to sign out those users and then close any other instances of Internet Explorer from Task Manager to get these security settings to be applied. Turn on Internet Explorer Enhanced Security for Users It is a good idea to enabled Internet Explorer Enhanced Security for Users who may use this machine.  Return back to the Local Server Manager dashboard and enable it for just Users:   Now you will no longer be prompted multiple times when browsing a site in Internet Explorer and you will also be able to download install files.[...]

Where does IAppBuilder.UseWebApi come from?

Tue, 05 Nov 2013 03:14:00 GMT

I was converting a self-hosted ASP.NET Web API application from Microsoft ASP.NET Web API Self Host to use OWIN Self Hosting.  Everything went find until I tried to add the route configuration to the OWIN pipeline.  Samples I found indicate all you have to do is call “UseWebApi” but the IAppBuilder.UseWebApi method did not resolve for me: 



After some searching around I found that you will need to import the Microsoft ASP.NET Web API 2 OWIN Self-Host Nuget package.



I didn’t realize that there was a separate Nuget package if you wanted to combine OWIN and ASP.NET Web API.  It was a simple solution and honestly now that I think about it, should have been one of the first things I checked.  This post is for the next person that runs into this issue.

Hello World!

Tue, 29 Oct 2013 06:13:00 GMT


Hello World!

How to detect if the new HTML5 File Upload progress information is available in your browser

Thu, 29 Nov 2012 16:49:53 GMT

HTML5 has a some new File Upload features added to it must notably upload progress notifications while the file is being posted to the server through the XMLHttpRequest Level 2 (XHR2) object (

Keep in mind that XMLHttpRequest Level 2 is not really HTML5 but as mentioned in this article, it is part of the core platform improvements and therefore frequently gets included under the HTML5 name umbrella:

One of the unsung heroes in the HTML5 universe is XMLHttpRequest. Strictly speaking XHR2 isn't HTML5. However, it's part of the incremental improvements browser vendors are making to the core platform.

Chrome, Firefox, Safari, and IE10 all support the new XHR2 progress events but unfortunately IE9 does not so you will need to check for them and fall back to something like SWFUpload to give you progress information while your file is posting to the server if the XHR2 object is not available.

But how do you test to see if the browser supports the new features of XMLHttpRequest Level 2 (XHR2) for progress information?

There is an interesting Modernizr thread here which talks about the various ways to test for it.  In the end all you need to test for is the existence of window.FormData.

If you want to add an XHR2 test into Modernizr you can do it like this:

        Modernizr.addTest('xhr2', 'FormData' in window);
        if (Modernizr.xhr2) {
             alert('File upload progress supported');
        } else {
             alert('No file upload progress support');
Or you can just do it by running your own check without Modernizr:
        if (!!window.ProgressEvent && !!window.FormData) {
             alert('File upload progress supported');
        } else {
             alert('No file upload progress support');

Note: Technically the test for window.ProgressEvent being undefined is not necessary as shown in the above Modernizr thread but I left it in just for my own knowledge.

You are not authorized to view this page due to invalid authentication headers.

Tue, 27 Nov 2012 21:17:17 GMT

I have been working through an authentication issue and making changes to IIS to debug the problem and then ran into the following IIS error:

HTTP Error 401.2 - Unauthorized

You are not authorized to view this page due to invalid authentication headers.


It took me a while to figure out what the problem was and in the end the cause was already listed in the “Most likely causes” section of this error page:

Most likely causes:

  • No authentication protocol (including anonymous) is selected in IIS.
  • Only integrated authentication is enabled, and a client browser was used that does not support integrated authentication.
  • Integrated authentication is enabled and the request was sent through a proxy that changed the authentication headers before they reach the Web server.
  • The Web server is not configured for anonymous access and a required authorization header was not received.
  • The "configuration/system.webServer/authorization" configuration section may be explicitly denying the user access.

My issue is that I had been debugging an issue with Windows Authentication and I had disabled Anonymous Authentication and enabled Windows Authentication for this website in IIS (I know you are not supposed to have both Forms Authentication and Windows Authentication enabled at the same time... this was for a test). 


When I had finished I thought I had reset everything back but I forgot to enable Anonymous Authentication.  Just enabling Anonymous Authentication resolved the issue.


Show detailed Classic ASP error messages in IIS7 for both local and remote requests

Thu, 15 Nov 2012 02:07:11 GMT

In IIS7 you have to enable sending the detailed error message for Classic ASP.  You can do this by configuring Classic ASP in IIS7: And then setting the “Send Errors to Browser” setting to true: Now you will get the detailed Classic ASP error message when an error occurs in your Classic ASP pages.  But these will only show for local requests.  Remote requests will still display the standard IIS 500 - Internal Server Error: Not sending detailed error messages for remote requests is the default since it is a good idea for remote requests not to see the full error details (it could expose sensitive data to the Internet).  But if you need to see it, such as on an internal testing server, follow these instructions to have IIS send the detailed error message for remote requests too. In IIS go to the Error Pages:   Then on the right click on the Edit Feature Settings...   In the Edit Error Pages Settings dialog is where you choose to send for both local and remote requests.  The second option button is what needs to be selected to have the detailed errors returned for both local and remote requests.  The bottom option is what is on by default – where detailed error messages are only sent for local requests.    Keep in mind that it is not recommended to send detailed errors for remote requests since this could expose sensitive information to the Internet.[...]

Building the Ultimate Developer Computer for $1000 - The Parts List

Sat, 17 Dec 2011 12:12:00 GMT

I am due for a new computer.  Following on the foot steps of Scott Hanselman (Ultimate Developer PC 2.0) and Jeff Atwood (Building a PC, Part VII: Rebooting) I decided to build my own computer.  I have built my own machine before but in the past it has been with mixed success.  Usually I have run into issues with getting a complete set of compatible parts, or fitting all of the components into the case. Prior to giving building my own computer another try, I did shop around for pre-built computers (Dell, CyberPower).  The prices of some pre-built computers certainly do make just buying one from a company like Dell or CyberPower very attractive (and also you are practically guaranteed a fully compatible set of hardware), but you do not always get the high-performance machine that I wanted (at least not without paying a premium).  So not only is building my own machine about putting together a high-performance computer, it also has to be very cost effective to be a better deal than prebuilt off-the-shelf computers.  I set $1000 as the goal because above $1000 I felt I could get a pretty decent machine from one of the pre-built shops (albeit maybe with some components that I did not necessarily want).  The $1000 price goal also made an assumption that I might sacrifice on some parts knowing that I could upgrade them in the future if this goes well.  So here goes... below is the list of parts that I selected to build my $1000 Ultimate Developer Machine. I borrowed heavily from Jeff Atwood’s latest post on rebuilding his machine.  He posted it in July 2011 so the parts list was still very up to date.  The only issue was that his selected parts cost just under $2000 and, as mentioned above, I wanted to have it at or under $1000. Pulling from his list of parts and skimping and saving where I could I came up with the following parts that I finally went with.  I will talk about each of these later in this post. ASUS LGA 1155 - Z68 - SATA 6Gb/s and USB 3.0 - ATX Intel Z68 ATX DDR3 2200 Motherboard (P8Z68-V LE) – $129.99 Corsair CC600TWM-WHT Special Edition Graphite Series 600T Mid Tower Gaming Computer Case - $159.09 Corsair Enthusiast TX V2 Series 550-Watt 80 Plus Bronze Certified High Performance Modular Power Supply – $87.59 Intel Core i5-2500K Processor – $214.99 Crucial 64 GB m4 2.5-Inch Solid State Drive SATA 6Gb/s – $109.99 Corsair Vengeance Blue 16 GB DDR3 SDRAM Dual Channel Memory Kit - $99.99 Sapphire HD 6850 PCIE Video Card - $149.99 Asus 24xDVD±RW Drive DVD-RAM/±R/±RW 24x8x16x(DVD) 48x32x48x(CD) Serial ATA Internal OEM DRW-24B1ST – $20.99 The total cost of the parts above was $972.62.  So below my goal of $1000.  To be fair though, I did reuse a hard drive from another machine: a Seagate 500 GB Hard Drive (Seagate Barracuda 7200.12 SATA 3Gb/s 500GB Hard Drive).  So that’s pretty much all you need to know to purchase an awesome machine for $1000. See this post (COMING SOON) which gives a decent set of step-by-step instructions on building this $1000 Ultimate Development Computer.  And then below I dive into each of the parts and why I decided to go with the one that I did (and also recommendations on potential substitutes).  Everything is just my opinion so take it as you may. And finally, here is the required Windows Experience Index screenshot after I had built the machine: Motherboard - ASUS LGA 1155 - Z68 - SATA 6Gb/s and USB 3.0 - ATX Intel Z68 ATX DDR3 2200 Motherboard (P8Z68-V LE) Th[...]

Final Flower

Fri, 18 Nov 2011 15:02:00 GMT


Winter is on the horizon….