SmartConnect 2018
Validate Session
Attempts to connect to the SmartConnect WCF REST Service and then to the SmartConnect MSSQL database.
Service uri:
To call the get map list method make a call to SmartConnect.svc/validatesession
There is no web.config or SmartConnect security on this method.
Implementation details:
This method connects to the SmartConnect WCF REST service. If a connection is successful the number of users in the SmartConnect MSSQL database is returned.
Return type:
The return type of this method is string
Sample usage:
VB.NET
Dim request As System.Net.WebRequest = System.Net.WebRequest.Create("webservice.eonesolutions.com/SmartConnect.svc/validatesession")
request.Credentials = New System.Net.NetworkCredential("username", "password", "domain")
Dim response As System.Net.WebResponse = request.GetResponse()
Dim result As String = String.Empty
Using responseStream As New System.IO.StreamReader(response.GetResponseStream())
Dim result As String = responseStream.ReadToEnd()
End Using
Dim doc As New XmlDocument()
doc.LoadXml(result)
Return doc
C#.NET
System.Net.WebRequest request = System.Net.WebRequest.Create("webservice.eonesolutions.com/SmartConnect.svc/validatesession");
request.Credentials = new System.Net.NetworkCredential("username","password","domain");
System.Net.WebResponse response = request.GetResponse();
string result = string.Empty;
using(System.IO.StreamReader responseStream = new System.IO.StreamReader(response.GetResponseStream()))
{
string result = responseStream.ReadToEnd();
}
XmlDocument doc = new XmlDocument();
doc.LoadXml(result);
return doc;