OperationContext is null in report executed via WCF service

2 posts, 1 answers
  1. Wimpie Schoeman
    Wimpie Schoeman avatar
    7 posts
    Member since:
    Jun 2010

    Posted 01 Aug 2010 Link to this post

    I'm running our reports with the Silverlight viewer and the WCF report service.
    I'm using an authenticated channel and in the report, I want to be able to access the OperationContext of the service making the call to the report so that I can access the authentication information and know for whom I am executing the report.
    However, in the report's constructor, OperationContext is null? How is that possible if the report is called from the reporting WCF service? and is there any way I can obtain the appropriate information and/or hook into the report service before it executes the report?


  2. Answer
    Svetoslav avatar
    649 posts

    Posted 04 Aug 2010 Link to this post

    Hi Andrew,

    Thank you for pointing this to us. The problem is that the actual rendering of the report when executed through the Report Service is performed in a different thread and not in the thread of the request. As the OperationContext.Current returns the execution context of the current thread you end up with no context for the rendering thread.

    The issue will be logged in our bug tracking system and fixed for the next build. We apologize for the inconvenience. As a small compensation we have added Telerik Points to your account.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top