title: An error occurred while executing the command definition - WCF
body: <p>I've updated my model and done rebuilding the project (as suggested by stackoverflow) but no benefit. </p>
  
  <p>My ASP.NET wcf webservice is working fine on local host. But when I upload it to AppHarbor (free asp.net web hosting service) I get an exception (I'm calling like this <a href="http://pizzaapp.apphb.com/Service1.svc/Login/123/1" rel="nofollow">http://pizzaapp.apphb.com/Service1.svc/Login/123/1</a>) which I can't understand (shown below). This works perfectly on my localhost, so what's the problem after uploading?</p>
  
  <blockquote>
    <p>Request Error The server encountered an error processing the request.
    The exception message is 'An error occurred while executing the
    command definition. See the inner exception for details.'. See server
    logs for more details. The exception stack trace is:</p>
    
    <p>at
    System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand
    entityCommand, CommandBehavior behavior) at
    System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext
    context, ObjectParameterCollection parameterValues) at
    System.Data.Entity.Core.Objects.ObjectQuery<code>1.&lt;&gt;c__DisplayClass3.&lt;GetResults&gt;b__2()
    at
    System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func</code>1
    func, IDbExecutionStrategy executionStrategy, Boolean
    startLocalTransaction, Boolean releaseConnectionOnSuccess) at
    System.Data.Entity.Core.Objects.ObjectQuery<code>1.&lt;&gt;c__DisplayClass3.&lt;GetResults&gt;b__1()
    at
    System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func</code>1
    operation) at
    System.Data.Entity.Core.Objects.ObjectQuery<code>1.GetResults(Nullable</code>1
    forMergeOption) at
    System.Data.Entity.Core.Objects.ObjectQuery<code>1.&lt;System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator&gt;b__0()
    at System.Lazy</code>1.CreateValue() at System.Lazy<code>1.LazyInitValue() at
    System.Lazy</code>1.get_Value() at
    System.Data.Entity.Internal.LazyEnumerator<code>1.MoveNext() at
    System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable</code>1 source)
    at
    System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.b__2[TResult](IEnumerable<code>1
    sequence) at
    System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable</code>1
    query, Expression queryRoot) at
    System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression
    expression) at
    System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression
    expression) at
    System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source) at
    WcfServicePizza.Service1.Login(String phoneNo, String password) in
    d:\temp\lmtrshzg.bwx\input\WcfServicePizza\Service1.svc.cs:line 37 at
    SyncInvokeLogin(Object , Object[] , Object[] ) at
    System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object
    instance, Object[] inputs, Object[]&amp; outputs) at
    System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;
    rpc) at
    System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;
    rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
    isOperationContextSet)</p>
  </blockquote>
  
  <p>The code for the webservice interface</p>
  
  <pre><code>    [OperationContract]
      [WebInvoke(UriTemplate="SignUp",
          Method="POST",
          BodyStyle=WebMessageBodyStyle.WrappedRequest,
          ResponseFormat=WebMessageFormat.Json,
          RequestFormat=WebMessageFormat.Json)]
      bool SignUp(Customer customer);
  </code></pre>
  
  <p>And code for its implementation running on the server currently is:</p>
  
  <pre><code>    public bool Login(string phoneNo, string password)
      {
          decimal phoneNoDecimal = Decimal.Parse(phoneNo);
          DatabasePizzaEntities db = new DatabasePizzaEntities();
          Customer customer = db.Customers.Where(c =&gt; c.PhoneNo==phoneNoDecimal &amp;&amp; c.Password == password).SingleOrDefault();
          if (customer == null)
              return false;
          return true;
      }
  </code></pre>
  
  <p>INNER EXCEPTION:</p>
  
  <blockquote>
    <p>Data.SqlClient.SqlException (0x80131904): Invalid object name
    'dbo.Customer'.\u000d\u000a   at
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
    Boolean breakConnection, Action<code>1 wrapCloseInAction)\u000d\u000a   at
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    exception, Boolean breakConnection, Action</code>1
    wrapCloseInAction)\u000d\u000a   at
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj, Boolean callerHasConnectionLock, Boolean
    asyncClose)\u000d\u000a   at
    System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior,
    SqlCommand cmdHandler, SqlDataReader dataStream,
    BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
    stateObj, Boolean&amp; dataReady)\u000d\u000a   at
    System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()\u000d\u000a<br>
    at System.Data.SqlClient.SqlDataReader.get_MetaData()\u000d\u000a   at
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    RunBehavior runBehavior, String resetOptionsString)\u000d\u000a   at
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
    async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader
    ds)\u000d\u000a   at
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
    method, TaskCompletionSource<code>1 completion, Int32 timeout, Task&amp; task,
    Boolean asyncWrite)\u000d\u000a   at
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
    method)\u000d\u000a   at
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
    behavior, String method)\u000d\u000a   at
    System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
    behavior)\u000d\u000a   at
    System.Data.Common.DbCommand.ExecuteReader(CommandBehavior
    behavior)\u000d\u000a   at
    System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.&lt;&gt;c__DisplayClassb.&lt;Reader&gt;b__8()\u000d\u000a
    at
    System.Data.Entity.Infrastructure.Interception.InternalDispatcher</code>1.Dispatch[TInterceptionContext,TResult](Func<code>1
    operation, TInterceptionContext interceptionContext, Action</code>1
    executing, Action`1 executed)\u000d\u000a   at
    System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand
    command, DbCommandInterceptionContext interceptionContext)\u000d\u000a
    at
    System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior
    behavior)\u000d\u000a   at
    System.Data.Common.DbCommand.ExecuteReader(CommandBehavior
    behavior)\u000d\u000a   at
    System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand
    entityCommand, CommandBehavior
    behavior)\u000d\u000aClientConnectionId:2c6eb8fd-ce5b-4866-8dc7-5ff565fb11d5\u000d\u000aError
    Number:208,State:1,Class:16"</p>
  </blockquote>