New Posts New Posts RSS Feed: Object reference not set to an instance of an object
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Object reference not set to an instance of an object

 Post Reply Post Reply
Author
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Topic: Object reference not set to an instance of an object
    Posted: 20-May-2010 at 9:36am
Hi kimj
 
Oh okay. I'm sure I read somewhere that I couldn't use the globals.asax with other services. My bad.
 
I'll have a look on Monday when I'm back in the office.
 
Kr
George
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 20-May-2010 at 7:18am
Version 6.0.2 was a "beta build" released to only a few customers.  Version 6.0.3 is the RTW of DevForce 2010 and will be coming in early June.
 
Re the globals.asax - do you mean the virtual path provider registration?  If so, you can still use this for DevForce services and supply physical .svc files for other services - the virtual path provider will only serve a virtual svc file if a physical one isn't found.
Back to Top
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Posted: 20-May-2010 at 1:25am
Hi kimj
 
What happened to 6.0.2? Never saw it.
 
That makes sense. I'll dig a bit deeper today with the ClientConfig file. I can't use the Globals.asax as I have a seperate WCF service for our backend SAP system. Maybe I just need to double/triple check all the endpoints.
 
Kr
George
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 19-May-2010 at 6:06pm
You will get an exception when browsing to EntityServer.svc if you haven't previously browsed to EntityService.svc.  This is because the EntityServer is actually started by the EntityService and expecting it to be there.  The exception is unfortunate, but in itself doesn't indicate a problem.
 
If you're seeing the exception in your application then that does indicate a problem.  When your Silverlight application connects, or fetches for the first time if you haven't previously connected, it will first connect to the EntityService, and then the EntityServer.  If you're getting the error here, then the debug log should also have more information on why it couldn't start the EntityServer.  We do have a bug in 6.0.1 with not using the correct EntityServer URL - see http://www.ideablade.com/forum/forum_posts.asp?TID=1738.   If this looks like the same problem you're having, the workaround in 6.0.1 is to use a ServiceReferences.ClientConfig to define the service endpoints.   This issue has been fixed for the 6.0.3 release.
 
Back to Top
GeorgeB View Drop Down
Groupie
Groupie


Joined: 03-May-2010
Posts: 66
Post Options Post Options   Quote GeorgeB Quote  Post ReplyReply Direct Link To This Post Posted: 18-May-2010 at 9:38am
Hi
 
I'm testing a deployment and having a little issue. I'm constantly seeing "Object reference not set to an instance of an object" in the debug logs (this after I get no data back).
 
This can be seen if I right click on EntityServer.svc in the solution explorerand click on "View in Browser". EntityService.svc however does work.
 
Now if I run the Silverlight application (locally), it works. If go back to EntityServer.svc , it works. 
 
Below is the stack trace:-

[NullReferenceException: Object reference not set to an instance of an object.]
   IdeaBlade.EntityModel.Server.EntityServerHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +77
   System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1440
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +44
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +615

[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.Runtime.AsyncResult.End(IAsyncResult result) +679246
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +234
   System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +24
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Kr
George
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down