User-1799376286 posted
I have a webmethod that output in Json but when i view it in brower i get the below line along with the value.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<string>{"authenticated":false}</string>
Why if am getting the xml file message above while the webmethod is outputing in json.
Below is the webmethod code:
<webmethod()> _ <scriptmethod(responseformat:=responseformat.json)> _ Public Function CheckUsernamePassword(ByVal UserName As String, ByVal Password As String) As String Dim WebServiceAccessPassword As String = "n0bl3h0us3" Dim oIsellMobileLogin As New IsellMobileLoginV3() If WebServiceAccessPassword.Trim() = IsellUtilities.GetWebservicePassword() Then oIsellMobileLogin = IsellMobileLoginV3.CheckUserNameAndPassword(UserName, Password, WebServiceAccessPassword) If oIsellMobileLogin.authenticated Then IsellMopbileAppAnalyticsInsert.LoginAnalyticsInsert(UserName) End If 'if Login Fails Process to send Email If oIsellMobileLogin.authenticated = False Then 'Step 1 Check UserExist or not Dim bUserNameExists As Boolean = False Dim strUserEmailId As String = "" bUserNameExists = IsellMobileLoginV3.UserNameExists(UserName) If bUserNameExists Then 'Check the activity if the mail is send send or not If (IsellMobileLogin.CheckActivityCountForUserNameSameDay(UserName) = "0") Then strUserEmailId = IsellMobileLoginV3.UserEmailId(UserName) If (Not UserName.Contains("_nhm")) Then IsellMobileLoginV3.InsertActivity(UserName) End If 'SendEmail If (IsellMobileLoginV3.CheckUnSuscribeActivityCountForUserName(UserName) = "0") Then IsellMobileLoginV3.SendEmailUser(strUserEmailId, UserName) End If End If End If End If End If Dim sJSON As String = js.Serialize(oIsellMobileLogin) Return sJSON End Function </scriptmethod(responseformat:=responseformat.json)></webmethod()>