【发布时间】:2020-12-14 01:34:08
【问题描述】:
这是我的代码:
Imports Microsoft.Owin.Hosting
Imports System
Module Program
Sub Main(args As String())
Const url As String = "http://localhost:9001"
Using WebApp.Start(url)
Console.WriteLine("Server started at:" & url)
Console.ReadLine()
End Using
End Sub
End Module
异常发生
【问题讨论】:
-
欢迎来到 StackOverflow。最好不要将错误信息作为图像包含在内——其他人无法搜索到它。最好将其包含为文本。
-
调用本身看起来不错(
Start是一个Shared函数,所以它不需要实例,url是非空的),所以我猜你是缺少 OWIN 需要的其他东西。 -
嗨@Craig 我不知道我在这里做错了什么,因为如果我点击这个链接:codedigest.com/posts/2/… 我认为我在将代码转换为 VB 时做得很好,但我仍然得到一个错误。但是 C# 代码工作正常,可以在这个 repo 中看到:github.com/RoccoSen/OwinToWebAPI.git 我认为我在 VB 方面做错了
标签: vb.net exception owin nullreferenceexception