I get the error below while trying to run my api code please help
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Most likely causes:
The directory or file specified does not exist on the Web server.
The URL contains a typographical error.
A custom filter or module, such as URLScan, restricts access to the file.
Things you can try:
Create the content on the Web server.
Review the browser URL.
Check the failed request tracing log and see which module is calling SetStatus. For more information, click here.
Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:5216/api/HandlerVBacademiaV2N/GetCustomersJSON/0782911364
Physical Path c:\users\makumbi\documents\visual studio 2015\Projects\KABOJJAAPPAPI\KABOJJAAPPAPI\api\HandlerVBacademiaV2N\GetCustomersJSON\0782911364
Logon Method Anonymous
Logon User Anonymous
Request Tracing Directory C:\Users\Makumbi\Documents\IISExpress\TraceLogFiles\KABOJJAAPPAPI
More Information:
This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.
View more information »
This is my code
Imports System.Data.SqlClient
Imports System.Net
Imports System.Web.Http
Namespace Controllers
Public Class HandlerVBacademiaV2NController
Inherits ApiController
<Route("api/HandlerVBacademiaV2N/GetCustomersJSON/{customerid}")>
<HttpGet>
Private Function GetCustomersJSON(ByVal customerId As String) As IHttpActionResult
Dim customers As New List(Of Baladata)()
Using conn As New SqlConnection()
conn.ConnectionString = ConfigurationManager.ConnectionStrings("KABOJJAConnectionString").ConnectionString
' Using Con As New SqlConnection(conString)
Using cmd As New SqlCommand()
cmd.CommandText = "SELECT * FROM Androidscores WHERE phones = @CustomerId"
cmd.Parameters.AddWithValue("@CustomerId", customerId)
cmd.Connection = conn
conn.Open()
Using sdr As SqlDataReader = cmd.ExecuteReader()
While sdr.Read()
customers.Add(New Baladata With {
.Account = sdr("Account"),
.Classr = sdr("Class"),
.Stream = sdr("Stream"),
.Names = sdr("Names"),
.Subject = sdr("Subject"),
.Mid = sdr("Mid"),
.Ends = sdr("Ends"),
.Grade = sdr("Grade"),
.Term = sdr("Term"),
.Years = sdr("Years"),
.Total = sdr("Total"),
.Phones = sdr("Phones"),
.autofield = sdr("atk")
})
End While
End Using
conn.Close()
End Using
Return Ok(customers)
End Using
End Function
Public Class Baladata
Public Property Account() As String
Public Property Classr() As String
Public Property Stream() As String
Public Property Names() As String
Public Property Subject() As String
Public Property Mid() As String
Public Property Ends() As String
Public Property Grade() As String
Public Property Term() As String
Public Property Years() As String
Public Property Total() As String
Public Property Phones() As String
Public Property autofield() As String
End Class
End Class
End Namespace