The server was unable to process the request due to an internal error

74,584

Solution 1

Solution: My service wasn't started. Because we run services locally, I needed to open the required solution and run the service locally via RG -> Create new instance.

How I do I know about this? My log files are stored in c:/temp. In this location, appeared a new log file and there I found more info about my error. (All the time I was thinking that the details about my error message will enter into my basic log file, but I didn't expect another log file.

So, Reason: web service didn't work.
Solution: Start service localy: Rb -> create new service.

Solution 2

The message of the error is quite clear. The server is configured to hide internal errors for security reasons.This is the default behaviour according to the fault handling in WCF MSDN post.

I see two options, both suppose that you have access to the server:

  • Enable showing the error details See the fault handling in WCF MSDN post. It provides details on how to setup your configuration, in the "Provide Additional Information When an Exception Occurs" section.

  • Debug using actual breakpoints This would be better. In my opinion, no error message could actually give you the insights a debugging session does.

Hope I helped!

Solution 3

you should add diagnostics your config file:

 <system.diagnostics> 
      <sources> 
        <source name="System.ServiceModel" 
                switchValue="All" 
                propagateActivity="true"> 
          <listeners> 
            <add name="traceListener" 
                type="System.Diagnostics.XmlWriterTraceListener" 
                initializeData= "D:\AppLogs\Traces.svclog" /> 
          </listeners> 
        </source> 
      </sources> 
    </system.diagnostics>

Solution 4

When running this locally, you can debug the service by attaching to it using Tools -> Attach to Process.

In the list of available processes, look for the process W3wp.exe, with Type Managed (...) x64 or Managed (...) x86, depending what you've configured your service to run as.

Click Attatch, set a couple of breakpoints in your service, and try to access it again in your web-browser, and they should be hit.

Note that you'll need to publish your WS in Debug mode for this to work.

Share:
74,584
codelikeprogrammerwoman
Author by

codelikeprogrammerwoman

Programmer, ateist, vegan!

Updated on July 19, 2022

Comments

  • codelikeprogrammerwoman
    codelikeprogrammerwoman almost 2 years

    When i try to load method from webservice, i get an error:

    "The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs"

    This is my app.config endpoint def:

    <services>
      <service name="Service" behaviorConfiguration="debug">
    </services>
    
    <client>
      <endpoint name="Service" address="net.tcp://localhost:12708/" binding="netTcpBinding" bindingConfiguration="netTcp" contract="path.IService" >
        <identity>
          <servicePrincipalName />
        </identity>
      </endpoint>
    </client>
    
    <serviceBehaviors>
        <behavior name="debug">
          <serviceDebug includeExceptionDetailInFaults="True" />
        </behavior>
      </serviceBehaviors>
    

    I cannot see more information event if i have declared serviceBehaviors. Could somebody tell me how can i see more details about this error?