We are using the webRequestHandler class successfully in an ASHX handler file but I am unable to access it from a new .vb class file I'm trying to create.
I am familiar with this answer but the .dll is already a reference in my project The type or namespace name "WebRequestHandler" could not be found
'api.vb
Imports System.Net.Http
Public Class api
public function postAPI() as string
dim handler = New WebRequestHandler() 'Type "WebRequestHandler" is not found
[...]
End Function
End Class
The hander is essentially the same but works fine:
'httpHandler.ashx
Imports System.Net.Http
Public Class apiWebHandler
Implements System.Web.IHttpHandler
Private Function getAPI() As String
Dim handler = New WebRequestHandler() 'works like a charm no compiler issues
[...]
End Function
End Class
Any idea why the WebRequestHandler isn't available here? If it isn't available in a class file what would you recommend we do to send certs via web request?