I have a WCF service running in IIS 8.5 on Windows Server 2012 R2 with AppPool Integrated.
I open url in the server: http://localhost:50123/MyService.svc
I have **HTTP 500 Internal Server Error**. (IExplorer cannot show the page)
I have not found the problem in Event logs, IIS Logs.
I apply this steps: https://peter.hahndorf.eu/blog/iislogging.html
Disable IE “Friendly HTTP error messages”
<customErrors mode=”Off” />
<httpErrors errorMode="Detailed" />
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
I use WCF tracing, but not view the error messsage.
I setup "**Failed Request Tracing**", for All content, verbose error logging, HTTP errors in range 400-600.
I open fr000001.xml file from *%systemdrive%\inetpub\logs\FailedReqLogFiles\W3SVC1*
I only view **MODULE_SET_RESPONSE_ERROR_STATUS Warning:**
> ModuleName ManagedPipelineHandler
> Notification 128
> HttpStatus 500
> HttpReason Internal Server Error
> HttpSubStatus 0
> ErrorCode 0
> ConfigExceptionInfo
> Notification EXECUTE_REQUEST_HANDLER
> ErrorCode The operation completed successfully. (0x0)
Error 500:
> HttpStatus 500
> HttpReason Internal Server Error
and successfully ?
> ErrorCode The operation completed successfully. (0x0)
**Not more info about the error.**
About the error:
I have and WCF Inspector with IDispatchMessageInspector
Like https://patrickdesjardins.com/blog/wcf-inspector-for-logging
The error is about attribute `logFileName="c:\log.txt"`
**If the path exists, all is OK.
If the path NOT exists, I get Http 500 Error.**
<extensions>
<behaviorExtensions>
<add name="myLogBehavior"
type="MyServiceA.LogFileBehaviorExtensionElement, MyServiceA" />
</behaviorExtensions>
</extensions>
<endpointBehaviors>
<behavior name="behavior1">
<myLogBehavior logFileName="c:\log.txt" />
</behavior>
</endpointBehaviors>
This means there is an unhanded exception with in the code.
Event viewer, IIS Logs, WCF tracing, Failed Request Tracing not shown the error message, why? How get the full error message ? OS not logging the error in anyway ?