Hello,
I have setup SQL Server Replication using web sync. For synchronization I am using RMO and so far I was able to configure two subscribers without major problems (so server side/certificate/etc is working fine).
But I encountered problems when trying to configure the third subscriber which is running behind a proxy server.
When I am trying to synchronize, using 'agent.Synchronize();' I get the following error:
The Merge Agent could not connect to the URL 'https://XX.XXX.XX.XXX/REPL_SITE/replisapi.dll' during Web synchronization. Please verify that the URL, Internet login credentials and proxy server settings are correct and that the Web server is reachable. (I just masked the real IP for security reasons).
Of course, the first thing was to check in browser. I tried from IE and all was fine and I was able to see 'SQL Server WebSync ISAPI' message in browser. Also tried with 'https://XX.XXX.XX.XXX/REPL_SITE/replisapi.dll?diag' and all was fine.
Second thing was to try from Mozilla browser. It didn't work from the first time but this happened because proxy address and port were not setup in Mozilla options. After I setup proxy address and port everything went fine from Mozilla as well.
So far it seemed that the problem was that my RMO application was not connecting using proxy server.
I read the documentation and found that there are three properties for agent: InternetProxyServer, InternetProxyLogin and InternetProxyPassword.
I took the proxy server and address from IE options and set them in my application, like: agent.InternetProxyServer = 'xx.x.x.x:yyyy', where yyyy is proxy port.
I tried again and same problem. I also verified Internet Options -> Connections -> LAN Settings just to be sure that 'Automatically detect settings' and 'Use automatic configuration script' are not checked.
I was not sure how to set InternetProxyLogin and InternetProxyPassword fields so I left them empty. There are no such settings in Internet Options and the current user is Administrator (on local machine, so not a domain user or smth).
Of course I have InternetLogin and InternetPassword set (I use the same credentials when testing from browser and it works fine)
Can anyone help?
Thank you.