M
MarkusJNZ
Hi, I am trying to pass an number from a classic asp webpage to a .NET
webservice.
Because my C# webservice expects an integer and classic ASP uses
variants I keep getting problems with object casts;
In my asp page I have the following code which works fine
HTTP.Open "GET","http://myserver/myService.asmx/LogPerson?ID=100",
False
*IF* I do the following I get an error from the .NET webservice
"System.ArgumentException: Cannot convert to System.Int32. Parameter
name: type ---> System.FormatException: Input string was not in a
correct format"
Dim PersonID
PersonID=100
HTTP.Open "GET","http://myserver/myService.asmx/LogPerson?ID=" &
PersonID, False
==========
My signature in the webservice is simply
[WebMethod]
public bool LogPerson(int PersonID)
{
/// some code
return true;
}
I have tried changing my signature to
public bool LogPerson(object PersonID)
and then casting etc but I keep getting casting errors
Any help appreciated
Thanks in advance
MarkusJ
==================================
googlenews2006markusj
webservice.
Because my C# webservice expects an integer and classic ASP uses
variants I keep getting problems with object casts;
In my asp page I have the following code which works fine
HTTP.Open "GET","http://myserver/myService.asmx/LogPerson?ID=100",
False
*IF* I do the following I get an error from the .NET webservice
"System.ArgumentException: Cannot convert to System.Int32. Parameter
name: type ---> System.FormatException: Input string was not in a
correct format"
Dim PersonID
PersonID=100
HTTP.Open "GET","http://myserver/myService.asmx/LogPerson?ID=" &
PersonID, False
==========
My signature in the webservice is simply
[WebMethod]
public bool LogPerson(int PersonID)
{
/// some code
return true;
}
I have tried changing my signature to
public bool LogPerson(object PersonID)
and then casting etc but I keep getting casting errors
Any help appreciated
Thanks in advance
MarkusJ
==================================
googlenews2006markusj