Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1) There is the concept of interceptors: <a href="http://msdn.microsoft.com/en-us/library/dd744842.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/dd744842.aspx</a></p> <p>But I think they won't satisfy you in your case: With change interceptors you can handle requests which try to change a specific entity. This could help you to avoid users without certain privileges to add/change/delete contact entities. With QueryInterceptors you can handle GET-Requests. But they don't allow you to restrict certain properties of your contact entity.</p> <p>You are not the first with such requirements -> <a href="https://stackoverflow.com/questions/7377119/wcf-dataservice-modify-object-before-returning-results/7377758#7377758">WCF Dataservice - modify object before returning results?</a></p> <p>Maybe you could use a combination of a (custom) ServiceOperation and a View to handle this.</p> <p>2) Yes, you can do this for instance by handling the ProcessingRequest-Event:</p> <pre><code>public class YourService : DataService&lt;Entities&gt; { /// &lt;summary&gt; /// The logger. /// &lt;/summary&gt; private readonly LogWriter logger; /// &lt;summary&gt; /// Initializes a new instance of the &lt;see cref="YourService"/&gt; class. /// &lt;/summary&gt; public YourService() { this.logger = EnterpriseLibraryContainer.Current.GetInstance&lt;LogWriter&gt;(); this.ProcessingPipeline.ProcessingRequest += this.ProcessingPipelineProcessingRequest; } /// &lt;summary&gt; /// OnProcessingRequest /// &lt;/summary&gt; /// &lt;param name="sender"&gt;source&lt;/param&gt; /// &lt;param name="e"&gt;event args&lt;/param&gt; public void ProcessingPipelineProcessingRequest(object sender, DataServiceProcessingPipelineEventArgs e) { this.logger.Write(new LogEntry { Message = "SOP ProcessingPipelineProcessingRequest: Unauthorized Access", Severity = TraceEventType.Warning }) } } </code></pre> <p>You can find all those ProcessingPipeline-Events here: <a href="http://msdn.microsoft.com/en-us/library/system.data.services.dataserviceprocessingpipeline(v=vs.103).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.data.services.dataserviceprocessingpipeline(v=vs.103).aspx</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload