Gokul's Blog


Leave a comment

Windows 2008 server for VPC/ Virtual server?

While I was talking to someone regarding using a cut-down version of windows OS for my VPC, they were suggesting that I could try using windows Server 2008 (Core).

But based on a MS article it doesn’t seem to be a good fit.

Link to the article 

Content:

Server Core

Purpose

Server Core is a minimal server installation option for computers running on the Windows Server 2008 operating system. Server Core provides a low-maintenance server environment with limited functionality.

Where Applicable

Server Core is an installation option that is capable of five well-known server roles: File Server, DHCP Server, DNS Server, Media Services, and Active Directory. Server Core is not a development platform for new server applications. Although Server Core is not an application platform, it does support the development of management tools, utilities, and agents.

Server Core management tools, utilities, and agents fall into two categories: those that manage a server remotely, and those that run locally to manage the server or return data to a centralized management tool. Remote management tools should not require any changes to support Server Core, as long as the tool uses one of the remote protocols supported in Server Core, such as RPC. Local management agents and utilities may require changes to run properly on Server Core.

The minimal nature of Server Core creates limitations:

  • There is no Windows shell and very limited GUI functionality (the Server Core interface is a command prompt).
  • There is no managed code support in Server Core (all code must be native Windows API code).
  • There is limited MSI support (unattend mode only).
Developer Audience

Server Core is designed for use by network and file service infrastructure developers, server management tool and utility developers, and IT Planners.

Run-Time Requirements

Server Core requires Windows Server 2008 or later.


Leave a comment

View Orchestration Code in C#

BizTalk Orchestration Designer is the core tool for laying out components representing business processes, and connecting them with logic operations when designing BizTalk applications in Visual Studio. Behind the scene, the XLANG compiler actually generates C# source code before compiling it into .NET assemblies. If you ever want to look under the hood and view the C# source, here is a little trick.

Use your favorite registry editor (I simply use RegEdit.exe), go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0. This is where some key properties of Visual Studio 2005 IDE are stored. Add a DWORD value named “GenerateCSFiles”, and set the value to 1.

Next time you launch Visual Studio to open a BizTalk project with orchestration files (.odx file) in it, click on the “Show All Files” icon in the Solution Explorer after the project is built. You will see along side with your abc.odx file, there appears an abc.cs file. This is the C# source code generated by XLANG out of your orchestration. You can open the file and view all the code, assuming the compilation succeeded (otherwise the cs file is blank). You will notice all your orchestration artifacts are actually translated into one big chunk of XML embedded in the C# code.

Please follow this link for the original article and details regarding the author: Original Article Link


Leave a comment

Programmatically create an XML document from BizTalk Schema

programmatically create an XML document based on your XML schema? Or even better, what if you can use the schema that is validated and compiled by BizTalk and stored in the BizTalk management database?
This way you don’t have to worry about manually keeping the schema and the external XML file in synch since there is no external XML file any more. Any change you make in the schema is directly reflected in the Pipeline component when you build your new message. Well, it turns out that there is an undocumented API called “CreateXmlInstance” just for that. Here is the code snippet that does this.

using Microsoft.BizTalk.ExplorerOM;
using Microsoft.BizTalk.Component.Interop;
Add reference to the assemblies :
Microsoft.BizTalk.ExplorerOM ==> C:\Program Files\Microsoft BizTalk Server 2006\Developer Tools\Microsoft.BizTalk.ExplorerOM.dll,
Microsoft.BizTalk.Pipeline ==> C:\Program Files\Microsoft BizTalk Server 2006\Microsoft.BizTalk.Pipeline.dll

public XmlDocument CreateXmlDoc(string sSchemaName)
        {
            XmlDocument doc = new XmlDocument();
            BtsCatalogExplorer explorer = new BtsCatalogExplorer();

            explorer.ConnectionString = @"Integrated Security=SSPI; Server=localhost\SQL2005; Database=BizTalkMgmtDb;";
            Schema mySchema = explorer.Schemas[sSchemaName];

            if (mySchema != null)
            {
                DocumentSpec spec = new DocumentSpec(sSchemaName, mySchema.BtsAssembly.DisplayName);
                StringWriter sw = new StringWriter(new StringBuilder());
                doc.Load(spec.CreateXmlInstance(sw));
                sw.Dispose();
            }
            return doc;
        } 

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }



This code goes directly to the BizTalk management database, gets the specified schema, and then create an empty XML document based on the schema.

From here on, you can programmatically populate/manipulate the XML element/attribute values as needed. One thing to note is that this code is not entirely immune to changes either. If you add new elements/attributes to your schema (which is the case for most situations), the code will be fine since it simply creates blank values for the new fields. However, if you remove some elements/attributes, or make changes to existing elements/attributes, and if your subsequent processing code access them, you will have to modify the code to accommodate the changes.


Leave a comment

Edit Photos Online – Photoshop Express

Gone are the days when we have to install Photoshop and wait for our machines to load it up. Here comes Photoshop Express an awesome flash based tool from the makers of Photoshop Adobe.

They do give you a free 2 GB to store your photos. 🙂

While I was thinking Picasa was getting better, Windows live gallery was cool.

Here comes the Photoshop Express with a big bang :).

https://www.photoshop.com/express/index.html


Leave a comment

Todo List in Visual Studio

Add "Todo" in your comments and then you will be able to see the list of items using the Visual Studio menu item

View Menu  >> Task List (Ctrl+T, Ctrl+\). The window defaults to TaskList, change the drop down to Comments. You will see the list of Todo’s in that page.

If you have Resharper, though the file is closed you will be able to see the set of TODO’s.