Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Biz Talk Framework > WMI to create F...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 173 of 230
Post > Topic >>

WMI to create FTP Receive Location

by "=?Utf-8?B?RGFuIENhZ25leQ==?=" <DanCagney@[EMAIL PROTECTED] Nov 9, 2005 at 11:21 AM

I'm having an issue creating an FTP Receive Location using WMI.  The
location 
is created successfully, and the location even polls the FTP site, but
when I 
check the location's log that logs all of the FTP commands, the second to 
last command is LIST *.*, which returns the files I want to retrieve, and 
then a QUIT.  There is never a RETR.  If I create the exact same Receive 
Location using the BizTalk Explorer, it works correctly.  I have even 
compared the CustomCfg of both to make sure they are exact.  Are there
extra 
properties that need to be set that I'm missing?  Any help would be 
appreciated.  I am including the code I used to create the Receive
Location.
Thanks,

Dan

    Public Function CreateFTPReceiveLocation(ByVal inReceiveLocationName
As 
String, ByVal inReceive****tName As String, ByVal inHostName As String,
ByVal 
inServer As String, ByVal in****t As Integer, ByVal inFolder As String,
ByVal 
inFileMask As String, ByVal inRecLocStatus As ReceiveLocationStatus, ByVal

inUserName As String, ByVal inPassword As String, ByVal inMaxFileSize As 
Integer) As Boolean
        Try
            Dim objReceiveLocationClass As New 
ManagementClass("root\MicrosoftBizTalkServer", "MSBTS_ReceiveLocation", 
Nothing)
            Dim objReceiveLocation As ManagementObject = 
objReceiveLocationClass.CreateInstance()

            objReceiveLocation("Name") = inReceiveLocationName
            objReceiveLocation("Receive****tName") = inReceive****tName
            objReceiveLocation("AdapterName") = "FTP"
            objReceiveLocation("HostName") = inHostName
            objReceiveLocation("InboundTrans****tURL") = "ftp://" &
inServer 
& ":" & in****t & "/" & inFolder & "/" & inFileMask
            'objReceiveLocation("CustomCfg") =
"<CustomProps><AdapterConfig 
vt=""8""><Config xmlns:xsd=""http://www.w3.org/2001/XMLSchema""

xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""><uri>"
& "ftp://"
& 
inServer & ":" & in****t & "/" & inFolder & "/" & inFileMask & 
"</uri><serverAddress>" & inServer & "</serverAddress><server****t>" &
in****t 
& "</server****t><userName>" & inUserName & "</userName><password>" & 
inPassword & "</password><fileMask>" & inFileMask & 
"</fileMask><targetFolder>" & inFolder & 
"</targetFolder><representationType>binary</representationType><maximumBatchSize>0</maximumBatchSize><maximumNumberOfFiles>0</maximumNumberOfFiles><passiveMode>False</passiveMode><firewallType>NoFirewall</firewallType><firewall****t>21</firewall****t><pollingUnitOfMeasure>Seconds</pollingUnitOfMeasure><pollingInterval>60</pollingInterval><errorThreshold>10</errorThreshold><maxFileSize>0</maxFileSize></Config></AdapterConfig></CustomProps>"
            objReceiveLocation("PipelineName") = 
ConfigurationSettings.AppSettings("PipelineName")

            Dim options As New PutOptions
            options.Type = PutType.CreateOnly

            objReceiveLocation.Put(options)

            ReceiveLocationEnable(inReceiveLocationName, inRecLocStatus)

            System.Console.WriteLine("ReceiveLocation - " + 
inReceiveLocationName + " - has been created successfully")
            Return True
        Catch excep As Exception
            Throw New Exception("CreateFTPReceiveLocation - " + 
inReceiveLocationName + " - failed: " + excep.Message)
            System.Console.WriteLine("CreateFTPReceiveLocation - " + 
inReceiveLocationName + " - failed: " + excep.Message)
        End Try
 




 3 Posts in Topic:
WMI to create FTP Receive Location
"=?Utf-8?B?RGFuIENhZ  2005-11-09 11:21:51 
Re: WMI to create FTP Receive Location
"KOrnel" <kb  2005-11-12 11:52:12 
Re: WMI to create FTP Receive Location
"=?Utf-8?B?RGFuIENhZ  2005-11-14 08:06:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 22:19:37 CST 2008.