none
system.servicemodel.faultexception access is denied RRS feed

  • Question

  • I am getting this error

    system.servicemodel.faultexception access is denied

    what does that mean and how do I troubleshoot it ?

    • Moved by Eason_H Thursday, January 30, 2014 6:32 AM
    Wednesday, January 29, 2014 11:07 PM

Answers

  • Hi,

    >>system.servicemodel.faultexception access is denied

    When meet the above error, please first try to enable the wcf tracing to find the cause.

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Then it will be better for you to post your client and server configuration here. That would make it easier to understand the error.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 30, 2014 12:07 PM
    Moderator
  • Yes, what Amy posted for enabling tracing goes in your app.config. It doesn't matter where you put it ... if I need to use this kind of functionality, I usually put system.diagnostics stuff at the end of my config.

    Have you tried the diagnostic tracing yet? I haven't actually used this particular diagnostic in a Windows.Service before, so I don't have personal experience with it. But if you look at the link that Amy posted to the MSDN page about it, you should be able to get enough information about how it works and how to read the results of your trace.

    One thing I always do when writing Windows Services is to do all my development of that Service in a console app ... it's much easier to debug things that way. Once it's all debugged, I can then install it as a Windows Service. I've written a blog post about how to set up your Service so that this functionality is easy to implement: http://geek-goddess-bonnie.blogspot.com/2013/10/easy-windows-services.html

    ~~Bonnie DeWitt [C# MVP]

    http://geek-goddess-bonnie.blogspot.com

    Sunday, February 2, 2014 3:13 PM
    Moderator

All replies

  • Hi Btb4198,

    I will help you move this thread to the right forum. Your question is more related about WCF.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 30, 2014 6:32 AM
  • Hi,

    >>system.servicemodel.faultexception access is denied

    When meet the above error, please first try to enable the wcf tracing to find the cause.

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Then it will be better for you to post your client and server configuration here. That would make it easier to understand the error.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 30, 2014 12:07 PM
    Moderator
  • ok that code, do I add it to the app.config file?

    and if so where do i add at in the file?

    just at the very bottom? after the other code?

    Thursday, January 30, 2014 1:34 PM
  • Also what do you mean by post my client and server configuration here?

    What configuration do you need to see?

    Thursday, January 30, 2014 3:35 PM
  • also the client I am writing is on the same server as the service 
    Thursday, January 30, 2014 3:39 PM
  • anyone help me?

    I am new to this

    Friday, January 31, 2014 9:57 PM
  • Yes, what Amy posted for enabling tracing goes in your app.config. It doesn't matter where you put it ... if I need to use this kind of functionality, I usually put system.diagnostics stuff at the end of my config.

    Have you tried the diagnostic tracing yet? I haven't actually used this particular diagnostic in a Windows.Service before, so I don't have personal experience with it. But if you look at the link that Amy posted to the MSDN page about it, you should be able to get enough information about how it works and how to read the results of your trace.

    One thing I always do when writing Windows Services is to do all my development of that Service in a console app ... it's much easier to debug things that way. Once it's all debugged, I can then install it as a Windows Service. I've written a blog post about how to set up your Service so that this functionality is easy to implement: http://geek-goddess-bonnie.blogspot.com/2013/10/easy-windows-services.html

    ~~Bonnie DeWitt [C# MVP]

    http://geek-goddess-bonnie.blogspot.com

    Sunday, February 2, 2014 3:13 PM
    Moderator