I’m currently trying to integrate the functionality of Cerberus FTP in our application.
Because I couldn’t get it to work in my application, I downloaded the available sample which you can download on their website.
Unfortunately I can’t get it to work either.
After adding the reference an app.config is created:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="CerberusFTPServiceSoapBinding">
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="Soap12" writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</textMessageEncoding>
<httpTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Basic"
bypassProxyOnLocal="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true">
<extendedProtectionPolicy policyEnforcement="Never" />
</httpTransport>
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:10000/service/cerberusftpservice"
binding="customBinding" bindingConfiguration="CerberusFTPServiceSoapBinding"
contract="ServiceCerberusFtpSoap.CerberusFTPServicePort" name="CerberusFTPServicePort" />
</client>
</system.serviceModel>
I’ve changed the endpoint address to “https://ipaddressofourserver:10000/service/cerberusftpservice” but then I get the following error: “Unhandled Exception: System.ArgumentException: The provided URI scheme ‘https’ is invalid; expected ‘http’.” (yes, it needs to be HTTPS).
If I search on this topic you get a lot of articles but the most of them mention to add the following to the app.config: <security mode="Transport">
But I can’t choose this mode, I even can’t choose “mode”… the only option is authenticationMode.
Some of the possibilities are CertificateOverTransport, KerberosOverTransport, UsernameOverTransport.
If I choose UsernameOverTransport, I get the following error:
“Unhandled Exception: System.InvalidOperationException: The ‘CustomBinding’.’http://tempuri.org/’ binding for the ‘CerberusFTPServicePort’.’http://cerberusllc.com/service/cerberusftpservice’ contract is configured with an authentication mode that requires transport level integrity and confidentiality. However the transport cannot provide integrity and confidentiality.”
Is there someone who already worked with the Cerberus FTP API? How can I use HTTPS to connect to a webservice?
The created app.config was correct.
I needed to set the URL in the code itself like this:
After specifying the URL of the WSDL in the code, I could connect without any problem.