更新我自己的nuget服务器的结果是“一个具有解析虚拟路径'~/nuget'已添加"

本文关键字:nuget 路径 虚拟 quot 添加 结果是 服务器 自己的 我自己 一个 更新 | 更新日期: 2023-09-27 18:16:01

我正在运行一个版本为2.7的Nuget服务器,我想把它更新到最新版本。

更新工作正常。但是当我尝试运行更新的版本时,我得到这个错误:

'/EM-Nugets-Alpha'应用程序服务器错误。

已添加带有解析虚拟路径'~/nuget'的路由。参数名称:virtualPath描述:在执行当前web请求期间发生了未处理的异常。请查看堆栈跟踪以获得有关错误及其在代码中的起源位置的更多信息。

Exception Details: System。已经添加了带有解析虚拟路径"~/nuget"的路由。参数名称:virtualPath

源错误:

 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
Stack Trace: 

[ArgumentException: A route with the resolved virtual path '~/nuget' has already been added.
Parameter name: virtualPath]
   System.ServiceModel.Activation.ServiceRouteHandler.AddServiceInfo(String virtualPath, ServiceDeploymentInfo serviceInfo) +120399
   System.ServiceModel.Activation.ServiceRoute..ctor(String routePrefix, ServiceHostFactoryBase serviceHostFactory, Type serviceType) +67
   NuGetServer.NuGetRoutes.MapRoutes(RouteCollection routes) +96
[HttpException (0x80004005): A route with the resolved virtual path '~/nuget' has already been added.
Parameter name: virtualPath]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12949749
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): A route with the resolved virtual path '~/nuget' has already been added.
Parameter name: virtualPath]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12966756
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12806561

我对这种类型的错误不是很熟悉,欢迎提出任何建议

更新我自己的nuget服务器的结果是“一个具有解析虚拟路径'~/nuget'已添加"

终于发现了问题:我的项目名称与Nuget太接近了。服务器

与Nuget的名字相去甚远。