You can set File receive location adapter variables either programmatically or by using the BizTalk Server Administration console.
How to Configure a File Receive Location Programmatically
The File adapter stores its configuration information in the SSO database. You can set this configuration information programmatically by using the BizTalk Explorer object model. The BizTalk Explorer object model exposes the IReceiveLocation configuration interface that contains the TransportTypeData read/write property. This property accepts the File receive location configuration property bag in the form of a name/value pair XML string.
The TransportTypeData property of the IReceiveLocation interface does not have to be set. If it is not set, default values for the File receive location configuration are used.
The following table lists the configuration properties that you can set programmatically for the File receive location.
|
Property name
|
Type
|
Description
|
Restrictions
|
Comments
|
|---|
|
FileNetFailRetryCount
|
Long
|
The number of attempts to access the receive location on the network share if it is temporarily unavailable.
|
Integer
Minimum value: 0
Maximum value: MAX_LONG
|
If not specified, the default value is set to 5 times.
|
|
FileNetFailRetryInterval
|
Long
|
The retry interval in minutes between attempts to access the receive location on the network share if it is temporarily unavailable.
|
Integer
Minimumvalue: 0
Maximum value: MAX_LONG
|
If not specified, the default value is set to 5 minutes.
|
|
BatchSize
|
Long
|
The number of files this receive location can submit to the server at one time.
|
Integer
Minimum value: 1
Maximum value: 256
|
If not specified, the default value is set to 20 files.
|
|
FileMask
|
String
|
The file mask used by the receive location.
|
String
The length of the FilePath and FileMask combined cannot exceed 256 characters.
|
If not specified, the default value is set to *.xml.
|
|
FilePath
|
String
|
The path of the folder monitored by the receive location.
|
String
Required
The length of the FilePath and FileMask combined cannot exceed 256 characters.
|
Must be specified
|
|
Username
|
String
|
User name for account used to access folder.
|
Min length: 0
Max length: 256
|
If neither username or password are specified, host credentials are used.
If null (vt=”1”) then the value stored in configuration database is used.
|
|
Password
|
String
|
Password for account used to access folder.
|
Min length: 0
Max length: 256
|
If neither username or password are specified, host credentials are used.
If null (vt=”1”) then the value stored in configuration database is used.
|
The following code shows the format of the XML string you use to set the properties:
<CustomProps>
<FilePath vt="8">C:\Temp</FilePath>
<BatchSize vt="19">20</BatchSize>
<FileMask vt="8">*.xml</FileMask>
<FileNetFailRetryCount vt="19">5</FileNetFailRetryCount>
<FileNetFailRetryInterval vt="19">5</FileNetFailRetryInterval>
<Username vt=”8”>MyDomain\MyUsername</Username>
<Password vt=”8”>PASSWORD</Password>
</CustomProps>
How to Configure a File Receive Location with the BizTalk Server Administration Console
To configure the receive location by using the BizTalk Server Administration console, use the following procedure.
Note |
|---|
|
Before completing the following procedure you must have already added a one-way receive port. For more information, see How to Create a Receive Port.
|

To configure receive location variables for a File receive location
-
In the BizTalk Server Administration console, expand BizTalk Server 2006 Administration, expand BizTalk Group, expand Applications, and then expand the application you want to create a receive location in.
-
In the left pane, click the Receive Port node. Then in the right pane, right-click the receive port that is associated with an existing receive location or that you want to associate with a new receive location, and then click Properties.
-
In the left pane of the Receive Port Properties dialog box, select Receive Locations, and in the right pane double-click an existing receive location or click New to create a new receive location.
-
In the Receive Location Properties dialog box, in the Transport section next to Type, select FILE from the drop-down list, and then click Configure to configure the transport properties for the receive location.
-
In the FILE Transport Properties dialog box, do the following:
|
Use this
|
To do this
|
|---|
|
Receive folder
|
Required. Specify the path to a folder on the file system or network share where the file receive handler reads files. You can enter the path directly in the Receive folder text box or select it from the file system by navigating to the folder with the Browse button. When browsing for the folder in the Browse For Folder dialog box you can also create a new folder by clicking Make New Folder.
Type: String
Note
Do not set the Receive folder property to a folder that uses the NT Distributed File System with a symbolic link. If you are using an NT Distributed File System, you can only use folders with straight network paths in File Adapter Receive Locations.
For more information about restrictions on the receive folder property, see Restrictions on the Receive Folder and Destination Location Properties.
Note
The URI for a send port or receive location cannot exceed 256 characters.
|
|
File mask
|
Required. Specify the mask for the files. This mask can contain the standard wildcard value "*".
Default value: *.xml
Type: String
For information about restrictions on this property, see Restrictions on the File Mask and File Name Properties.
|
|
Public address
|
Specify the public address of this location. BizTalk Server exposes this address to external partners.
If this property is not specified, the runtime engine replaces it as:
file://<Receive folder>/<File mask>
The value for this property requires an adapter prefix.
Type: String
Minimum length: 0
Maximum length: 256
|
|
Retry count
|
Specify the number of attempts to access the receive location on a network share if it is temporarily unavailable.
Default value: 5
Type: Long
Minimum value: 0
Maximum value: MAX_LONG
|
|
Retry interval (min)
|
Specify the retry interval time (in minutes) between attempts to access the receive location on the network share if it is temporarily unavailable.
Default value: 5 minutes
Type: Long
Minimum value: 0
Maximum value: MAX_LONG
|
-
On the General tab, click Advanced Settings, and in the Advanced Settings dialog box, do the following:
|
Use this
|
To do this
|
|---|
|
Rename files while reading
|
Specify whether to rename files before picking them up for processing. For more information about using this option, see File Adapter
Note
This option replaces the equivalent functionality that was available in BizTalk Server 2004 through the RenameReceivedFiles registry key entry. If you have upgraded from BizTalk Server 2004 to BizTalk Server 2006, you will need to apply this setting in place of the registry key.
Default Value: False
Type: Boolean
|
|
Polling interval (ms)
|
Specify the interval in milliseconds that the File adapter will poll the specified location for new files.
Note
This option replaces the equivalent functionality that was available in BizTalk Server 2004 through the FileReceivePollingInterval registry key entry. If you have upgraded from BizTalk Server 2004 to BizTalk Server 2006, you will need to apply this setting in place of the registry key.
Default Value: 60,000
Type: Int
Minimum value: 1000 (set to 1 to disable polling)
Maximum value: 4294967295
Note
File adapter polling cannot be disabled but by setting the interval to the maximum value of 4294967295 milliseconds, polling will only occur once every 49.7 days.
|
|
Retry count
|
Specify the number of times that the File adapter will attempt to delete a file that it has read and submitted to BizTalk Server.
Note
This option replaces the equivalent functionality that was available in BizTalk Server 2004 through the RemoveReceivedFileRetryCount registry key entry. If you have upgraded from BizTalk Server 2004 to BizTalk Server 2006, you will need to apply this setting in place of the registry key.
Default Value: 5
Type: Int
Minimum value: 0
Maximum value: 100
|
|
Retry interval (ms)
|
Specify the initial interval in milliseconds that the File adapter waits before attempting to delete a file that it has read and submitted to BizTalk Server. This interval will double after each retry interval up to the specified maximum retry interval value.
Note
This option replaces the equivalent functionality that was available in BizTalk Server 2004 through the RemoveReceivedFileDelay registry key entry. If you have upgraded from BizTalk Server 2004 to BizTalk Server 2006, you will need to apply this setting in place of the registry key.
Default Value: 10
Type: Int
Minimum value: 1
Maximum value: 1000
|
|
Maximum retry interval (ms)
|
Specify the maximum retry interval time in milliseconds that the File adapter waits before attempting to delete a file that it has read and submitted to BizTalk Server.
Note
This option replaces the equivalent functionality that was available in BizTalk Server 2004 through the RemoveReceivedFileMaxInterval registry key entry. If you have upgraded from BizTalk Server 2004 to BizTalk Server 2006, you will need to apply this setting in place of the registry key.
Default Value: 300000
Type: Int
Minimum value: 1000
Maximum value: 900000
|
-
Click OK.
-
On the Authentication tab, in the File Transport Properties dialog box, do the following:
|
Use this
|
To do this
|
|---|
|
Use these credentials when host does not have access to network share
|
Specify to use alternative credentials when the host instance for the File adapter does not have the necessary rights to a network share. This option is only valid when accessing a network share.
Default Value: False
Type: Boolean
|
|
User name
|
Specify the user name that has access to the network share.
Type: String
Note
If multiple receive locations mapped to the same network share are configured with alternative credentials, then the same credentials must be used for all of the receive locations. Windows does not allow you to make multiple connections to a shared network server from the same computer if you attempt to use more than one set of credentials.
|
|
Password
|
Specify the password for the account that has access to the network share.
Type: String
|
-
In the File Transport Properties dialog box, on the Batching tab, do the following:
|
Use this
|
To do this
|
|---|
|
Number of messages in a batch
|
Specify the maximum number of messages to be submitted in a batch.
Default Value: 5
Type: Int
Minimum value: 1
Maximum value: 256
|
|
Maximum batch size (in bytes)
|
Specify the maximum total bytes for a batch.
Default Value: 102400
Type: Int
Minimum value: 1024
Maximum value: MAX_LONG
|
The File adapter will limit the batch to whichever value is reached first, maximum number of messages or maximum allowed bytes.
-
Click OK.
-
Enter the appropriate values in the Receive Location Properties dialog box to complete the configuration of the receive location and click OK to save settings. For information about the Receive Locations Properties dialog box, see How to Create a Receive Location.

See Also