tags:

views:

49

answers:

2

I have a wcf service that randomly begins to fail when requesting the autogenerated javascript that wcf supports making. But I have no luck tracking down why. The js thing is part of the wcf featureset, so I dont know how it can suddenly begin to fail and be unable to work until IIS is recycled.

The http log gives me:

2010-06-10 09:11:49 W3SVC2095255988 myip GET /path/myservice.svc/js _=1276161113900 80 - ip browser 500 0 0

So its an error 500, and that is about the only thing I can figure out. The event log contains no information.

Requests to /path/myservice.svc works just fine. After recycling IIS it works again, and some days later it begins to fail until I recycle IIS.

     <service
        name="path.myservice"
        behaviorConfiguration="b">
        <endpoint
           address=""
           behaviorConfiguration="eb"
           binding="webHttpBinding"
           contract="path.Imyservice" />
     </service>
     ...
     <endpointBehaviors>
        <behavior name="eb">
           <enableWebScript />
        </behavior>
     </endpointBehaviors>
     <serviceBehaviors>
        <behavior name="b">
           <dataContractSerializer maxItemsInObjectGraph="2147483647" />
           <serviceMetadata httpGetEnabled="true" />
           <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
     </serviceBehaviors>

I dont see any problems in the web.config settings either.

Any clues how I can track down what the problem is?

Edit:

Just to make it clear - It is the generation of javascript that fails, my code is never invoked. Calls to the service works just fine.

A: 

It seems your WCF Service throws an Exception. You can catch this unhandled Exception in the Application_Error method in Global.asax, than write it to a log file.

protected void Application_Error(object sender, EventArgs e)
{
    Exception ex = Server.GetLastError().GetBaseException();
    //TODO: write to log
}
poklacsek
no, it never enters my code. It is the microsoft generation of javascript that fails. Calls to the service works just fine. And if it came to this code, I would have gotten a nice email with the details and wouldnt have to ask here :)
Cine
A: 

I would recommend you to enable tracing in your service and look at the generated logs with Service Trace Viewer Tool. Trace only errors to keep your logs small.

Darin Dimitrov
It doesnt actually fail on doing what I coded it to do. It fails to deliver the javascript I need to do easy code. If I do the calls directly, they work fine
Cine
That's why I suggested you enabling tracing. Tracing does not log only errors coming from your code - it will log all errors.
Darin Dimitrov