{"action":"created","issue":{"url":"https://api.github.com/repos/NationalAssociationOfRealtors/libRETS/issues/34","repository_url":"https://api.github.com/repos/NationalAssociationOfRealtors/libRETS","labels_url":"https://api.github.com/repos/NationalAssociationOfRealtors/libRETS/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/NationalAssociationOfRealtors/libRETS/issues/34/comments","events_url":"https://api.github.com/repos/NationalAssociationOfRealtors/libRETS/issues/34/events","html_url":"https://github.com/NationalAssociationOfRealtors/libRETS/issues/34","id":174828439,"number":34,"title":"Unable to login to CCRM with libRETS-dotnet version 1.6.2","user":{"login":"Aumnia","id":4707975,"avatar_url":"https://avatars.githubusercontent.com/u/4707975?v=3","gravatar_id":"","url":"https://api.github.com/users/Aumnia","html_url":"https://github.com/Aumnia","followers_url":"https://api.github.com/users/Aumnia/followers","following_url":"https://api.github.com/users/Aumnia/following{/other_user}","gists_url":"https://api.github.com/users/Aumnia/gists{/gist_id}","starred_url":"https://api.github.com/users/Aumnia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aumnia/subscriptions","organizations_url":"https://api.github.com/users/Aumnia/orgs","repos_url":"https://api.github.com/users/Aumnia/repos","events_url":"https://api.github.com/users/Aumnia/events{/privacy}","received_events_url":"https://api.github.com/users/Aumnia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-02T19:08:21Z","updated_at":"2016-09-06T20:29:49Z","closed_at":"2016-09-06T20:29:49Z","body":"Hello,\r\n\r\nI am unable to log in to CCRM, a Rapattoni feed, from librets.  I have checked the credentials by successfully logging in with PHRETS version 1.   In the code below, I have set the user agent and rets version after the session is created, prior to calling the Login method, as described in the FAQ and other documentation.  A log file has been attached as well, that may point out the problem.\r\n\r\nWhat I noticed in the difference between the successful login for PHRETS and the unsuccessful login is the connection number.  In the successful login, the second login attempt (needed for hand-shaking with digest authentication), the connection is made to connection 0, that was created on the first login attempt.  \r\n\r\nIn the librets.log attached below, the second, third, and fourth attempts all use an incremental connection number (connection 1, 2, 3) until the Login method gives up.  It seems that it can't complete the authentication because it isn't trying to connect back to connection #0 with the correct authorization  and session cookie.   To clarify, it sends the authorization header, but not the cookie and it makes a new connection.\r\n\r\nHas anyone run into this problem?  I've searched the issues here and on the librets forum, but can't figure out how to solve this problem.\r\n\r\nthanks!\r\n\r\n\r\nSample code : \r\n\r\n```C#\r\n using System;\r\n using librets;\r\n\r\n namespace TestLibrets\r\n {\r\n     class Program\r\n     {\r\n        static void Main(string[] args)\r\n        {\r\n            RetsSession session = null;\r\n            try\r\n            {\r\n                session = new RetsSession(\"LoginUrl\"); // shortened for readability\r\n                session.SetRetsVersion(RetsVersion.RETS_1_7_2);\r\n                session.SetUserAgent(\"Aumnia/1.0\");\r\n                session.SetHttpLogName(\"librets.log\");\r\n\r\n                string user = \"User\";\r\n                string passwd = \"Password\";\r\n                if (!session.Login(user, passwd))\r\n                {\r\n                    Console.WriteLine(\"Invalid login\");\r\n                    Environment.Exit(0);\r\n                }\r\n\r\n                Console.WriteLine(\".Net version: \" + System.Environment.Version);\r\n\r\n                LoginResponse login = session.GetLoginResponse();\r\n                Console.WriteLine(\"Member name: \" + login.GetMemberName());\r\n\r\n                CapabilityUrls capabilityUrls = session.GetCapabilityUrls();\r\n                Console.WriteLine(\"Search URL: \" + capabilityUrls.GetSearchUrl());\r\n\r\n                LogoutResponse logout = session.Logout();\r\n                Console.WriteLine(\"Billing info: \" + logout.GetBillingInfo());\r\n                Console.WriteLine(\"Logout message: \" + logout.GetLogoutMessage());\r\n                Console.WriteLine(\"Connect time: \" + logout.GetConnectTime());\r\n\r\n            }\r\n            finally\r\n            {\r\n                // Be sure to dispose RetsSession when finished, otherwise the\r\n                // TextWriter Dispose() method may be called prior to RetsSession.\r\n                if (session != null)\r\n                {\r\n                    session.Dispose();\r\n                }\r\n\r\n                Console.WriteLine(\"Enter key to Exit\");\r\n                Console.ReadLine();\r\n            }\r\n\r\n         }\r\n     }\r\n }\r\n```\r\n\r\nLog:\r\n```\r\n* Hostname was NOT found in DNS cache\r\n*   Trying 72.26.113.170...\r\n* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#0)\r\n\r\n>>> Sent\r\nGET /CentralCoast/CCRM/login.aspx HTTP/1.1\r\n\r\nHost: rets172lax.raprets.com:6103\r\n\r\nAccept: */*\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nUser-Agent: Aumnia/1.0\r\n\r\nX-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a\r\n\r\n<<< Received\r\nHTTP/1.1 401 Unauthorized. Not Authenticated..\r\n\r\n* Server Microsoft-IIS/8.5 is not blacklisted\r\n\r\n<<< Received\r\nServer: Microsoft-IIS/8.5\r\n\r\nX-AspNet-Version: 2.0.50727\r\n\r\nWWW-Authenticate: Digest realm=\"CCRM\", nonce=\"783c6fdfa68fcc076a8674b553bc19d1\", opaque=\"c43c55b565d8e2ef3274c8b81ecd1236\", qop=\"auth\"\r\n\r\nVary: Accept-Encoding\r\n\r\nCache-Control: private\r\n\r\nContent-Type: text/xml\r\n\r\nDate: Fri, 02 Sep 2016 16:50:54 GMT\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nTransfer-Encoding: chunked\r\n\r\nConnection: Keep-Alive\r\n\r\nX-Powered-By: ASP.NET (203)\r\n\r\n* Ignoring the response-body\r\n\r\n<<< Received\r\n0\r\n\r\n* Connection #0 to host rets172lax.raprets.com left intact\r\n* Issue another request to this URL: 'http://rets172lax.raprets.com:6103/CentralCoast/CCRM/login.aspx'\r\n* Found bundle for host rets172lax.raprets.com: 0x6546b28\r\n\r\n* Hostname was found in DNS cache\r\n*   Trying 72.26.113.170...\r\n* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#1)\r\n* Server auth using Digest with user 'XXXX'\r\n\r\n>>> Sent\r\nGET /CentralCoast/CCRM/login.aspx HTTP/1.1\r\n\r\nAuthorization: Digest username=\"XXXX\", realm=\"CCRM\", nonce=\"783c6fdfa68fcc076a8674b553bc19d1\", uri=\"/CentralCoast/CCRM/login.aspx\", cnonce=\"ODRkYWRiOGY2ZWY0Njg0MzAwMDhlOTA2MDAwMDAwMDA=\", nc=00000001, qop=auth, response=\"0c69958b31411b71b9c5688135a7e9da\", opaque=\"c43c55b565d8e2ef3274c8b81ecd1236\"\r\n\r\nHost: rets172lax.raprets.com:6103\r\n\r\nAccept: */*\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nUser-Agent: Aumnia/1.0\r\n\r\nX-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a\r\n<<< Received\r\nHTTP/1.1 401 Bad Request. Response did not match. /CentralCoast/CCRM/login.aspx :client\r\n\r\n* Server Microsoft-IIS/8.5 is not blacklisted\r\n\r\n<<< Received\r\nServer: Microsoft-IIS/8.5\r\n\r\nX-AspNet-Version: 2.0.50727\r\n\r\n* Authentication problem. Ignoring this.\r\n\r\n<<< Received\r\nWWW-Authenticate: Digest realm=\"CCRM\", nonce=\"783c6fdfa68fcc076a8674b553bc19d1\", opaque=\"c43c55b565d8e2ef3274c8b81ecd1236\", qop=\"auth\"\r\n\r\nVary: Accept-Encoding\r\n\r\nCache-Control: private\r\n\r\nContent-Type: text/xml\r\n\r\nDate: Fri, 02 Sep 2016 16:50:55 GMT\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nTransfer-Encoding: chunked\r\n\r\nConnection: Keep-Alive\r\n\r\nX-Powered-By: ASP.NET (204)\r\n0\r\n\r\n* Connection #1 to host rets172lax.raprets.com left intact\r\n* Found bundle for host rets172lax.raprets.com: 0x6546b28\r\n* Hostname was found in DNS cache\r\n*   Trying 72.26.113.170...\r\n* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#2)\r\n* Server auth using Digest with user 'XXXX'\r\n\r\n>>> Sent GET /CentralCoast/CCRM/login.aspx HTTP/1.1\r\n\r\nAuthorization: Digest username=\"XXXX\", realm=\"CCRM\", nonce=\"783c6fdfa68fcc076a8674b553bc19d1\", uri=\"/CentralCoast/CCRM/login.aspx\", cnonce=\"YzI3Mjc5NGZkMTQwYjFlNDAwMDhlOTA3MDAwMWE5Yzg=\", nc=00000001, qop=auth, response=\"83121c3edbd93c38a014cc24bc0d0d84\", opaque=\"c43c55b565d8e2ef3274c8b81ecd1236\"\r\n\r\nHost: rets172lax.raprets.com:6103\r\n\r\nAccept: */*\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nUser-Agent: Aumnia/1.0\r\n\r\n\r\n\r\nX-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a\r\n\r\n<<< Received\r\nHTTP/1.1 401 Bad Request. Response did not match. /CentralCoast/CCRM/login.aspx :client\r\n\r\n* Server Microsoft-IIS/8.5 is not blacklisted\r\n\r\n<<< Received\r\nServer: Microsoft-IIS/8.5\r\n\r\nX-AspNet-Version: 2.0.50727\r\n\r\n* Ignoring duplicate digest auth header.\r\n\r\n<<< Received\r\nWWW-Authenticate: Digest realm=\"CCRM\", nonce=\"783c6fdfa68fcc076a8674b553bc19d1\", opaque=\"c43c55b565d8e2ef3274c8b81ecd1236\", qop=\"auth\"\r\n\r\nVary: Accept-Encoding\r\n\r\nCache-Control: private\r\n\r\nContent-Type: text/xml\r\n\r\nDate: Fri, 02 Sep 2016 16:50:54 GMT\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nTransfer-Encoding: chunked\r\n\r\nConnection: Keep-Alive\r\n\r\nX-Powered-By: ASP.NET (201)\r\n\r\n\r\n\r\n* Ignoring the response-body\r\n\r\n<<< Received\r\n0\r\n\r\n* Connection #2 to host rets172lax.raprets.com left intact\r\n* Issue another request to this URL: 'http://rets172lax.raprets.com:6103/CentralCoast/CCRM/login.aspx'\r\n* Found bundle for host rets172lax.raprets.com: 0x6546b28\r\n* Hostname was found in DNS cache\r\n*   Trying 72.26.113.170...\r\n* Connected to rets172lax.raprets.com (72.26.113.170) port 6103 (#3)\r\n* Server auth using Digest with user 'XXXX'\r\n\r\n>>> Sent\r\nGET /CentralCoast/CCRM/login.aspx HTTP/1.1\r\n\r\nAuthorization: Digest username=\"XXXX\", realm=\"CCRM\", nonce=\"783c6fdfa68fcc076a8674b553bc19d1\", uri=\"/CentralCoast/CCRM/login.aspx\", cnonce=\"YzI3Mjc5NGZkMTQwYjFlNDAwMDhlOTA3MDAwMWE5Yzg=\", nc=00000002, qop=auth, response=\"d428ecfce14ab4da038534bbd935b796\", opaque=\"c43c55b565d8e2ef3274c8b81ecd1236\"\r\n\r\nHost: rets172lax.raprets.com:6103\r\n\r\nAccept: */*\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nUser-Agent: Aumnia/1.0\r\n\r\nX-Librets-Version: 1.6.2, libCURL - libcurl/7.35.0 OpenSSL/1.0.0a\r\n\r\n<<< Received\r\nHTTP/1.1 401 Bad Request. Response did not match. /CentralCoast/CCRM/login.aspx :client\r\n\r\n* Server Microsoft-IIS/8.5 is not blacklisted\r\n\r\n<<< Received\r\nServer: Microsoft-IIS/8.5\r\n\r\nX-AspNet-Version: 2.0.50727\r\n\r\n* Authentication problem. Ignoring this.\r\n\r\n<<< Received\r\nWWW-Authenticate: Digest realm=\"CCRM\", nonce=\"783c6fdfa68fcc076a8674b553bc19d1\", opaque=\"c43c55b565d8e2ef3274c8b81ecd1236\", qop=\"auth\"\r\n\r\nVary: Accept-Encoding\r\n\r\nCache-Control: private\r\n\r\nContent-Type: text/xml\r\n\r\nDate: Fri, 02 Sep 2016 16:50:55 GMT\r\n\r\nRETS-Version: RETS/1.7.2\r\n\r\nTransfer-Encoding: chunked\r\n\r\nConnection: Keep-Alive\r\n\r\nX-Powered-By: ASP.NET (204)\r\n\r\n0\r\n\r\n* Connection #3 to host rets172lax.raprets.com left intact\r\n```"},"comment":{"url":"https://api.github.com/repos/NationalAssociationOfRealtors/libRETS/issues/comments/245080446","html_url":"https://github.com/NationalAssociationOfRealtors/libRETS/issues/34#issuecomment-245080446","issue_url":"https://api.github.com/repos/NationalAssociationOfRealtors/libRETS/issues/34","id":245080446,"user":{"login":"Aumnia","id":4707975,"avatar_url":"https://avatars.githubusercontent.com/u/4707975?v=3","gravatar_id":"","url":"https://api.github.com/users/Aumnia","html_url":"https://github.com/Aumnia","followers_url":"https://api.github.com/users/Aumnia/followers","following_url":"https://api.github.com/users/Aumnia/following{/other_user}","gists_url":"https://api.github.com/users/Aumnia/gists{/gist_id}","starred_url":"https://api.github.com/users/Aumnia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aumnia/subscriptions","organizations_url":"https://api.github.com/users/Aumnia/orgs","repos_url":"https://api.github.com/users/Aumnia/repos","events_url":"https://api.github.com/users/Aumnia/events{/privacy}","received_events_url":"https://api.github.com/users/Aumnia/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T20:29:49Z","updated_at":"2016-09-06T20:29:49Z","body":"I found a configuration issue on our side that solved the problem."}}
{"actor":{"display_login":"Aumnia"}}