Visual Studio 2012 – Install Shield LE Basic Tutorial

Starting Visual Studio 2012, the Setup project for Visual Studio is not supported anymore and the only free alternative is to use the Install Shield Limited Edition (LE).

In this post, I will describes the steps to successfully:

A. Deploy a project to GAC (Global Assembly Cache)

B  Generate/pacakage Single MSI for installation

 

Steps:

1. Start by downloading the Install Shield here. And installing it.

2. Next is to create a new install shield limited edition project.

3. Follow the wizard, and in the step 2, right click the destination computer and select [GlobalAssemblyCache]

4. Drag and drop the Primary output from the Solution (top pane).

5. Go to every item in the [GlobalAssemblyCache], right click Dependencies from scan at build. Be sure to unselect other reference assemblies so it will not be registered in GAC.

Single MSI Generation:

6. Now to create a single MSI setup, Go to step 6 (Releases), Select the Single Image. In the build tab, Set compression = compressed, and on the Setup.exe tab set the Setup Launcher to No.

7. Right click the Solution, then select Configuration Manager, in the InstallShield project set the configuration to Single Image. Then Right click Install Shield project – > Build.

8. Go to Install Shield Project – > Express – > Single Image – > DiskImages -> Disk1. Viola. the MSI can be found there.

 

 

 

Advertisements

ESB Toolkit overrides BizTalk config (BTSNTSvc.exe.config)

I’ve setup a BizTalk Server 2013 environment with ESB Toolkit 2.2 and since I use Enterprise Library for logging I also updated the BTSNTSvc64.exe.config file, but when I tried to run a sample application it throws an error:

Activation error occured while trying to get instance of type LogWriter, key “”:Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type LogWriter, key “” —> Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = “Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter”, name = “(none)”.

Exception occurred while: while resolving.

Exception is: InvalidOperationException – The type LogWriter cannot be constructed. You must configure the container to supply this value.

Apparently, ESBToolkit is overriding the BizTalk configuration.

Solution:

Move the configuration to <ESB Toolkit Installation Folder>\esb.config file.

BizTalk: How to fix regional settings problem (decimal number formatting)

The regional settings of the operating system wherein your BizTalk Server is hosted, affects how the numbers/date are formatted. This in some cases, becomes a problem when trying to insert data in SQL Server using WCF-SQL.

For instance if the server is setup to use Dutch regional settings, the decimal number is separated by (,) comma. When you try to insert a data for instance 10.001, it becomes 10001. To fix the problem, you need to change the regional settings of the service account wherein the host instance is running.

Basically there are two things you can do.

One is to logon the account -> Go to regional settings -> Change the number formatting.

Now, if it’s impossible to login the account, you can fix it by changing the registry settings, for this you need the SID of the user account.

Updating Regional settings of an account using registry:

1. Open Regedit.

2. To get the SID, navigate to HKLM\SOFTWARE\Microsoft\Windows NT\ProfileList

Browse to every folder below and using the value in ProfileImagePath, you can determine the correct user account.

Then use the SId of the folder.

3. Once you have the GUID, browse to: HKEY_USERS\<SID in step 2>\Control Panel\International

Change the string values, for Decimal, change the sDecimal value.

 

BTDF: System.OutOfMemoryException while deploying using Powershell Remoting

Recently when I tried to deploy a BizTalk solution packaged with BTDF (BizTalk Deployment Framework) in combination with Powershell Remoting I encountered this error:

Error: Failed to add resource(s).

Change requests failed for some resources.

BizTalkAssemblyResourceManager failed to complete end type change request.

Exception of type ‘System.OutOfMemoryException’ was thrown.

 

I checked the memory on the remote server and even restarted it but it didn’t help, I still encounter this error.

As it turns out, as well as I’ve suspected it’s the memory of the powershell. To increase the size of the memory, run the PowerShell Command prompt on the target server and enter the ff:

Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 512

Or set it even to higher.

 

 

NFS: How to connect to NFS using Windows Server 2008 R2 without using User Mapping Server

When connecting to NFS shared folder the windows credentials needs to be mapped to a equivalent unix account+ group. 

In Windows Server 2008 R2 the support for User Mapping is dropped and the same functionality can only be achived using Identity Management for Unix Components (extension schema for Active Directory).

Below describes on how you can connect to a NFS folder without using User Mapping Server.

A. Install NFS Client

Step 1. Enable File Services Role. Go to Server Management – > Add Roles -> File Services

Step 2. Install Services for Network File System. Go to File Services – > Add Role Services

 

B. Update NFS Client Registry

In this step, we are going to map the anonymous user credential to the unix account credential that you’ll be using to connect to NFS share. First you need to get the User Id and Group Id of the unix account from the unix administrator. It should be of decimal value like: UserId= 6500000 GroupId=4200. Once you have it, we can proceed.

1. Open Regedit.

2. Go to \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default.

3. Create 2 DWORD value, one for AnonymousUid with decimal value=<User Id> and another for AnonymousGid with decimal value=<GroupId>.

It should look like this:

4.  Restart the NFS Client. Go to Administrative Tools -> Services for Network File System (NFS) ->

C. Test NFS Connection

1. Open command prompt.

2. Type:  mount -u:<UserName and not UserId> -p:<Password> <SharedNFSFolder> <drive letter to mount, Ex: J:>

3. dir <drive letter:>

Copy file to this NFS folder. This is only way to confirm that the registry hacking is successfully. Because by default if the anonymous access is turned on in NFS side, you can see the files without having to supply user/password.

Note: Limitation is that, you can only connect to a single NFS share because it would use the same UserId and Group Id everytime you connect.

BizTalk Property Promotion : MessageDataPropertyBase vs MessageContextPropertyBase

When adding a property schema that can either be used for content-based routing (CBR) or just to hold metadata information about a message in BizTalk we are confronted which Property Schema Base to use:

1. MessageDataPropertyBase
2. MessageContextPropertyBase or
3. PartContextPropertyBase

Answer is quite simple:

If the promoted property can be found in the source (incoming) message you need to use MessageDataPropertyBase.

If the property can be set in envelop, pipeline or manually promoted in the orchestration using Correlation Sets then MessageContextPropertyBase is used.  This is also a useful technique if we want to maintain the original structure of the message and at the same time inject some properties that can be used in tracking or routing.

Lastly, suppose if I have a source message without a namespace and I need to map it to my internal schema with promoted properties how will I do it?

1. Create a custom receive pipeline with Set Namespace in Component in Decode Stage. Add an XML Disassembler with schema equals to the source schema with the expected namespace.

2. Add a Map, map source to internal schema (this should contain attribute/fields that will be promoted).

3. Add a Property Schema, question is, which Property Schema based to use?

4. Update internal schema to map the fields to promoted properties.

Note: I used  MessageContextPropertyBase in Step # 3 and it works.