Subscribe: OmegaMan's Musings
Preview: OmegaMan's Musings

OmegaMan's Musings

Technology blog written by a Microsoft C# MVP

Last Build Date: Mon, 27 Mar 2017 00:48:08 +0000


Identify Invalid Azure Container Names Using .Net Regex

Fri, 24 Mar 2017 15:54:41 +0000

Not finding a satisfactory method to find invalid Azure Container names, I wrote my own easier (?) to read regex pattern for .Net. ^ # Anchor; beginning of line. (?!.+--) # String ahead does not contain two dashes (?!^-) # String ahead does not start with a dash (\$root|[a-z\d-]{3,63}) # Either literal root or a […]

PowerShell: Kill VPN Related Processes And Launch IE to Companies Website

Tue, 26 Apr 2016 21:36:18 +0000

While working for a company which used a browser based VPN which needed to have different pinned components in memory. That caused difficulties when having to mostly re-login due to their startup script. I created this PowerShell script to kill specific processes, if running, and launch IE to my companies’ web page. Get-Process | where […]

Entity Framework Stored Procedure Instructions

Sat, 13 Jun 2015 02:22:30 +0000

This is a how-to on getting Entity Framework (EF) version 5 and 6 to include stored procs and how to consume the resulting entities in code. In the EF designer choose Update Model From Database. When the page to Choose Your Database Objects and Settings comes up which allows one to add new tables/views/stored procs, […]

Entity Framework Cascading Deletes; Set it from the database.

Thu, 28 May 2015 14:07:54 +0000

To achieve cascading deletes, one must specify the cascading deletes on the FK relationships from the top level table in the database. The default is not to cascade. Here is the visual Process in SQL Server Management Studio. Select the top level table which will handle the delete and right click. Select design mode. Right […]

Visual Studio: How to Resolve TestWindowPackage.Initialize Failure

Mon, 25 May 2015 15:06:13 +0000

I began to receive the error message box in Visual Studio after a restart from an install of an unrelated to test Visual Studio plugin (which I have used in the past): The ‘TestWindowPackage’ package did not load correctly.  … examining the file … AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml Looking at that log showed these errors: TestWindowPackage.Initialize failed with […]

WPF : A Future Xaml Home For LOB and IE

Tue, 14 Oct 2014 11:37:21 +0000

I was recently asked to provide my humble opinion on the future of WPF , literally how it should it be charted going forward. This is my utopian vision for WPF going forward. I am going to answer that question as if I had received the the Wonka Golden Ticket and was able to go to […]

WCF: Creating Custom Headers, How To Add and Consume Those Headers

Mon, 31 Mar 2014 20:26:52 +0000

When creating a C# WCF service (version .Net 3.0 and above) there may be a value in identifying the clients (consumers) which a web service is providing operational support to. This article demonstrates in C# and config Xml how to have clients identify themselves and pass pertinent information within the soap message’s header. That information […]

C#: ToString To Report all Properties Even Private Ones Via Reflection

Tue, 18 Mar 2014 18:34:58 +0000

At some point one needs to view all the properties of an instance outside of a debugger such as for a unit test reporting the results or possibly a console application informing its status to the output. To achieve the results one overrides ToString() and by hand writes the information of the instance’s properties and […]

Azure Build: How to Enable A Build Definition in Visual Studio

Fri, 14 Feb 2014 04:54:37 +0000

  In Visual Studio 2013 one may run into this error  when getting a build running with Windows Azure online TFS. Team Foundation Error TF215079: The build definition NexusTFS_CD is disabled. Enable the build definition and try again. Here are two things to look for/ to do. But both of the items require one to […]

Azure: Failed to Create Web Site in Visual Studio Using Azure

Sun, 09 Feb 2014 17:01:39 +0000

If you have a valid azure account but receive this message in Visual Studio 2013 (or 2012 with the Azure toolkit installed) while trying to create a website This subscription is not registered to use the following resources: Website. The remote server returned an unexpected response: (400) Bad Request. Here are the steps to fix […]