Expression > Forums Home > Expression Studio Forums > Expression Blend + SketchFlow > Does blend support async HTTP requests using WebClient/HttpWebRequest?

Unanswered Does blend support async HTTP requests using WebClient/HttpWebRequest?

  • Monday, March 09, 2009 7:09 PM
     
     

    The following is related to Silverlight 2.

    I would like to display "dummy data" in Blend so my designer will be happy. This requires Blend to make an asynchronous web call and dynamically load the assembly that contains the dummy data.

    From my initial investigation it shows blend does not allow this call, and throws an exception. Why does Blend not allow this?

    The error is: "WebException: BrowserHttpWebRequest_WebException_RemoteServer"

    On a related note, if I click on Page.xaml, which App.xaml is Blend using? I would like it to use my App.xaml, but it appears that sometimes it is not using it.

    Suppose I split the app into 2 projects: one project contains App.xaml that contains an xml configuration file and the other contains Page.xaml. When the designer clicks on Page.xaml, I would like to read the configuration file. It works fine in the browser, but Blend does not "see" this configuration file.

    Can anyone shed some light on these issues?

All Replies

  • Friday, March 20, 2009 4:56 AM
    Moderator
     
     
    Nope, the WebClient stuff does not work inside the tool.

    However, you will be happy to know that:
    a) Blend 3 has built-in support for sample data! Try it out and let us know how it works for you (there are still a few things that we are not available in the Blend 3 Preview yet, but we have plenty in there already).
    b) In Silverlight 3, there is a really convinient (and predictable) way of checking if your code is running inside a design tool, and hence not excuting the WebClient stuff -

    if(!System.CompoeentModel.DesignerProperties.IsInDesignTool)
    {
    }

    Thanks,
    Unni
  • Tuesday, March 24, 2009 12:17 AM
     
     
    Thanks Unni.

    I appreciate your help!


    -Leo