New Posts New Posts RSS Feed: Exception in starting the EntityServer
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Exception in starting the EntityServer

 Post Reply Post Reply
Author
rickadams View Drop Down
Newbie
Newbie
Avatar

Joined: 04-Mar-2011
Posts: 12
Post Options Post Options   Quote rickadams Quote  Post ReplyReply Direct Link To This Post Topic: Exception in starting the EntityServer
    Posted: 04-Mar-2011 at 11:01am
I am getting the following error when I attempt to start my BOS server. I have included my configuration information for both client and server. The EntityService starts up but not the server. Not sure where to where to look for a solution to this.
 
Caught exception: IdeaBlade.EntityModel.EntityServerException: Unable to start EntityServer.svc service: The virtual path '/LEAF%20BOS/EntityServer.svc/sl' points outside of the virtual application '/LEAF BOS'. Parameter name: virtualPath ---> System.ArgumentException: The virtual path '/LEAF%20BOS/EntityServer.svc/sl' points outside of the virtual application '/LEAF BOS'. Parameter name: virtualPath at System.ServiceModel.ServiceHostingEnvironment.NormalizeVirtualPath(String virtualPath) at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailable(String virtualPath) at IdeaBlade.EntityModel.Server.RemoteEntityService.GetHostedEntityServer(String pServiceName) --- End of inner exception stack trace --- at IdeaBlade.EntityModel.Server.RemoteEntityService.GetHostedEntityServer(String pServiceName) at IdeaBlade.EntityModel.Server.RemoteEntityService.GetEntityServerName(String dataSourceExtension, String compositionContextName) at SyncInvokeGetEntityServerName(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
 
this is my ServiceReferences.ClientConfig section from my Silverlight Application
 
<configuration>
   <system.serviceModel>
    <client>
      <endpoint name="EntityService"
                address="http://dataservices.leafdev.lbmx.com/LEAF BOS/EntityService.svc/sl"
                binding="customBinding" bindingConfiguration="customBinaryBinding"
                contract="IdeaBlade.EntityModel.IEntityServiceContractAsync"
                />
      <!-- EntityServer endpoint    -->
      <endpoint name="EntityServer"
                address="http://dataservices.leafdev.lbmx.com/LEAF BOS/EntityServer.svc/sl"
                binding="customBinding" bindingConfiguration="customBinaryBinding"
                contract="IdeaBlade.EntityModel.IEntityServerContractAsync"
                />
    </client>
 
and here is my web config for my BOS server
 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true" />
    <services>
      <service name="EntityService">
        <endpoint address="" binding="customBinding" bindingConfiguration="compressedBinaryBinding" contract="IdeaBlade.EntityModel.IEntityServiceContract" />
        <endpoint address="sl" binding="customBinding" bindingConfiguration="customBinaryBindingSL" contract="IdeaBlade.EntityModel.IEntityServiceContract" />
      </service>
      <service name="IdeaBlade.EntityModel.Server.EntityServer">
        <endpoint address="" binding="customBinding" bindingConfiguration="compressedBinaryBinding" contract="IdeaBlade.EntityModel.IEntityServerContract" />
        <endpoint address="sl" binding="customBinding" bindingConfiguration="customBinaryBindingSL" contract="IdeaBlade.EntityModel.IEntityServerContract" />
      </service>
    </services>
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1278
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 04-Mar-2011 at 12:16pm
We call a WCF helper method named ServiceHostingEnvironment.EnsureServiceAvailable to start up the EntityServer service.  It looks like this call doesn't recognize a URI with the %20 as a valid URI and is therefore throwing.
 
I'm afraid there's no way of working around this right now.  In the next release we'll add a fix to translate the %20 back to a space, but until then the only thing you can do is change your IIS application name.
 
P.S. I'm curious why you're defining the serviceModel settings on both client and server - do you need to override the defaults, or has our documentation led you to believe this was necessary?
Back to Top
rickadams View Drop Down
Newbie
Newbie
Avatar

Joined: 04-Mar-2011
Posts: 12
Post Options Post Options   Quote rickadams Quote  Post ReplyReply Direct Link To This Post Posted: 04-Mar-2011 at 2:06pm
defining the serviceModel settings on both Client and Server were a result of making changes to both sides in an attempt to resolve this problem as I was not sure what was happening. I have made the changes to the IIS application name and I
can connect but only using the Servicereferences.ClientConfig on the client side
 
  <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
     <logging logFile="log\DebugLog.xml" />
   </ideablade.configuration>
  <system.serviceModel>
    <!-- Set aspNetCompatibilityEnabled to true to allow use of ASP.NET security features.
         Set multipleSiteBindingsEnabled to true for Azure or if your web site has multiple http bindings.
    -->
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="false" />
    <services>
      <service name="EntityService">
        <endpoint address="" binding="customBinding" bindingConfiguration="compressedBinaryBinding" contract="IdeaBlade.EntityModel.IEntityServiceContract" />
        <endpoint address="sl" binding="customBinding" bindingConfiguration="customBinaryBindingSL" contract="IdeaBlade.EntityModel.IEntityServiceContract" />
      </service>
      <service name="IdeaBlade.EntityModel.Server.EntityServer">
        <endpoint address="" binding="customBinding" bindingConfiguration="compressedBinaryBinding" contract="IdeaBlade.EntityModel.IEntityServerContract" />
        <endpoint address="sl" binding="customBinding" bindingConfiguration="customBinaryBindingSL" contract="IdeaBlade.EntityModel.IEntityServerContract" />
      </service>
    </services>
 
I am now using client side code in the Silverlight app and passing in the EntityService information via initParams. I am also setting values in IsolatedStorage as I  need to support OOB mode. Here is that web.config
 
<?xml version="1.0"?>
<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
  <appSettings>
    <add key="RemoteBaseURL" value="http://dataservices.leafdev.lbmx.com/LEAFBOS"/>
    <add key="RemoteBasePort" value="80"/>
    <add key="RemoteBaseServiceName" value="EntityService.svc/sl"/>
  </appSettings>
</configuration>
this approach does not work using the IdeaBlade.Core.IdeaBladeConfig.Instance and setting the values from the web.config. I have found that I need to use the Servicereferences.ClientConfig on the Silverlight client. I would like to be able to set my IdeaBlade server configuration in code. Any suggestions?
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1278
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 04-Mar-2011 at 2:51pm
A Silverlight application which does not have either an app.config or a ServiceReferences.ClientConfig will assume that the EntityService address is from the same host as the XAP was downloaded from.  So, if the XAP was downloaded from http://dataservices.leafdev.lbmx.com/LEAFBOS/ClientBin/, then the service address default would be http://dataservices.leafdev.lbmx/LEAFBOS/EntityService.svc/sl.   So if this is correct you don't need to manually specify the service information to SL at all.
 
If you do find you need or want to pass the info in the appSettings, the RemoteBaseURL and service name here are actually incorrect.  We don't document this very clearly, but the RemoteBaseUrl should just be the host name, in this case "http://dataservices.lbmx.com", and the service name should be "LEAFBOS/EntityService.svc/sl". 
 
 
Back to Top
rickadams View Drop Down
Newbie
Newbie
Avatar

Joined: 04-Mar-2011
Posts: 12
Post Options Post Options   Quote rickadams Quote  Post ReplyReply Direct Link To This Post Posted: 07-Mar-2011 at 7:18am
modifying the RemoteBaseURL and Servicename to the formats you suggested has resolved the problem. I am now able to connect using the IdeaBlade.Core.IdeaBladeConfig.Instance approach. This gives us a lot more flexibility in how we manage our connections and in supporting OOB.
 
Thanks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down