This project has moved and is read-only. For the latest updates, please go here.

Unable to connect to the remote server (9999)

Topics: Developer Forum
May 12, 2009 at 7:31 PM

Hi guys

I'm trying to get started with the Flickr API. using the example Visual Studio 2005 Web Site at

I've modified my web.config as to what I think it should be....

<?xml version="1.0"?>
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in

    <section name="flickrNet" type="FlickrNet.FlickrConfigurationManager,FlickrNet"/>

  <flickrNet apiKey="3944448574eed54dfd88011bef02ab60" secret="eb5417c1635c84b2" cacheDisabled="true">

    <add key="UserId" value="38238958@N08"/>

       usesystemdefault = "false"
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        <compilation debug="true" />
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
       <!-- <authentication mode="Windows" />-->
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

      <customErrors mode="RemoteOnly">
        <error statusCode="500" redirect="DisplayError.aspx"/>

          <customErrors mode="Off"/>




... but still I get the following error......


Unable to connect to the remote server (9999)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: FlickrNet.FlickrException: Unable to connect to the remote server (9999)

Source Error:

Line 18:         options.SortOrder = FlickrNet.PhotoSearchSortOrder.DatePostedDesc
Line 19:
Line 20: Dim photos As FlickrNet.Photos = flickr.PhotosSearch(options)
Line 21:
Line 22: If photos.PhotoCollection Is Nothing Then

Source File: E:\kunden\homepages\31\d142177193\azak\PhotoAlbumVb.aspx.vb    Line: 20

Stack Trace:

[FlickrException: Unable to connect to the remote server (9999)]
FlickrNet.Flickr.DoGetResponse(String url) +360
FlickrNet.Flickr.GetResponse(Hashtable parameters, TimeSpan cacheTimeout) +655
FlickrNet.Flickr.PhotosSearch(PhotoSearchOptions options) +1318
PhotoAlbumVb.RecentPhotos() in E:\kunden\homepages\31\d142177193\azak\PhotoAlbumVb.aspx.vb:20
PhotoAlbumVb.Page_Load(Object sender, EventArgs e) in E:\kunden\homepages\31\d142177193\azak\PhotoAlbumVb.aspx.vb:7
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Does anyone have any idea how to get around this?


May 14, 2009 at 2:05 PM

Have you tried configuring the proxy as per the config file example here:


May 14, 2009 at 7:00 PM

I've now sussed this out. I needed to specify the proxy in both the <flickrNet/> and the <defaultProx/> tags.