This is my WebMethod
<WebMethod(Description:="Fetch Nested Albums", EnableSession:=True)> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
Public Function moveImages() As Object
Dim FileCount As Integer = _
HttpContext.Current.Request.Form(
HttpContext.Current.Request.Form.Count - 2)
End Function
When i try to call the web service from the .aspx page i get this error
“Index was out of range. Must be non negative and less than the size of the collection.”
How can i access the request Object? I was not able to access the session object in the web method, so i had to add EnableSession:=True in the Web Method.
So is there any setting for the request Object too?
I think that the error is very clear. In this line the
.Countis less that 2.