Thursday, March 8, 2012
Master Data Services (MDS) Rebuild Subscription Views
Wednesday, November 16, 2011
Master Data Services (MDS) error ERR210055 and how to solve it
Wednesday, October 13, 2010
WPF DataGrid Entity Framework 4.0
Tags: WPF, DataGrid, Entity Framework, Detached
When I populate the datagrid with linq + entity framework for example
myModel context = new myModel();
myDataGrid.ItemsSource = from a in context.Apples select a;
and then you create a new record via the DataGrid and you want to handle the event InitializingNewItem. You may want to check what the display order of apples is, you can not check via context as the record/s are detached so you have to look in items. The problem is that the new record is of type MS.Internal.NamedObject not Apple.
So you write the following LINQ query
var MaxDisplayOrder = (from Apple a in myDataGrid.Items select a.DisplayOrderNo).Max();
You run it and get the following error exception:
Unable to cast object of type 'MS.Internal.NamedObject' to type 'Apple'.
To solve this problem use OfType method
var MaxDisplayOrder = (from a in myDataGrid.Items.OfType<Apple>() select a.DisplayOrderNo).Max();
Monday, May 31, 2010
.Net 4.0 Framework GAC Location
The location of the GAC has split with .Net 2.0 – 3.5 Framework remaining where it is
C:\Windows\assembly
And the .net 4.0 GAC location is now
C:\Windows\Microsoft.NET\assembly
Monday, May 24, 2010
VirtualBox using Hyper-v VHD image
I was sick of using windows server 2008 r2 and wanted to move to window 7(now 10). After reading a few reviews it was clear that VirtualBox works very nicely. So I nstalled VirtualBox on a clean windows 7 machine and copied across a VHD. Setup the virtual machine to use an existing hard drive.
Select Next.
Select Memory.
Select Use an existing hard drive.
Select Add icon and select the desired VHD.
Upon starting the virtual machine I received the following blue screen of death:
Error Message A problem has been detected and windows has been shut down to prevent damage to your computer.
If this is the first time you’ve seen this stop error screen, restart your computer. If this screen appears again, follow these steps:
Check for viruses on your computer. Remove any newly installed hard drives or hard drive controllers. Check your hard drive to make sure it is properly configured and terminated. Run CHKDSK /F to check for hard drive corruption, and then restart your computer.
Technical information:
*** STOP: 0x0000007B (0x80786b58, 0xC0000034, 0x00000000, 0x00000000)
Solution
The issue is that hyper-v will only build a bootable IDE hard drive. So when you create your virtual machine you need to make sure that you are not booting the VHD under a SATA Controller
but instead use the IDE Controller
Wednesday, October 14, 2009
Unit testing SharePoint WSS 3.0 x64 bit
Problem
trying to MS unit test code on x64 bit OS with x64 bit WSS 3.0 installed
[TestMethod]
public void TestMethod1()
{
using (SPSite sp = new SPSite("http://localhost:13000/"))
{
Console.WriteLine("Site valid");
}
}
Error Message
Test method TestProject1.UnitTest1.TestMethod1 threw exception:
System.IO.FileNotFoundException: The Web application at http://localhost:13000/ could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add
a new request URL mapping to the intended application..
Solution
http://community.bamboosolutions.com/forums/t/8179.aspx
download nunit (only 32 bit). Nunit will automatically choose which JIT compiler to use to test the code.
Additional Stuff
Code modification to have both nunit and MS test running together
http://www.martinwilley.com/net/code/nunitmstest.html
#if !NUNIT
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Category = Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute;
#else
using NUnit.Framework;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using TestCleanup = NUnit.Framework.TearDownAttribute;
using TestContext = System.Object;
#endif
Sunday, August 9, 2009
Silent Install
As a contractor and also some of colleges, end up building a lot of virtual environments. So after installing Biztalk 2009 for the nth time. I decided to automate the Biztalk 2009 installation (and also Biztalk 2006 r2 and ESB 2.0 Toolkit). I started looking at some products that where available on line but nothing met my needs. The requirements that I was looking for:
autologin – some packages that are installed require reboot prior to continuing i.e. sql2008
config – all data to be stored in a config file and easily customizable.
non msi – not have to install it on a clean machine.
So I build Silent Install. Its still a work in progress but its stable enough to get the job done.
Benifits
· Same dev installation across all environments.
· No missing components.
· Reproducible production installs
Currently there are 4 options available:
· Install Biztalk 2006 R2 Dev on win 2003
· Install Biztalk 2009 Dev on win 2008
· Install Biztalk 2009 ESB Tool Kit 2.0
· Create Custom Install
Some installations require a reboot, so your credentials are required for auto login.
How things work
I create a vhd (Virtual Hard Disk) with all install files copied onto it (size is ~14GB I would like to put it on the net but due to the size and legal issues that will never happen).
The way it works is that you figure how to silently install each application by itself, create a batch and sometimes additional ini/xml data files as well. Once you have created each batch file you need to determine in which order to run them.
This is then stored in the app.config of Silent Install.
<Environment name="Biztalk2006 R2" Description="Install Biztalk 2006 R2 Dev on win 2003">
<applications>
<application order="1" value="IIS6" />
<application order="2" value="SQL2005" />
<application order="3" value="Visual2005" />
<application order="4" value="Visual2005Sp1" />
<application order="5" value="SQL2005Sp3" />
<application order="6" value="Reboot" />
<application order="7" value="Wss3Sp1" />
<application order="8" value="Biztalk2006R2" />
</applications>
</Environment>
<Environment name="Biztalk2009" Description="Install Biztalk 2009 Dev on win 2008">
<applications>
<application order="1" value="Powershell" />
<application order="2" value="Reboot" />
<application order="3" value="PowershellUnrestricted" />
<application order="4" value="IIS7" />
<application order="5" value="Office2007" />
<application order="6" value="Visual2008" />
<application order="7" value="Visual2008TeamExplorer" />
<application order="8" value="Visual2008Sp1" />
<application order="9" value="SQL2008" />
<application order="10" value="Reboot" />
<application order="11" value="SQL2008" />
<application order="12" value="Biztalk2009Prerequisites" />
<application order="13" value="Wss3Sp1" />
<application order="14" value="Biztalk2009" />
</applications>
</Environment>
<Environment name="Biztalk2009ESBToolKit20" Description="Install Biztalk 2009 ESB Tool Kit 2.0">
<applications>
<application order="1" value="Biztalk2009ESBToolKit20" />
</applications>
</Environment>
Installing/Progress Screen
Once the install button is clicked you will be directed to the progress tab and installation will start.
Running and things to do after install
Assumptions
Clean install of the OS and has been fully patch/updated.
Install Biztalk 2006 R2 Dev on win 2003
· prompted at start asking location of i386 dir (not sure where the registry setting for that is)
After install
· Configure Windows SharePoint Services (need to read and understand http://www.mindsharpblogs.com/ben/archive/2008/03/08/4411.aspx)
· Disable the Shared Memory Protocol (not sure where the registry setting for that is)
· Configure BizTalk Server
Install Biztalk 2009 Dev on win 2008
After install
· Configure Windows SharePoint Services
· Disable the Shared Memory Protocol
· Configure BizTalk Server
Install Biztalk 2009 ESB Tool Kit 2.0
· Guide on how to install ESB 2.0 toolkit
Future enhancements
· check if a program has already been installed.
· mount ISO