Tuesday, July 28, 2009

Itinerary Service For Messaging Extender

Step 1 - Creating a new Itinerary Service
Add Reference Microsoft.Practices.ESB.Itinerary from Microsoft BizTalk ESB Toolkit 2.0\Bin

implement Microsoft.Practices.ESB.Itinerary.IMessagingService.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.ESB.Itinerary;
using Microsoft.BizTalk.Component.Interop;
using Microsoft.BizTalk.Message.Interop;

namespace Sandbox.ESB
{
class LoggingService: IMessagingService
{
public IBaseMessage Execute(IPipelineContext context, IBaseMessage msg, string resolverString, IItineraryStep step)
{
throw new NotImplementedException();
}

public bool ShouldAdvanceStep(IItineraryStep step, IBaseMessage msg)
{
throw new NotImplementedException();
}

public string Name
{
get { throw new NotImplementedException(); }
}

public bool SupportsDisassemble
{
get { throw new NotImplementedException(); }
}
}
}






The following site http://msdn.microsoft.com/en-us/library/ee250158%28BTS.10%29.aspx explains each of the following methods that need to be implemented



Step 2 Add the Itineray Service to the ESB.config



<itineraryService id="00000000-0012-0004-1973-000000000001" name="Sandbox.ESB.Services.Logging" type="Sandbox.ESB.LoggingService, Sandbox.ESB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=354cb85f9213cd3b" scope="Messaging" stage="AllReceive"/>



Step 3



Now in visual studio drop a Itinerary Service, select the Itinerary Service Extender to be Messaging Messaging Extender...







When you go to chose the Service Name your Service should appear in the drop down list. If not it is possible that the ESB is configured to be using the SSO. Since the esb.config has changed, SSO does not automatically update itself. Go to Microsoft BizTalk ESB Toolkit 2.0\Bin\ESBConfigurationTool.exe and unconfigure and reconfigure SSO or just point to the file configuration source.



Sunday, May 10, 2009

logon profile not working

If you experience these windows vista errors:

Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, and that your network is functioning correctly.
Windows cannot load the user's profile but has logged you on with the default profile for the system.
Windows cannot load the locally stored profile. Possible causes of this error include insufficient security rights or a corrupt local profile.
The winlogon notification subscriber failed a notification event.
The winlogon notification subscriber failed a critical notification event.
The content source cannot be accessed.
The winlogon notification subscriber failed a notification event.

Solution to fix your user profile
http://www.vistax64.com/tutorials/130095-user-profile-service-failed-logon-user-profile-cannot-loaded.html

Regards

Tuesday, May 5, 2009

Java Development

If you ever have to do some java development, how do you get started?
Development
IDE: http://www.netbeans.org/
hosting java web applications is done via glassfish (https://glassfish.dev.java.net/ ) on the dev machine this should be automatically be installed with netbeans IDE.

Test and Production
Install Sun GlassFish Enterprise Server (formerly Sun Java System Application Server) http://www.sun.com/software/products/appsrvr
Download http://java.sun.com/javaee/downloads/index.jsp?userOsIndex=6&userOsId=windows&userOsName=Windows
Installation bug when trying to run glassfish as a service. http://wiki.glassfish.java.net/Wiki.jsp?page=FaqRunAsWindowsService

Deploying web application to Test and Production
Right click on solution and select Clean and Build

Navigate to your solution\dist directory a filename.war will be created this is the equivalent to an msi file. Login to glassfish admin

Navigate to web applications and select deploy

Browse to .war file and select OK

Thursday, April 2, 2009

Windows Service Installer

Creating Sample Service

Bellow are the steps required to create the sample .NET Service

  1. Startup Visual Studio, and select the C Sharp node under Project Types. Under Templates, select Windows Service and name the project MyWinService.
  2. Under Solution Explorer, select the file name Service1.cs, and change it to MyWinService.cs under Properties section.
  3. Open MyWinService.cs in design mode. Right-Click on the design area and choose Add Installers. This will place two components called ServiceProcessInstaller1 and ServiceInstaller1 onto the design area.
  4. Select ServiceInstaller1, change its name to MyWinServiceInstaller. Also change the ServiceName from Service1 to MyWinService.
  5. Select ServiceProcessInstaller1, and change its name to MyWinServiceProcessInstaller.

Create Setup Project

  1. On the Solution node right click and Add-> New Project.
  2. In Add New Project dialog, navigate to Project Types->Other Project Types->Setup and Deployment and select Template Setup Project. Set Name to MyWinServiceInstaller.
  3. Right click on MyWinServiceInstaller and select Add->Project Output.
  4. In Add Project Output Group dialog select MyWinService Project in the drop down list and select Primary output.
  5. Create Custom action by right clicking on MyWinServiceInstaller->View->Custom Actions. The Custom Actions tab will appear. Custom actions will install/uninstall the service instead of manually running installutil.
  6. Right click on Install->Add Custom Action. In the Select Item in Project dialog navigate to Application Folder->Primary output from MyWinService.
  7. Repeat step 6 for uninstall.

Build install project and install msi.

Thursday, March 26, 2009

Installing Vista x64 Ultimate on Dell XPS 1730

I was trying to install Vista x64 Ultimate onto a Dell XPS 1730. The first part of the installation went fine until it rebooted to complete the installation. Every time vista got to loading crcdisk.sys it would crash and give me a blue screen of death. The blue screen would pop up and disappear so fast that I didn't have a chance to see the error (I wish they placed a wait until a keyboard hit occurred).

I eventually sorted out the issue by using Vista x64 with SP1 cd to reinstall the OS, problem solved.

Thursday, March 19, 2009

Web Source Control

I was looking for non centralized source control solution. I first started looking at LiveMesh (may still be an option for private code). LiveMesh works on the principle that you have LiveMesh syncfolder. When you place a file or modify an existing file in the syncfolder it gets uploaded to the cloud and will sync with all your other devices that point that sync folder.

Source Control Repositores file system
CVS repositores works by creating a managed file for each source file added to the repository.
SVN (Subversion) works by creating Berkley database.

So for the purpose of using LiveMesh, CVS would be a better solution. Since only modified files would get synced. But that would be mean the whole repository would have to be synced on every new machine which sometimes would not be what you want.

So I started to investigate other solutions which would not use LiveMesh due to its limitations. So I started to look around and found some free webhosting + SVN (http://www.svnhostingcomparison.com/). Is it what I wanted? Almost, the only draw pack is the ones for free are open source meaning anyone can come along and see your code.

So I chose Google code to see how things worked.

How to set things up
Server Side
Create your self a google code account by going to http://code.google.com/hosting/ and select Sign in to create a project. You will need to create a new project. Once you have your project created go to the Source tab and there will be instructions on how to connect to the newly created project repository.
If you want to host it on your on server use http://www.visualsvn.com/server/ , watch the video http://www.visualsvn.com/visualsvn/demo/
Client
No you need a way to connect to the repository so can use of the followinghttp://tortoisesvn.net/ - integrates into windows explorer
http://www.rapidsvn.org – similar to wincvs stand alone application.

Visual Studio Pluggins
http://ankhsvn.open.collab.net/ - free
http://www.visualsvn.com/visualsvn/ - cost $50

Biztalk 2006 R2 - fatal error X1001: unknown system exception

One of those weird errors that Biztalk SDK and Visual studio 2005 has thrown up.The error occurs when trying to create an orchestration with a receive port that has multiple operations in the orchestration.



Each receive shape property Activate is set as true. This lets the orchestration receive different message types in any given order using correlation.The error occurs when you have not set one of the receive shapes Initializing Correlation Sets.

Visual Studio should have shown an activation correlation is required error instead of unknown system exception.