nuget 包链接上的 404 [英] 404 on nuget packages link

查看:29
本文介绍了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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆