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

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

问题描述

完整免责声明: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:\的Inetpub \日志并没有任何日志文件的存在,即使有近期的时间戳。或者,也许我错过了设置明显的东西?

Is there some other log file I should be looking at? I've looked at the folder: C:\inetpub\logs 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!

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

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