Wednesday, November 21, 2007

How to edit rich text in SharePoint 2007 forms

Since I have been using Window Live Writer, I have not had the need to write all of that html code (what is HTML?). I edit using Live Writer, and then I switch to HTML view, copy and paste the formatted text into the SharePoint text box. I thought it was weird that Microsoft will only give a blank text box and you need to go and figure out all of the markup tags.

Then I saw on this other developer screen that his text boxes look a lot different from mine..!!

Clicking on the
Click for help about adding HTML formatting.
just take you to the normal help, nothing useful there.

Well, I found out that it was just another x64 vs x32 bit kind of deal. Since moving to the 64bit bandwagon, I almost exclusively use Internet Explorer (64 bit). It is a great way to get to the Microsoft sites without being bogged down by all of the flash advertisement (oh yeah, those flash do not work on 64bit... ;)

However, there is a whole new world out there if you use the 32bit version of Internet Explorer.!!


Friday, November 16, 2007

How to install assembly to GAC on build event

I keep forgetting this line, and end up having to dig it out from other projects. I am putting it in here so that I can access it faster.

Basically, every time you build/rebuild your .NET assembly, it needs to be in the GAC for BizTalk to be able to use it. So, I put this code on the Build Events to move the assembly to the GAC.

"C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /i $(TargetFileName)
there. Now I won't forget.

Thursday, November 15, 2007


I had this issue, in which in one of my C# class, I had a enum type. Then I wanted to send a string to a method, which will populate this object. The problem was that the enum type was an integer, and I was passing a string down to the object.

    1 public enum ProductTypeEnum : int 
    2 {
    3     blue = 10,
    4     red = 20,
    5     green = 30
    6 } 

Here is the class that I was using to populate with values:

    1 public void GetDiscountTest_BLUE_Preferred()
    2 {
    3     OrderDetail inOrder = new OrderDetail();
    4     inOrder.ProductType = (Int32);
    5     inOrder.Quantity = 100;

Now, I wanted to replace the code with something like this:

    1 public void GetDiscountTest_BLUE_Preferred(string sColorName)
    2 {
    3     OrderDetail inOrder = new OrderDetail();
    4     inOrder.ProductType = ConvertToEnum(sColorName);
    5     inOrder.Quantity = 100;

Here is the code to accomplish that:
    1 public void WorkingDiscount(string sColorName)
    2 {
    3     OrderDetail inOrder = new OrderDetail();
    4     inOrder.ProductType = (Int32)Enum.Parse(typeof(ProductTypeEnum), sColorName);
    5     inOrder.Quantity = 100;

now I will remember this.

Tuesday, November 13, 2007

Biztalk 2006 R2 Upgrade gotchas?

I just finished upgrading to R2 on my Vista x64. So far everything seems to be running fine, except....

Business Rules Engine:

There is a new location for the assemblies now. On Biztalk 2006, the location for the BRE assemblies was this

c:\Program Files (x86)\Microsoft BizTalk Server 2006\Microsoft.RuleEngine.dll

However, after removing my 2006 version, and freshly installed the R2 version, I have to go and recompile all of my assemblies that had a reference to the Microsoft.RuleEngine. The new location is

C:\Program Files (x86)\Common Files\Microsoft BizTalk\Microsoft.RuleEngine.dll

Other than this, everything seems to be running smoothly (Orchestrations, pipelines, etc...) so far. I will update this post as I find any more gotchas (if any... ;)

Tuesday, November 06, 2007

My Biztalk Tools

For our group [Connected system] we started talking about what each of us was using to develop on BizTalk.

We come out with a list of tools. Here I am going to publish the tools that I have installed and that I used most of the time.

DebugView: of course this is the number one. ;) I like to use it with a filter, so that I only see the trace information that I send. For instance I pre-append the word: bts- to all of my trace.writelines.
System.Diagnostics.Trace.WriteLine(String.Format("bts- args: [{0}]", args));

DTC Tester Tool: this will test the configuration of your Distributed Transaction settings. It will come in handy when you have to setup BizTalk in multiple environments.

Biztalk Best Practice Analyzer tool: this will evaluate the installation of BizTalk. Helpful in those cases that you come into a client that has pre-installed BizTalk on their environment.

It not only analyzes your BizTalk installation, but it also give you the documentation as to why this is important. It also gives you the steps to go about fixing any problems that it find with your configuration.

SmartPaster: this is one of those ideas that one person implements, and now after using it a few times, I can't live without. Nice work.

CopySourceAsHtml: I use this add-in to html-encode my source code before I post it on my blog.

Biztalk Documenter: This tool out of codeplex is a good addition to that *finish* touch on your projects. One thing that I like about it is that it takes a snapshot of your orchestration and create the MSDN style documentation. It is also a great tool to document those BRE's. It creates a treeview like view of all your rules and their predicates. I run this during and at the end of the projects to document my artifacts and Business Rules Policies and Vocabularies.

Notepad 2: Another free tool that is in my list of AWESOME tools to use. No installation required and it provides all of the functionality needed from a simple editor. One of the features that I like the most of this editor is the fact that it can format XML and it has the Always On Top option.!! I love to be able to copy long xpath's from the Biztalk schemas and paste on this editor. Keeping it on top of the other windows, make it very useful.

FoxitReader: I am a big fan of NOT installing tools. Specially when I am at a customer site, and have to use their equipment. I love to put my thumb drive in and be able to use any of the the tools in there without having to install them. FoxIt has a small footprint, and it lighting fast to open any PDF document.

Process Explorer: Yet another jewel from SysInternals. This one is a better task manager. it is very useful to see some of the process that are running on the background, and some of those *hidden* programs on the network.

WebService Studio: I have talked about this tool in the past here. It is still my favorite tool to quickly test an asmx web service.

Database Publishing Wizard: good to get data to and from different sql servers. I used it primarily to get schemas from the customer environment to my vpc sandbox, so that I can reproduce whatever condition/data that they require.

XML Spy: Although it is a commercial tool, I love their grid representation for xml schemas and just plain xml data. I have been a fan of this product since XML Spy version 3.0...!!


Another cool feature of this tool is that it can instantiate Soap request into a web service.

HyperSnap: my screen capture tool of preference. I like the fact that you can capture a region and then you can save that snapshot to any of the major picture formats out there.

Beyond Compare 2: Windiff is child's play when you compare it to Beyond Compare 2. Download the 30-day and try it yourself. It allows you to visually pinpoint differences in 2 files down to the character that is not equal. It also provides editing within the comparison main screen, and it allows you to synch any changes from either of the files into the other one.

ReSharper 3.0: Last but not least my FAVORITE add-in for visual studio 2005.!! I started using this product back on DotNet 1.1, and I have been hooked on it ever since.