i doing a web menu... and the items is getting from a web services... the web method should return an xml with all the authorise item allow for the user to access...
but when my client call the web method, i get this error... "System.InvalidCastException: Specified cast is not valid."
i debug the web services and manage to get the correct XML... but when return to client it give me this error.
here is my sample code...
<WebMethod()> _
Public Function GetAccessControlListByLogin(ByVal Login As String) As System.Xml.XmlDataDocument
Dim objXMLDataDoc As New Xml.XmlDataDocument
strSQL = "SELECT * FROM TASK_ASSIGNMENT WHERE USERID = '" & Login & "' "
dsDataSet = objConnection.ExecuteDataSet(strSQL)
dsDataSet.Namespace = "MenuItem"
dsDataSet.Tables(0).Namespace = "TaskAssignment"
objXMLDataDoc = New Xml.XmlDataDocument(dsDataSet)
Return objXMLDataDoc
End Function
Dim objAccessControlList As New AccessControlList.AccessControlList
Dim objXMLDataDoc As System.Xml.XmlDataDocument
objXMLDataDoc = objAccessControlList.GetAccessControlListByLogin("alex")
please advice... urgent...
thanks... thanks... thanks...
but when my client call the web method, i get this error... "System.InvalidCastException: Specified cast is not valid."
i debug the web services and manage to get the correct XML... but when return to client it give me this error.
here is my sample code...
<WebMethod()> _
Public Function GetAccessControlListByLogin(ByVal Login As String) As System.Xml.XmlDataDocument
Dim objXMLDataDoc As New Xml.XmlDataDocument
strSQL = "SELECT * FROM TASK_ASSIGNMENT WHERE USERID = '" & Login & "' "
dsDataSet = objConnection.ExecuteDataSet(strSQL)
dsDataSet.Namespace = "MenuItem"
dsDataSet.Tables(0).Namespace = "TaskAssignment"
objXMLDataDoc = New Xml.XmlDataDocument(dsDataSet)
Return objXMLDataDoc
End Function
Dim objAccessControlList As New AccessControlList.AccessControlList
Dim objXMLDataDoc As System.Xml.XmlDataDocument
objXMLDataDoc = objAccessControlList.GetAccessControlListByLogin("alex")
please advice... urgent...
thanks... thanks... thanks...