nuget 包链接上的 404

404 on nuget packages link(nuget 包链接上的 404)
本文介绍了nuget 包链接上的 404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完全免责声明:java 家伙,正在尝试 .Net 帽子...

Full disclaimer: java guy, trying on the .Net hat...

我已经完成了如何设置 NuGet 服务器的演练,看起来它大部分都在工作.我得到这个页面:

I've gone through the walk through on how to setup NuGet server, and it looks like it is mostly working. I get this page:

You are running NuGet.Server v1.8.30423.9026

Click here to view your packages. 

但是,当我单击该链接时,我得到一个 404..nupkg mime 类型已添加到 IIS,所以我看不出还有什么可能做错.我已将 NLog 添加到项目中,并将日志记录添加到 Routes.cs 类中,两个日志语句都显示了:

However, when I click the link I get a 404. The .nupkg mime type has been added to IIS, so I don't see what else I could be doing wrong. I've added NLog to the project and added logging to the Routes.cs class and both the log statements are showing up:

private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

public static void Start() {
    Logger.Info("Start called in CompanyNameHereNuget");

    MapRoutes(RouteTable.Routes);
}

private static void MapRoutes(RouteCollection routes) {
    Logger.Info("MapRoutes called in CompanyNameHereNuget");

    // The default route is http://{root}/nuget/Packages
    var factory = new DataServiceHostFactory();
    var serviceRoute = new ServiceRoute("nuget", factory, typeof(Packages));
    serviceRoute.Defaults = new RouteValueDictionary { { "serviceType", "odata" } };
    serviceRoute.Constraints = new RouteValueDictionary { { "serviceType", "odata" } };
    routes.Add("nuget", serviceRoute);
}

private static PackageService CreatePackageService() {
    return NinjectBootstrapper.Kernel.Get<PackageService>();
}

还有其他一些我应该查看的日志文件吗?我查看了文件夹: C:inetpublogs 并且那里的任何日志文件都没有最近的时间戳.或者也许我在设置中遗漏了一些明显的东西?

Is there some other log file I should be looking at? I've looked at the folder: C:inetpublogs and none of the log files there even have recent time stamps. Or maybe I'm missing something obvious in the setup?

推荐答案

我实际上正在研究为什么 Elmah 没有记录任何内容并发现了这个线程:

I was actually looking into why Elmah wasn't logging anything and found this thread:

http://forums.asp.net/t/1800305.aspx/1

还有这个建议:

您使用的是经典应用程序池还是集成应用程序池?看看是不是经典.如果是,那么您的 httpmodules 和 httphandlers 将不会设置,因为这是一个综合定义,而不是经典定义.

Are you using classic or integrated app pool? Check if it's classic. If it is then your httpmodules and httphandlers won't be set because that's an integrated definition and not a classic definition.

更改服务器上的设置(从经典到交互式)后,瞧,它起作用了!

After changing the setting on the server (from classic to interactive), voila, it worked!

这篇关于nuget 包链接上的 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
quot;Overflowquot; compiler error with -9223372036854775808L(编译器错误-9223372036854775808L(Q;溢出Q))
Visual Studio 2010 ReportViewer Assembly References(Visual Studio 2010 ReportViewer程序集引用)
Weird behaviour when I open a reportviewer in WPF(在WPF中打开报表查看器时出现奇怪的行为)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)