如何调试.NET代码并找到异常的根本原因

时间:2014-07-15 19:23:29

标签: c# .net nuget

我尝试安装Nuget.Server Nuget包并执行它,但是我收到以下错误:

 [ArgumentOutOfRangeException: Specified argument was out of the range of valid values..
Paramter name: site]
   System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303

[HttpException (0x80004005): Specified argument was out of the range of valid values..
Paramter name: site]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9915300
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

如何诊断根本原因?

感谢。

1 个答案:

答案 0 :(得分:-3)

如果我理解你,你需要Stack Trace。在调试时打开它:Debug / Windows / Call Stack。但是你不能访问Nuget.Server的源代码,所以我想 你没有看到直接问题的代码串。