Visual Studio – Build – Warning – “The referenced component ‘Microsoft.Web.Infrastructure’ could not be found.”

Background

Downloaded a new Application.  One that I will have to build myself.

Launched Visual Studio and issued Build Command via menu.

Error

Ran into build errors.

The first one reads:

The referenced component ‘Microsoft.Web.Infrastructure’ could not be found.

Remediation

Have a lot of work to do this Saturday morning.

And, so let us address.

Package Manager Console

Running Visual Studio 2017 Community Edition, and the steps to access the Package Manager Console are:

  1. Navigate to the top menu
  2.  Menu Item
    • Tools
    • NuGet Package Manger
    • Package Manager Console

 

Install-Package

Code


Install-Package Microsoft.Web.Infrastructure

 

 

Output

Image

Textual
Attempting to gather dependency information for package 'Microsoft.Web.Infrastructure.1.0.0' with respect to project '[ProjectA]', targeting '.NETFramework,Version=v4.5.1'
Gathering dependency information took 120.25 ms
Attempting to resolve dependencies for package 'Microsoft.Web.Infrastructure.1.0.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.Web.Infrastructure.1.0.0'
Resolved actions to install package 'Microsoft.Web.Infrastructure.1.0.0'
Retrieving package 'Microsoft.Web.Infrastructure 1.0.0' from 'nuget.org'.
Adding package 'Microsoft.Web.Infrastructure.1.0.0' to folder '<app>\\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to folder '<app>\\packages'
Added package 'Microsoft.Web.Infrastructure.1.0.0' to 'packages.config'
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0' to <ProjectA>
Executing nuget actions took 5.42 sec
Time Elapsed: 00:00:07.5704133
PM> 

Credit

Crediting Joshua Davis per “FileNotFoundException: Could not load file or assembly ‘Microsoft.Web.Infrastructure“.  Here is the Link.

Joshua Davis’s about page is worthy of good, congratulatory read.  Here is the link to that page.

 

References

  1. NuGet.Org
    • Microsoft.Web.Infrastructure 1.0.0
      • This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time.
        Link
  2. fsprojects/Paket
    • Problem referencing Microsoft.Web.Infrastructure #1393
      Link

Visual Studio – Error – “Unable to find manifest signing certificate in the certificate store”

Background

Downloaded Source Code of an Application that I will be using, but unable to successfully compile it.

Error

Error Message

Error
Unable to find manifest signing certificate in the certificate store
Unable to find code signing certificate in the current user’s Windows certificate store.

Error Image

TroubleShooting

pfx file Missing

Solution Explorer

DiagManager

Image

Explanation
File Diagnosis
DiagManager_TemporaryKey.pfx DiagManager_TemporaryKey.pfx file is missing

 

Remediation

Project \ Signing

Uncheck “Sign the ClickOnce manifests

Summary

ClickOnce requires code signing.

As Microsoft is availing the Source code, they have opted not to include their PFX file.

References

  1. StackOverflow.com
    • Why am I getting “Unable to find manifest signing certificate in the certificate store” in my Excel Addin?
      Link

SQL Server Mini Dump Files – Day 01

Background

Received an alert indicating that one of our database jobs is lagging.

TroubleShooting

Adam Machanic

sp_whoisActive

Ran Adam Machanic’s sp_whoIsActive ..

And, noticed that a couple of Restore Transaction Log sessions have been running for 6 to 7 hours.

SQL Server – Error Log Folder

Reviewed the errorlog folder and noticed a couple of mdmp files.

 

Secure mdmp files

Secured the mdmp files and copied them locally to my machine.

Visual Studio

Visual Studio Community Edition 2017

About

Have a copy of the free community edition of SQL Server 2017.

Launched it.

Access mdmp files

Using menu item File \ File Open accessed the “Open File” window.

For file types chose “Dump files ( dmp, mdmp )

Dump – SQLDump0065.mdmp

Image

Explanation
  1. Process Information :- E:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
    • MSSQL12.MSSQLSERVER
      • Version :- MS SQL Server v2014
  2. Process Architecture :- x64
  3. Exception Code :- 0xC0000005
  4. Exception Information :- The thread tried to read or write to a virtual address for which it does not have the appropriate access.

 

Dump – SQLDump0066.mdmp

Image

Explanation
  1. Process Information :- E:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
    • MSSQL12.MSSQLSERVER
      • Version :- MS SQL Server v2014
  2. Process Architecture :- x64
  3. Exception Code :- 0x000042AC
  4. Exception Information :- {blank}

 

Summary

Quick Points here:

  1. Alerts & Notifications
    • Have alerts and notifications on jobs
    • Have them set up to email a distribution list or yourself
    • Need and have a smart phone
  2. TroubleShoot
    • Prepare and have diagnostic checklist & steps
    • Review Error Logs
    • Dump Files?
      • If dump files are being generated, analyze them

 

Reference

  1. Microsoft
    • Windows Development Center
      • DirectX Graphics and Gaming > Classic DirectX Graphics > Technical Articles
        • Crash Dump Analysis
          Link
    • SQL Server Customer Advisory Team
      • Thomas Kejser
        • Looking deeper into SQL Server using Minidumps
          Link

UML & Visual Studio

Background

My brother has a couple of Applications that he wanted to generate UML Models for.

And, so went online and downloaded both the Community ( Actual ) and Enterprise Edition ( Trial ).

 

Download

The latest version v2017, is available here.

Installed

Installed both versions.

And, was surprised that access to UML is no longer available under the Architecture menu.

Missed Functionality

UML to be ejected from Microsoft Visual Studio
Link

Not Supported post Visual Studio 2015 …

Stay with Visual Studio 2015

 

References

  1. Infoworld
    • Paul Krill
      • UML to be ejected from Microsoft Visual Studio
        Link
  2. Microsoft Developer Community
    • UML use case diagram in vs2017 RC Enterprise Edition
      Link
  3. Microsoft Developer Network
    • Create UML Class Diagrams from Code
      Link

Visual Studio 2010 – Upgrade from RTM to SP1

Background

Just as yourself, got a lot to do, but occasionally get pulled back in.

 

SQL Server 2008-R2 Upgrade

My manager has signed us up to upgrade all SQL Servers to the most recent version, 2016. Or at minimum the version that precedes the latest; btw, that is 2014.

The SQL Instance that I am looking at currently is v2008-R2 and the OS is 2008/R2.

That latest SQL Server supported on Windows 2008-R2 is SQL Server 2014.

 

Upgrade 2008-R2 to 2014

Trying to upgrade v2008-R2 to v2014, but ran into a constraint right away.

Features Rules

Textual

This computer has an installation of Visual Studio 2010 that requires a Service Pack 1 update that is needed for a successful installation of SQL Server based on your feature selection.

To continue, install the required Visual Studio 2010 Service Pack 1 from SQL Server media or from http://go.microsoft.com/fwlink/?LinkID=220649.

Image

Download Visual Studio 2010 SP1

Tried a drive by visiting https://www.microsoft.com/en-us/download/details.aspx?id=23691.

Redirected to https://www.microsoft.com/en-us/download/details.aspx?id=23691.

Download Visual Studio 2010 SP1 – Download 23691

Textual

We are sorry, this download is no longer available.

Image

 

Download Links

Source Link Works
go.microsoft.com/fwlink/?LinkID=220649 Link No
http://www.microsoft.com/en-us/download/details.aspx?id=23691 Link No
download.microsoft.com/download/E/B/A/EBA0A152-F426-47E6-9E3F-EFB686E3CA20/VS2010SP1dvd1.iso  Link  No
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en Link  No
 my.visualstudio.com/Downloads?q=visual%20studio%202010%20service%20pack%201  ( All ) Link  Yes
my.visualstudio.com/Downloads?pid=2300 ( Visual Studio 2010 Service Pack 1 ) Link  Yes

 

Downloaded

Please download the online installer availed here.

BTW the link noted above is from my.visualstudio.com web site.

And, you need a registered user.

If you have yet to register for my.visualstudio.com, please do so.

It is a free.

 

Downloaded Results

Here are results that matches “Visual Studio Service Pack 1

Downloaded

Visual Studio 2010 Service Pack 1 – Details

File Specification

The file’s name is mu_visual_studio_2010_sp1_web_installer_x86_651694.exe.

It is a relatively small file, 795 KB.

It is an online installer and it is a bootstrap as it simply connects to the website and downloads the actual install media.

 

Install Visual Studio 2010 – SP1

Screen Shot

Welcome

Microsoft Visual Studio 2010 Service Pack 1 Setup

Installation Progress

Installation Is Complete

Microsoft -LightSwitch – Error – “Request Failed with Status Code ‘500’ and Status Text ‘Internal Status Error.'”

Background

From within Visual Studio, launched an application that I am developing using LightSwitch and received one of those hard to decipher error.

Error Message

Image

requestfailedwithstatuscode500

Text

Request failed with status code ‘500’ and status text ‘Internal Server Error’.

TroubleShooting

As I know so little about LightSwitch, I get petrified anytime I see an error.

Event Viewer

Took to the system’s event viewer and found the obvious problem.

Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult – System.ServiceModel.ServiceActivationException

Image

taskcategory_webhost_2017021_0445pm-cropped-up

Textual

WebHost failed to process a request.
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/35567111
Exception: System.ServiceModel.ServiceActivationException: The service ‘/DBDiagData.svc’ cannot be activated due to an exception during compilation. The exception message is: Memory gates checking failed because the free memory (196927488 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.. —> System.InsufficientMemoryException: Memory gates checking failed because the free memory (196927488 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
— End of inner exception stack trace —
at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
Process Name: iisexpress
Process ID: 2756

Tabulate

Product Version File Version
 Log Name Application
 Source System.ServiceModel 4.0.0.0
 Event ID  3
 Task Category  WebHost
 Level  Error
 Process Name  iisexpress

 

 

ASP.NET 4.0.30319.0 –  InsufficientMemoryException

Image

taskcategory_aspnet_2017021_0616pm-croppedup

Textual

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/21/2017 4:15:03 PM
Event time (UTC): 2/22/2017 12:15:03 AM
Event ID: a9e5abe2978940499d84b3ed7b2bc5a1
Event sequence: 34
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-1-131321960967478001
Trust level: Full
Application Virtual Path: /
Application Path: C:\EDiag\bin\Debug\
Machine name: DADENIJI

Process information:
Process ID: 2756
Process name: iisexpress.exe
Account name: dadeniji

Exception information:
Exception type: InsufficientMemoryException
Exception message: Memory gates checking failed because the free memory (179412992 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

Request information:
Request URL: http://localhost:62496/Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo
Request path: /Services/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo
User host address: 127.0.0.1
User: dadeniji
Is authenticated: True
Authentication Type: Negotiate
Thread account name: dadeniji

Thread information:
Thread ID: 11
Thread account name: dadeniji
Is impersonating: False
Stack trace: at System.ServiceModel.Activation.ServiceMemoryGates.Check(Int32 minFreeMemoryPercentage, Boolean throwOnLowMemory, UInt64& availableMemoryBytes)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CheckMemoryCloseIdleServices(EventTraceActivity eventTraceActivity)
at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)

 

Tabulate

Product Version File Version
 Log Name Application
 Source ASP.NET 4.0.30319.0
 Event ID  1309
 Task Category  Web Event
 Level  Warning
 Process Name  iisexpress.exe

 

 

Remediation

Using Microsoft’s Task Manager close some of the Applications and Processes that are sagging memory.

Our target is to get more than 5% memory available.

Deploying LightSpeed Application – Web Platform Installer

Background

I need to deploy a small application that I placed together to pilot Microsoft Lightswitch.

We will be using Beth Massi’s “Deploying Lightswitch Applications to IIS 6 & Automating Deployment Packages” as a guide.

BTW, that excellent tutorial is here.

 

Web Platform Installer

Overview

  1. Microsoft Web Platform Installer
    • v5.0
      • Support Operating Systems:- Windows 8, Windows 7, Windows Vista SP2, Windows XP SP3+, Windows Server 2003 SP2+, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012.
      • Date Released :- 2/14/2013
    • v4.6

 

Download

To download the full blown installer, please go here.

As of today, 2016-Oct-13, here are the files that are currently available.

Links

Product Version x86 x64
 WebPI 5.0  Link – v5.0 – x86  Link – v5.0 – x64
 WebPI 4.6  Link – v4.6 – x86  Link – v5.0 – x64

 

 

Download & Installed

v5.0

As our box is an old x86 box, downloaded v5.0 x86 version.

 

Usage

From the Start menu, looked for “Web Platform Installer” and initiated it.

 

Error

Unable to download Product List
Image

unabletodownloadtheproductlistfrom

Textual

Unable to product list from .  Check your network connection and try again.  If the problem persists, report the use on the Web Platform Installer 5.0 forum at …

 

Remediation

Courtesy of

Superdoods @ Rackspace
Link

Launch regedit, navigate to the HKLM\Software\Microsoft\webplatforminstaller branch and add ProductXMLLocation to the

  1. Open regedit
  2. Navigate to HKLM\Software\Microsoft\webplatforminstaller
  3. Create a new string value

 

As we are going with the latest Web Platform Installer, v5.0, we went with the registry entry for 5.0

 

Before Registry Entry – v5.0

productxmllocation-before-20161212-1059pm

After Registry Entry – v5.0

productxmllocation-v5-20161212-1101pm

Restarted

Stopped and restarted Web Installer Platform and no more error message.

 

Deprecated

Unfortunately, LightSpeed Runtime is no longer bundled with v5.0, and so NO GO.

 

v4.6

Went back and downloaded v4.6 version.

Usage

From the Start menu, looked for “Web Platform Installer” and initiated it.

 

Search for Products

Search for Visual Studio LightSwitch…

And, we matched on

  1. Visual Studio Lightswitch 2011 Server Runtime without Local SQL
  2. Visual Studio Lightswitch 2011 Server Runtime and Local SQL

visualstudiolightswitch-searchresults

Add Products

As we have a remote SQL Server backend, we chose the “Visual Studio Lightswitch 2011 Server Runtime without Local SQL” option.

 

Prerequisite
Prerequisite – Image

visualstudiolightswitch-prerequisite

Prerequisite – Tabulate
Product File Size Link
 Visual Studio LightSwitch 2011 Server Runtime without Local SQL 1 MB
 Web Deployment Tool 1.1  5.01 MB  Link
 SQL Server 2008 R2 Management Objects  (x86) Only [ ENU\x86\SharedManagementObjects.msi ]  10.42 MB  Link
 SQL Server Native Client [ SQL Server Native Client 10.5 ]  4.49 MB  Link
 Microsoft System CLR Types for Microsoft SQL Server 2008 R2 (x86) [ ENU\x86\SQLSysClrTypes.msi ]  3.31 MB  Link

 

 

Prerequisite – Install Manually

If you will like to install the prerequisite yourself, please go here.

Please make sure that you are looking for the v2008 R2 version.

details

 

Installation
Installing…

install

Installing – Completed

installation-complete

 

Installing – Restart Completed
Image

restartcomputer

Textual

SQL Server Native Client 10.5 has finished installing successfully but requires a computer restart.
Do you want to restart your computer now? Click yes to restart now, or click no to close Web Platform Installer 4.6 and restart later.

 

References

Support

  1. Manual fix for a broken Web Platform Installer that cannot pull the packages from the Microsoft online package repository
    Link
  2. PLEASE READ: WebPI direct download links
    Link

QA

  1. Where to get Visual Studio LightSwitch 2012 Server Runtime from in Web Platform Installer?
    Link