Print Page | Close Window

WebHost failed to process request

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2597
Printed Date: 29-Jul-2026 at 5:50pm


Topic: WebHost failed to process request
Posted By: gregweb
Subject: WebHost failed to process request
Date Posted: 31-Mar-2011 at 6:46am
I get this error message occasionally.  This is from the Windows Event Log.  It seems to occur after a long period of inactivity - in other words, the user is logged in, but steps away from the computer for a period of time and then comes back.
 
WebHost failed to process a request.

Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/58366981

Exception: System.ServiceModel.ServiceActivationException: The service '/EntityServer.svc' cannot be activated due to an exception during compilation. The exception message is: Object reference not set to an instance of an object.. ---> System.NullReferenceException: Object reference not set to an instance of an object.

at IdeaBlade.EntityModel.Server.EntityServerHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)

--- End of inner exception stack trace ---

at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)

at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)

Process Name: w3wp

Process ID: 6096

 



Replies:
Posted By: kimj
Date Posted: 31-Mar-2011 at 8:29am
The error is in some ways "normal", or at least expected.  After a period of inactivity the EntityService and EntityServer services are paged out, and the first request to the EntityServer causes an error.  In the client application DevForce should be intercepting the error and then starting the EntityService again too, and it should be transparent to the client.  If your client application also receives the error and has to take action, let us know. 


Posted By: gregweb
Date Posted: 31-Mar-2011 at 4:35pm
Yes, the client receives an error right afterwards, but it's not the same one.  The client then crashes.  After closing and logging in again, all is fine.  I will recreate the error and then see which error it is exactly.
 
Edit:  The error on the client says:  An error occurred while communicating with the server.  A common cause for this error is a return type from the invoked method which is either not serializable or not marked as a known type.
 
Greg 


Posted By: kimj
Date Posted: 31-Mar-2011 at 6:31pm
Thanks, Greg.   I'm not able to reproduce the problem, but I suspect our retry logic isn't robust enough, or it's dependent on what the application is doing at the time.  Are you using Coroutines or the EntityQueryPagedCollectionView by any chance?  Or ASP.NET security?


Posted By: gregweb
Date Posted: 31-Mar-2011 at 6:45pm

No coroutines, but yes on using the EntityQueryPagedCollectionView and ASP.net security.

Greg


Posted By: gregweb
Date Posted: 01-Apr-2011 at 11:39am
I have done some more testing on this and the problems seems to have gone away.  If I can nail down the issue better, I will let you know.
 
Greg


Posted By: kimj
Date Posted: 01-Apr-2011 at 11:55am
OK, thanks.  I still suspect error handling, possibly in the Coroutine (which is used internally by both the EqPCV and the Business Application templates), but haven't tested this yet.   We'll do some more testing to see if we can repro with these use cases.



Print Page | Close Window