Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T. BizTalk
Turning off .NET security
When you're developing .NET apps the .NET security can be a right pain in the butt, so to avoid any more head aches you can simply turn it off by using the caspol utility eg: caspol -s off While this is somewhat overkill (much like cutting your toe nails with a sythe), it certainly gets you up and running in no time. However the problems come when you start moving from your dev platform, onto testing & prod environments. But hopefully with you'll implement a more thorough approach. This works ......

Posted On Friday, December 2, 2005 10:03 AM

"Error 1308. Source file not found" occurs when installing MSDN Library
This error occurs if you try to install the MSDN library using a network or localdrive install - where you've copied the content of the CD's/ISO's into separate directories, eg: c:\msdn_2005Oct_disc1c:\msd... To solve this problem, copy the contents of all dirs into 1, eg just copy the Program Files directory from all other disc dirs (in this example (c:\msdn_2005Oct_disc2 & c:\msdn_2005Oct_disc3) into the first disc dir (c:\msdn_2005Oct_disc1). Then re-run the ......

Posted On Wednesday, October 19, 2005 10:57 AM

Config error: Failed to deploy Biztalk system assembly... DefaultPipelines.dll
When running the config wizard for BizTalk2004 (on windows 2003) the following error occurred: Failed to deploy Biztalk system assembly "C:\Program Files\Microsoft BizTalk Server 2004\Microsoft.BizTalk.Defa... Unspecified exception: Unable to generate a temporary class (result=1). error CS2001: Source file 'C:\WINDOWS\TEMP\dbqvusoe.0... could not be found. error CS2008: No inputs specified. The solution is to give the 'NETWORK SERVICE' user read and write access to the c:\windows\temp ......

Posted On Thursday, July 7, 2005 10:49 PM

Failed to enable the Single Sign-On (SSO) Service (error code 0x80070005)

This is caused when trying to configure Biztalk 2004 on a Win XP box with SP2.

This is resolved with this:;en-us;841893

Posted On Wednesday, July 6, 2005 10:09 PM

VS2010 debugger catching AssertFailedException instead of running and failing tests
When workig on a project in VS2010 and performing a "run tests in context" the debugger was catching and halting on a test that fails, raising the exception AssertFailedException. I thought this was strange as the same test (in fact any test) that failed in VS2008 would simply just be noted in the test results as Failed... Turns out it's the way I've been running tests.. Both VS2008 and VS2010 have the same shortcut mappings: - "ctrl-r, t" for "Run tests in context" - "ctrl-r, ctrl-t" for "Debug ......

Posted On Wednesday, July 28, 2010 9:18 PM

Turning on code coverage/instrumentation in a TFS Build
This requires a testrunconfig file that has been configured correctly. To do this I did the following: In VS2008, right click on Solution Items folder and select Add - New Item... Select Test Run Configuration and enter the name WithCodeCoverage.testruncon... Open/edit this file in VS. Select the 'Code Coverage' item on the left, then selected (checked) the assemblies I wanted to instrument Click Apply to save these changes. Note that you can select which is the active test run configuration from ......

Posted On Tuesday, June 16, 2009 11:32 PM

How to determine assembly and .NET CLR runtime versions at runtime.
This really very simple, once you know how.... To get the version of the currently running assembly: System.Reflection.Assembly assembly = System.Reflection.Assembly.... assemblyName = assembly.GetName();Version assemblyVersion = assemblyName.Version; To get the version of the CLR runtime: Version CLRVersion = Environment.Version; ......

Posted On Tuesday, March 28, 2006 3:14 PM

Serialization: How to serialize and deserialize using C# .NET
Serialize (convert an object instance to an XML document): // Assuming obj is an instance of an objectXmlSerializer ser = new XmlSerializer(obj.GetType()... sb = new System.Text.StringBuilder()... writer = new System.IO.StringWriter(sb);... obj);XmlDocument doc = new XmlDocument();doc.LoadXml(s... Deserialize (convert an XML document into an object instance): //Assuming doc is an XML document containing a serialized object and ......

Posted On Thursday, February 9, 2006 2:59 PM

How to turn on unit testing in your TFS build
The following will make your builds (running on a TFS Server) execute your unit tests after the build: Open your build file (eg TFSBuild.proj). VS2008 has a nice xml editor for this. Search for the RunTest node and change it from: <RunTest>false</Ru... to: <RunTest>true</Run... Look for a section that starts with: <ItemGroup> <!-- TEST ARGUMENTS ... and add nodes within this (after the comments and before the closing of the ItemGroup node) - one entry for each ......

Posted On Tuesday, June 16, 2009 10:54 PM

Task Oriented Programming
For some time I've been wondering if there's a better way to program business logic. Years ago I used to write COBOL, then moved onto a 4GL, bla bla bla... and today I find myself well entrenched in OO with Microsoft's .Net. Development times don't seem to be much better these days - and the complexity of things seems to have mushroomed. We went from barely-a-3GL to 4GL back to 3GL plus an explosion of things you need to consider. We started with procedural code then moved to OO and seem to have ......

Posted On Tuesday, September 9, 2008 12:10 AM

VS Collection Manager location. Registering/enabling html help collections.
Use the Collection Manager to enable/disable which html help collections are available to your Visual Studio IDE (dynamic help etc). For VS.NET 2003 use: ms-help://MS.VSCC.2003/VSCC... For VS2005 use: ms-help://MS.VSCC.v80/dv_vs... For more info see the FAQ at the Helpware Group's web site. HTH Tim ......

Posted On Thursday, July 13, 2006 8:52 AM

Case insensitive XPath

XPath statements are case sensitive.  To get around this use the following example to convert all data to lower case before performing the equality check:

/bookstore/book[translate(@category, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = '" + searchtext.ToLower() + "']

Thanks very much to Harish for this!

Posted On Thursday, July 6, 2006 11:01 AM

Error (m_safeCertContext is an invalid handle.) when accessing a client certificate using .NET 2.0/VS2005
This error (m_safeCertContext is an invalid handle.) occurs when you try to access a client cert (or a member of the cert) from a ASP.NET 2.0 application developed using VS2005 eg: X509Certificate cert = new X509Certificate(Request.Cli... certSerial = cert.GetSerialNumberString(); The error is thrown because no valid certificate is found. This can be caused by either: A problem with the cert. A common reason for this in a development environment is one of the cert properties ......

Posted On Tuesday, April 18, 2006 1:58 PM

Log4Net - writing to windows event log with ASP.NET
I found that there were a couple of things required to get this working - over and above the samples shown here. To initialize Log4Net and to tell it to load it's configuration from the web.config file add the following line to the Application_Start method within Global.aspx: log4net.Config.XmlConfigura... To make sure all unhandled exceptions are logged add the following line to the Application_Error method within Global.aspx: Log.Fatal("An uncaught exception occurred", this.Server.GetLastError())... ......

Posted On Thursday, April 13, 2006 7:48 AM

Copyright © Tim Huffam | Powered by: