I get this error
{"Message":"The requested resource does not support http method 'GET'."}
Imports System.Data.SqlClient
Imports System.Net
Imports System.Web.Http
Namespace Controllers
Public Class UpdateBalancesController
Inherits ApiController
<Route("api/UpdateBalances/UpdateCustomer")>
<HttpPost>
Public Function UpdateCustomer() As IHttpActionResult
Dim constr As String = ConfigurationManager.ConnectionStrings("SLISAPI2023ConnectionString").ConnectionString
Using Con As New SqlConnection(constr)
Con.Open()
Using cmd As New SqlCommand
cmd.Connection = Con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "initializeTbalPersonal"
cmd.ExecuteReader()
Con.Close()
End Using
End Using
Return Ok()
End Function
End Class
End Namespace
I do not have ajax code but this is how i am going to call it in vb
Dim jsonbk As String = (New WebClient()).DownloadString("http://localhost/LIGTCOLLEGEKATIKAMULIBRARYAPI/SLISWEBAPI/api/UpdateBalances/UpdateCustomer")
'Dim dt3 As DataTable = JsonConvert.DeserializeObject(Of DataTable)(jsonbk)