I am generating SSIS packages with BIML and I am setting up my FTPConnection like this:
<FtpConnection Name="FTP" ServerName="srv003809" Password="" ServerPort="21" UsePassiveMode="true" >
<Expressions>
<Expression PropertyName="ServerName">@[User::mst_strFTP_Server]</Expression>
<Expression PropertyName="ServerPort">@[User::mst_strFTP_Port]</Expression>
<Expression PropertyName="ServerUserName">@[User::mst_strFTP_Username]</Expression>
<Expression PropertyName="ServerPassword">@[User::mst_strFTP_Password]</Expression>
</Expressions>
</FtpConnection>
When I generate the package I get this error:
Could not resolve reference to 'ServerPassword' of type 'PropertyExpression'. 'PropertyName="ServerPassword"' is invalid.
Provide valid scoped name
I have tried changing ServerPassword
to Password
without success. I can't find much on the BIML forums in connection with FTP connections.
How do I set the FTP connection password using an expression in BIML?
I am using Visual Studio 2010 and BIDSHelper 2012 (1.7.0.0)
Instead of using the PropertyName, try using ExternalProperty. I was having a similar problem using variables and expressions using an Odbc connection, and changing it to ExternalProperty="Password" and ExternalProperty="UserName" worked for me.
I am still looking for the difference between Property and ExternalProperty, and will post once I am able to find something.