locked
Using HasSideEffects = true doesn't work on HTTPS RRS feed

  • Question

  • Hi,

    I have a bit of a problem on (HasSideEffects = true) attribute when using HTTPS. Is there a solution or workaround for this attribute to work?

    Thanks,

    Paul

    Wednesday, June 1, 2011 8:57 AM

Answers

  • It should just work... Can you tell us if you are doing anything unusual, like cross-domain, SL5 Beta, etc.? Also, which version of RIA are you using? Are you using the same server for HTTP/HTTPS testing?

    As for troubleshooting, you can start to isolate the source of the failure:

    • Set a breakpoint in the query method, does it get hit when the HTTPS request is made?
    • Use IE9's F12 developer tools (of FireFox's FireBug, or Fiddler) to look at the traffic between the SL client and the web server, and look for differences between the HTTP and HTTPS requests.
    • Use SQL Server Profiler to look at what SQL queries we run by the Web app. Does anything run for HTTPS? Perhaps the query has where clauses that exclude all rows.

    I'm sorry that I don't have anything more directly helpful to offer, but this should help get you closer to a solution.

    Friday, June 3, 2011 11:13 AM

All replies

  • I am not aware of any problems with that combination, can you give us more detail?

    Wednesday, June 1, 2011 10:51 AM
  • [Query(HasSideEffects = true)]
    public IQueryable<Contact> GetContacts()
    {
        return this.ObjectContext.Contacts
             .Include("Customer")
             .Include("SecondaryCustomers")
             .OrderBy(Contact => Contact.ROWID);
    }


    I've added the attribute. When I deployed my project to HTTP, this works well and a result set is returned. But when it is deployed to HTTPS, there is no result set being returned. Is there a configuration needed to be added/modified?

    Thursday, June 2, 2011 3:27 AM
  • If you set HasSideEffects to false, can you get the data over HTTPS? If not, you might need to investigate your site's SSL settings.

    Thursday, June 2, 2011 12:43 PM
  • Hi,

    I've set the attribute to false and data can be transfered through HTTPS. What could be causing this issue then?

    Thanks,
    Paul

    Friday, June 3, 2011 3:12 AM
  • It should just work... Can you tell us if you are doing anything unusual, like cross-domain, SL5 Beta, etc.? Also, which version of RIA are you using? Are you using the same server for HTTP/HTTPS testing?

    As for troubleshooting, you can start to isolate the source of the failure:

    • Set a breakpoint in the query method, does it get hit when the HTTPS request is made?
    • Use IE9's F12 developer tools (of FireFox's FireBug, or Fiddler) to look at the traffic between the SL client and the web server, and look for differences between the HTTP and HTTPS requests.
    • Use SQL Server Profiler to look at what SQL queries we run by the Web app. Does anything run for HTTPS? Perhaps the query has where clauses that exclude all rows.

    I'm sorry that I don't have anything more directly helpful to offer, but this should help get you closer to a solution.

    Friday, June 3, 2011 11:13 AM
  • Paul - 

    You marked this issue as answered, but you didn't mention what you had to do to get the query to work. I have a similar problem (although my OrderBy clause is on the client query, not the server query) and I would love to know if your solution would also fix my problem. Below is a link to my similar issue:

    http://social.msdn.microsoft.com/Forums/en-US/silverlightwcf/thread/daad547e-f718-4912-a3eb-be212db62187#daad547e-f718-4912-a3eb-be212db62187

    Thanks!

    - Steve

    Wednesday, October 12, 2011 3:14 PM