Add Library Package Reference - No Items Found

Jan 24, 2011 at 2:34 PM
Edited Jan 24, 2011 at 2:41 PM

Just installed MVC3 (RTM) and was trying to see the online packages in the Add Library Package Reference dialog but when I click "Online" I get No items found ?

So I tried this on another machine and got the same result. Both computers behind a corporate firewall. Last night I tried from my personal laptop from home and everything worked just fine so maybe the firewall is causing the problem ?.

This morning I fired up Fiddler and sniffed what was going on. Here is a quick summary of the messages being sent through Fiddler when I click "Online" in the nuget Add Library Package Reference dialog on one of my problem machines.

Send 1.

GET http://packages.nuget.org/v1/FeedService.svc/Packages()/$count HTTP/1.1
DataServiceVersion: 2.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
Accept-Charset: UTF-8
Accept: text/plain
Host: packages.nuget.org
Proxy-Connection: Keep-Alive

Which gets a response of...

HTTP/1.1 407 Proxy Authentication Required
Content-Length: 1790
Proxy-Authenticate: NTLM
Proxy-Connection: Keep-Alive
Proxy-Support: Session-Based-Authentication

So I figure we are speaking NTLM to the corporate firewall

Send 2.

GET http://packages.nuget.org/v1/FeedService.svc/Packages()/$count HTTP/1.1
DataServiceVersion: 2.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
Accept-Charset: UTF-8
Accept: text/plain
Proxy-Authorization: NTLM ***SOME SECRETS***==
Host: packages.nuget.org

This gets a response of...

HTTP/1.1 407 Proxy Authentication Required
Content-Length: 28
Proxy-Authenticate: NTLM *** SOME SECRETS ***
Proxy-Connection: keep-alive
Proxy-Support: Session-Based-Authentication

NTLM authentication needed !

Send 3.

GET http://packages.nuget.org/v1/FeedService.svc/Packages()/$count HTTP/1.1
DataServiceVersion: 2.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
Accept-Charset: UTF-8
Accept: text/plain
Proxy-Authorization: NTLM *** SOME SECRETS ***=
Host: packages.nuget.org

Response looks good. The request gets a 200 OK and the number of packages looks OK to me with a results of 502 packages

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 3
Content-Type: text/plain;charset=utf-8
DataServiceVersion: 2.0;
Date: Mon, 24 Jan 2011 14:21:56 GMT
Proxy-Connection: keep-alive
Server: Microsoft-IIS/7.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET

502

Send 4.

And finally the following is sent

GET http://packages.nuget.org/v1/FeedService.svc/Packages()?$orderby=Rating%20desc,Id&$skip=0&$top=30 HTTP/1.1
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
Accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
Host: packages.nuget.org

And again I see what looks like a good response. At least it is a 200 OK and a bunch of XML that looks like the package feed to me. 

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 107277
Content-Type: text/xml;charset=utf-8
DataServiceVersion: 1.0;
Date: Mon, 24 Jan 2011 14:21:56 GMT
Proxy-Connection: keep-alive
Server: Microsoft-IIS/7.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
The feed I get back looks like this (just the top part anyway)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="http://packages.nuget.org/v1/FeedService.svc/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Packages</title>
  <id>http://packages.nuget.org/v1/FeedService.svc/Packages</id>
  <updated>2011-01-24T14:21:57Z</updated>
  <link rel="self" title="Packages" href="Packages" />
  <entry>
    <id>http://packages.nuget.org/v1/FeedService.svc/Packages(Id='51Degrees.mobi',Version='0.1.11.10')</id>
    <title type="text"></title>
    <updated>2011-01-24T14:21:57Z</updated>
    <author>
So... everything looks OK as far as I can tell yet I still see no packages listed on the dialog.
Does anyone have any ideas what I might try next to fix this ?
Jan 26, 2011 at 4:42 PM

I also have same problem, Thanks for posting..

Jan 26, 2011 at 5:58 PM

do you see the same problem if you query the package from the console? Try opening the Package Manager console and type "Get-Package -Remote"

Jan 26, 2011 at 8:30 PM

I dont see any errors neither any results after running Get-Package -Remote from package Manager console.

Jan 27, 2011 at 10:17 AM
Edited Jan 27, 2011 at 2:04 PM

Thanks for your replies. OK here is some more information. I tried the Get-Package -Remote command and got nothing.

However, since one of my machines is a laptop I was able to temporarily disable my LAN card and connect up directly to the internet via WiFi.

In my situation this enables my to bypass my corporate proxy server.

And yes... when I do this I finally get to see the expected list of packages! To prove the point I then disconnected from my WiFi connection and re-connected using the LAN and as I expected I started getting nothing again.

So for me at least... the problem is something to do with my corporate proxy server which is strange... since my fiddler transcript that I provided in the original post looks OK as far as I can tell.

Any bright ideas what to try next on this one. I guess no developers in my company will be able to use NuGet until this one gets bottomed out.