problem when invoking methods in WCF service

  • Thread starter Thread starter Hakan Fatih YILDIRIM
  • Start date Start date
H

Hakan Fatih YILDIRIM

Hello .net gurus,
We have WCF service and rarely we face some problems when invoking
method from proxy.We can't invoke them.there is no event log , no port
problem. Do you have any ideas?
..net framework : 2.0 with extension
Many Thanks
 
If the method is marked as OneWay, change that to false (temporarily)
so that you can receive exceptions from the server side. Or put try/
catch blocks in your server-side handlers. It could also be the
maxReceivedMessageSize quota. That one always gets me at the most
unexpected of times. Also, there is quite a bit of debugging that you
can turn on in the way of event logs. Add System.ServiceModel to the
system.diagnostics section of the app.config (if you haven't already).
Google around for information on that.
 
Well, there has to be SOME information, like an exception perhaps? What
are the details of the exception?
 
Many Thanks for your quick replies..

We face this problem very rarely.There is no event log,no
exception,and no clue, we paste uri of the service to browser and we
can't see the description.It locks when we invoke the methods.it
happens so rarely and we can't do anything.
 
we can telnet the server via related port.it seems no problem in port
side.
 
You are not really giving any relevant information, like the transport,
the contract, the code, etc, etc. Unless you provide some of that, there
won't be any way to provide a reasonable answer.
 
Learn how to use the
http://www.google.com/search?hl=en&q=FaultContract+WCF
FaultContract

www.idesign.net has good examples.

"C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin"
"C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SvcTraceViewer.exe"

Learn how to log "extra" info with the SvcTraceViewer.exe

That should give you some CLUES. You'll have to research a little bit on
how to set things up.



NOte, c:\wutemp\ must "preexist", but here are some debugging sections.
Take them OUT for production code (under normal running circumstances)



-------HOST SIDE
<system.diagnostics>

<trace autoflush="true" />

<sources>

<source name="System.ServiceModel"

switchValue="Information, ActivityTracing"

<listeners>

<add name="sdt"

type="System.Diagnostics.XmlWriterTraceListener"

initializeData= "c:\wutemp\Host1.svclog" />

</listeners>

</source>

</sources>

</system.diagnostics>





-----------CLIENT SIDE



<system.diagnostics>

<trace autoflush="true" />

<sources>

<source name="System.ServiceModel"

switchValue="Information, ActivityTracing"

<listeners>

<add name="sdt"

type="System.Diagnostics.XmlWriterTraceListener"

initializeData= "c:\wutemp\Client1.svclog" />

</listeners>

</source>

</sources>

</system.diagnostics>
 
Back
Top