I must be doing something simple wrong regarding building a session object that works with RealTracs—can’t login using current x64 libRETS in Visual Studio 2013 (build properties are 64 bit and .NET 4). Below are two examples, though I have tried just about every combination, all resulting in a 503 returned.
Exception written is: Could not get URL [ http://rets.realtracs.com:6103/rets/login] - HTTP response code: 503
I have referenced librets-dotnet.dll and added unmanaged code librets-pinvoke.dll as an item to the VS project. I left the commented line for UserAgentPassword to show that was tried as well (even though I don’t have one)
GetLoginUrl() returns http://rets.realtracs.com:6103/rets/login
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using librets;
namespace libRETSTest
{
class Program
{
static void Main(string[] args)
{
try
{
RetsSession session = new RetsSession("http://rets.realtracs.com:6103/rets/login");
session.SetHttpLogName("c:\\temp\\librets.log");
session.SetUserAgent("MyUserAgent/1.0");
//session.SetUserAgentAuthType(UserAgentAuthType.USER_AGENT_AUTH_RETS_1_7);
session.SetUserAgentAuthType(UserAgentAuthType.USER_AGENT_AUTH_INTEREALTY);
//session.SetUserAgentPassword();
string returnedUrl = session.GetLoginUrl();
Console.Write(returnedUrl);
session.Login("MyUserName", "xxxxxxxx");
}
catch (Exception ex)
{
Console.Write(ex.Message);
}
}
}
}
* About to connect() to rets.realtracs.com port 6103 (#0)
* Trying 216.76.30.79... * Connected to rets.realtracs.com (216.76.30.79) port 6103 (#0)
>>> Sent
GET /rets/login HTTP/1.1
Host: rets.realtracs.com:6103
Accept: */*
RETS-Version: RETS/1.5
User-Agent: MyUserAgent/1.0
X-Librets-Version: 1.5.3, libCURL - libcurl/7.19.7 OpenSSL/0.9.8l
* Closing connection #0
Now I try the other option. Still get the 503, logging changes slightly
session.SetUserAgentAuthType(UserAgentAuthType.USER_AGENT_AUTH_RETS_1_7);
//session.SetUserAgentAuthType(UserAgentAuthType.USER_AGENT_AUTH_INTEREALTY);
* About to connect() to rets.realtracs.com port 6103 (#0)
* Trying 216.76.30.79... * Connected to rets.realtracs.com (216.76.30.79) port 6103 (#0)
>>> Sent
GET /rets/login HTTP/1.1
Host: rets.realtracs.com:6103
Accept: */*
RETS-Version: RETS/1.5
User-Agent: MyUserAgent/1.0
X-Librets-Version: 1.5.3, libCURL - libcurl/7.19.7 OpenSSL/0.9.8l
* Expire cleared
* Closing connection #0
Any insight is appreciated, thank you in advance--Drew
This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and any disclosure, copying, or distribution of this message, or the taking of any action based on it, by you is strictly prohibited.
v.E.1
Thanks for the quick reply Mark. Below is the connection information provided by RealTracs, I should have provided this earlier. It seems I require UserAgent in the librets session object, but there’s no UserAgent password.
RETS URL: http://rets.realtracs.com:6103/rets/login
RETS Login: MyLogin
RETS Password: xxxxxx
RETS UserAgent: MyLogin/1.0
RETS Version 1.7.2
The 503 is puzzling because I can login to RETS M.D. web site using this. RealTracs has a free Pipeline client that I have also connected successfully with, but Windows 8.1/my laptop don’t seem to get along with it.
I sent RealTracs this login question last night, but have not gotten a response—so that’s why I’m trying here.
Thanks again--Drew
_______________________________________________
libRETS-users mailing list
libRET...@crt.realtors.org
http://mail.crt.realtors.org/mailman/listinfo/librets-users