Problem with Routing Package

Discussion created by versaterm001 on Jan 21, 2013

I have a routing package that also generates a directions file for output.  Using the same ModelBuilder Model, I have varied the output type of the directions file between the three options (xml, text and html).  For both xml and html it works perfectly, but I cannot get it to retrieve an .txt directions file.

I'm getting a url returned in the Output parameters:


but when I try to copy it I get a  "The remote server returned an error: (404) Not Found."

The code for copying it locally is:

      if (fileURI != null)
        WebClient wc = new WebClient();

        string suffix = ".txt";
       if (fileURI.EndsWith(".xml"))
          suffix = ".xml";
        else if (fileURI.EndsWith(".html"))
          suffix = ".html";
       LocalRouteDirectionsFile = string.Format("{0}{1}", "Directions", suffix);

          wc.DownloadFile(fileURI, LocalRouteDirectionsFile );
        catch (Exception ex)
          errorHandler("getDirectionsFile", "", ex);

Any suggestions?  The same code works for html and xml.

Andrew Purkis