Validate Session

<< Click to Display Table of Contents >>

SmartConnect 2017

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:


Dim request As System.Net.WebRequest = System.Net.WebRequest.Create("")

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()


Return doc



System.Net.WebRequest request  = System.Net.WebRequest.Create("");

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();


return doc;