Nuget server on IIS6 returns 404 when downloading package after upgrade

2011年9月2日 8:03:30 (GMT Daylight Time, UTC+01:00)

We updated our nuget server today and ran into a problem where regardless of package selected or whether it's through the nuget package manager or the nuget package explorer, the server returns 404 (File Not Found).

What was odd about this was that the packages exist and the feed was valid:

There are a couple of comments about this online e.g.: Codeplex Discussion 246387 but nothing helped.  It took a while to work out that it was caused by a slight change to the way the nuget server makes it's calls. Comparing the IIS logs between the old and new version of nuget server, the previous version of nuget server would redirect the user directly to the nupkg file:

2011-04-21 08:47:46 W3SVC1759424837 192.168.1.1 GET /Packages/TheSiteDoctor.2.0.235.68.nupkg - 80 - 192.168.1.2 Package-Installer/1.2.20325.9034+(Microsoft+Windows+NT+6.1.7601+Service+Pack+1) 200 0 0

On the new one however, it passes the various requests through a new MVC route "download":

2011-09-01 11:31:16 W3SVC1759424837 192.168.1.1 GET /download/TheSiteDoctor/2.0.235.68 - 80 - 192.168.1.2 Package-Installer/1.2.20325.9034+(Microsoft+Windows+NT+6.1.7601+Service+Pack+1) 404 0 3

This is fine if your nuget server is running on IIS7, it will "just work". However if you're running IIS6 you'll need to make one additional change which is mapping all request through the aspnet_isapi.dll (a wildcard mapping). This is easy enough:

  1. 1. Open the site's properties in IIS6
  2. 2. Navigate to the "Home Directory" tab
  3. 3. Click the "Configuration" button: 
  4. This will then open the "Application Configuration" window: 
  5. Now you'll need to add the aspnet_isapi.dll mapping, the path of this will depend on the whether you're running Windox 64bit or not: 
    32bit Framework: c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll 
    64bit Framework: c:\windows\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll 
    Make sure you uncheck the "Verify that file exists" checkbox 

Et voila your packages should all be working again.

Leave a comment if you need any additional help or it helped you.

Nuget server on IIS6 returns 404的更多相关文章

  1. .NET持续集成与自动化部署之路第二篇——使用NuGet.Server搭建公司内部的Nuget(包)管理器

    使用NuGet.Server搭建公司内部的Nuget(包)管理器 前言     Nuget是一个.NET平台下的开源的项目,它是Visual Studio的扩展.在使用Visual Studio开发基 ...

  2. 搭建公司内部的NuGet Server

    随着公司业务慢慢的拓展,项目便会越来越来多,很多项目会依赖其他项目DLL,比如一些底层的技术框架DLL引用,还有各业务系统的也有可能会有引用的可能. 项目多,交叉引用多,如果要是有一个DLL更新,那就 ...

  3. 分析nuget源码,用nuget + nuget.server实现winform程序的自动更新

    源起 (个人理解)包管理最开始应该是从java平台下的maven开始吧,因为java的开发大多数是基于开源组件开发的,一个开源包在使用时很可能要去依赖其他的开源包,而且必须是特定的版本才可以.以往在找 ...

  4. Windows Server 2003 IIS6.0+PHP5(FastCGI)+MySQL5环境搭建教程

    准备篇 一.环境说明: 操作系统:Windows Server 2003 SP2 32位 PHP版本:php 5.3.14(我用的php 5.3.10安装版) MySQL版本:MySQL5.5.25 ...

  5. org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Server returned error code = 404 for URI.. Check server logs for details

    严重: Servlet.service() for servlet jsp threw exceptionorg.codehaus.xfire.XFireRuntimeException: Could ...

  6. Nuget Server 搭建

    每个女人都有很多包包:其实男人也有,但只有会写程序的男人才有 -- 代码世界中的大"包"小"包".这些大包小包,有花钱买的,有从开源市场淘的,也有自己或同事亲手 ...

  7. nuget.server搭建及实际测试

    1.背景 由于所做项目越来越多,会积累一些公用组件,而每个项目中组件引用中如果组件有更新或者新增为了方便需要一个专门的工具进行管理,那么nuget就是不错的选择. 2.安装nuget.server 这 ...

  8. Server response error code:404, error:{"ret":-1, "msg":"invalid appkey"}

    Server response error code:404, error:{"ret":-1, "msg":"invalid appkey" ...

  9. [译]Nuget.Server

    原文 NuGet.Server是一个包,可用于使一个ASP.NET应用host一个package feed . 使用VS创建一个新的空WEB应用,添加Nuget.Server包. 配置应用的Packa ...

随机推荐

  1. CircleIndicator

    dependencies { compile 'com.nineoldandroids:library:2.4.+' compile 'me.relex:circleindicator:1.0.0@a ...

  2. codeforce 1A Theatre Square

    A. Theatre Square Theatre Square in the capital city of Berland has a rectangular shape with the siz ...

  3. NIO-3网络通信(非阻塞)

    import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import ja ...

  4. <node.js爬虫>制作教程

    前言:最近想学习node.js,突然在网上看到基于node的爬虫制作教程,所以简单学习了一下,把这篇文章分享给同样初学node.js的朋友. 目标:爬取 http://tweixin.yueyishu ...

  5. Java实现web在线预览office文档与pdf文档实例

    https://yq.aliyun.com/ziliao/1768?spm=5176.8246799.blogcont.24.1PxYoX 摘要: 本文讲的是Java实现web在线预览office文档 ...

  6. 洛谷P3919 【模板】可持久化数组 [主席树]

    题目传送门 可持久化数组 题目描述 如题,你需要维护这样的一个长度为 $N$ 的数组,支持如下几种操作 在某个历史版本上修改某一个位置上的值 访问某个历史版本上的某一位置的值 此外,每进行一次操作(对 ...

  7. PIPESTATUS(bash) + pipefail(ksh)

    I have two processes foo and bar, connected with a pipe: $ foo | bar bar always exits 0; I'm interes ...

  8. OpenGL的一些重要函数记录

    glViewport - set the viewport https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glViewport.x ...

  9. 2017/11/22 Leetcode 日记

    2017/11/22 Leetcode 日记 136. Single Number Given an array of integers, every element appears twice ex ...

  10. Hibernate *.hbm.xml对象关系映射文件详解

    在hibernate中表与pojo对象是一一对应的,通过hbm文件将数据库表与实体关联起来,本文将对hbm文件进行介绍. pojo对象:提供了公共的无参构造方法 ,通过反射产生对象.          ...