Free BizTalk Message Archiving – SQL / File

Most of the common problem building solutions in BizTalk is how to create a lightweight archiving solution.

Below is the open source solution that supports both File and/or SQL archiving.

http://biztalkarchiving.codeplex.com/

IIS 7 The protocol ‘net.tcp’ is not supported, Enabling net.tcp in IIS using WAS

Without the proper configuration, IIS will throw the error below wheneven you try to use net.tcp:

The protocol ‘net.tcp’ is not supported

Below is the configuration on how you can enable net.tcp in IIS 7.

1. Add WCF Activation, to do this go to Server Management -> Features -> Click Add Features

2. After installing the WCF Activation it may throw an error:

Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’

To fix it, open the command prompt (Run as administrator) and enter the ff:

 C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -iru

3. Issue an iireset on command prompt.

4. Go to the Web Site -> Right Click -> Edit Bindings – > Click Add, in the type select net.tcp and in the binding information set it to 808:*

5. Go to the Web Site -> In the Actions Pane click Advance Settings  -> In the Behavior change it to http,net.tcp.

Repeat steps for every WCF Service Application (Virtual Directories) under the Web Site.

Event Log – System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security

Event Log – System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security

This is a common error specially if you’re using Windows Server 2008 and higher, error means that the application/program that’s trying to write to event log with source not registered properly. Take the sample code below as an example:

EventLog.WriteEntry(“,”Message”);

During the deployment you can register the source by entering the ff command in the command prompt (Run as Administrator):

eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO  /D “Registering”

If for some  reason you don’t know the source is and it’s throwing the error do the following:

Start -> Run -> regedit.exe Navigate to My Computer > HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog

in the Permissions, and grant the identity wherein the application/server is running with read/write permissions.

You will see the source that you need to register in the Event Log.

VS Setup – The version of the .NET Framework launch condition ‘.NET Framework 4’ does not match the selected .NET Framework bootstrapper package

I recently upgraded existing solution built using VS2008 to VS2010 and encountered the warning:

The version of the .NET Framework launch condition ‘.NET Framework 4’ does not match the selected .NET Framework bootstrapper package

To resolve it:

1. The .NET Framework version you have in Launch Condition should match with the 2. Prerequisites in Setup Properties.

 

Launch Condition:

Prerequisites:

SSIS How to copy files from one server to another

The common question is how to copy/move/delete files across shared folder using SSIS.
Quick answer is to use the File System Task for the actual file operations, but how about the permissions?
By default it assumes that the account the you’ll use to execute the package (SSIS) either the SQL Server Agent identity (using sql job) or account that executes DTExec have appropriate permissions on the source/destination server.

To get the identity of SQL Server Agent:

1. In the command prompt, type services.msc, this would open the list of all services on the server.

2.  In the list of services, look for SQL Server Agent, Right Click -> Properties. Go to Logon Tab

Using Proxy. If it’s other identity than the Agent:

1. In the Security -> Credentials -> Create new credentials (username and password)

2. then go to SQL Agent -> Proxies -> SSIS Package Execution -> Create a new Proxy and assign the credentials. Then on the sql job itself assign the Run as = proxy.

Using NET USE command, If you need to connect to multiple resources (shared folder) or doesn’t use SQL Server Agent.

Issue the NET USE command before the File System Task. Example syntax:

net use RPAULO\\SharedFolder /user:RPAULO\SSISUser

for NET USE command refrence, click here.