0
I have a problem in a webservice that I created and I tried several adjustment options and could not solve.
I have the list of Methods available according to the image below
When I select the VAPS method the form to fill the fields appears correctly and fill and send works correctly.
The url that must be built to be invoked by GET must have the following format according to the documentation.
But when running this url I get the following message
All other methods are functional, the method problem not found occurs only with this one which is a new implementation, I believe there is something in the project that has not been updated.
Someone has already been through this and would have a solution?
I’ve restarted Machine, ISS, Visual Studio, changed input parameters, return type and none of it worked.
<WebMethod()>
Public Function VAPS(CodTransacao As String, Email As String, Cod_Prod As Integer) As Boolean
Dim cn As New MySqlConnection
Dim sql As String
Try
sql = "SELECT * FROM TBL_CONCLUDED WHERE COD_PROD=@CodProd AND COD_TRANS=@CodTrans AND email=@email"
Dim cmd = New MySqlCommand(sql, cn)
cmd.Parameters.AddWithValue("@CodProd", Cod_Prod)
cmd.Parameters.AddWithValue("@CodTrans", CodTransacao)
cmd.Parameters.AddWithValue("@email", Email)
cn.ConnectionString = ConfigurationManager.AppSettings("StrConn")
Dim DA As New MySqlDataAdapter(cmd)
Dim dt As New Data.DataTable
cn.Open()
DA.Fill(dt)
MsgBox(dt.Rows.Count)
If dt.Rows.Count > 0 Then
Return True
Else
Return False
End If
Catch ex As Exception
'MsgBox(ex.ToString)
Return False
End Try
cn.Close()
End Function
Not directly, I’ll try here. But I am putting in Webconfig the following: <protocols> <add name="Httpsoap"/> <add name="Httppost"/> <add name="Httpget"/> <!-<remove name="Documentation"/>->-> </protocols> Strange is the other methods work
– Bruno Leite
After trying, let us know if it worked or not. Hug.
– Daniel Coelho
It does not work, the error persists as Method not found but the description remains correct. It makes no sense to me that others work and only this new method doesn’t.
– Bruno Leite
I think it may be the way to access the method. You are trying to access the method via GET, but it may be that it is configured for POST. Already tried to access it via POST?
– Daniel Coelho
via post is the second image and there it works.. So I don’t think the code is wrong if it was when I invoked the method it would have an error... This is the result of processing <Boolean xmlns="http://tempuri.org/">false</Boolean>
– Bruno Leite
HUM.. has how to post the code?
– Daniel Coelho
I updated the question with the code
– Bruno Leite
Guy found the error in the call I was using a ? instead of /. Thanks for the help!
– Bruno Leite
Arrange. Hug.
– Daniel Coelho