title: MVC 4 ConnectionString on my godaddy hosting Error 166
body: <p>I am testing a website, mvc 4 website; I am learning actually MVC.</p>
  
  <p>I have published the website to my personal hosting, on my computers works good, but once is on my hosting I have an error, here are the connection string first: (I am using northwind to practice)</p>
  
  <pre><code> &lt;add name="NorthwindEntities" connectionString="metadata=res://*/Models.NorthWindModel.csdl|res://*/Models.NorthWindModel.ssdl|res://*/Models.NorthWindModel.msl;
       provider=System.Data.SqlClient;
       provider connection string=&amp;quot;
       data source=**************.db.********.hostedresource.com;;
       initial catalog=**********;
       User ID=******;         
       MultipleActiveResultSets=True;
       App=EntityFramework&amp;quot;
       Password='********';
       integrated security=True;"
       providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>and here is the error:</p>
  
  <p>Format of the initialization string does not conform to specification starting at index 166. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
  
  <p>Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 166.</p>
  
  <p>Source Error: </p>
  
  <p>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  </p>
  
  <p>Stack Trace: </p>
  
  <p>[ArgumentException: Format of the initialization string does not conform to specification starting at index 166.]
     System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String&amp; keyname, String&amp; keyvalue) +5078242
     System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +132
     System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +98
     System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +118
     System.Data.EntityClient.EntityConnection..ctor(String connectionString) +81
     System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) +78
     System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) +32
     System.Data.Entity.Internal.LazyInternalConnection.Initialize() +131
     System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel() +13
     System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +281
     System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +18
     System.Data.Entity.Internal.Linq.InternalSet<code>1.Initialize() +56
     System.Data.Entity.Internal.Linq.InternalSet</code>1.GetEnumerator() +15
     System.Data.Entity.Infrastructure.DbQuery<code>1.System.Collections.Generic.IEnumerable&lt;TResult&gt;.GetEnumerator() +40
     System.Collections.Generic.List</code>1..ctor(IEnumerable<code>1 collection) +315
     System.Linq.Enumerable.ToList(IEnumerable</code>1 source) +58
     MvcApplication1.Controllers.HomeController.Index() +21
     lambda_method(Closure , ControllerBase , Object[] ) +62
     System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
     System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary<code>2 parameters) +188
     System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary</code>2 parameters) +27
     System.Web.Mvc.Async.&lt;>c_<em>DisplayClass42.b</em>_41() +28
     System.Web.Mvc.Async.&lt;>c_<em>DisplayClass8<code>1.&lt;BeginSynchronous&gt;b__7(IAsyncResult _) +12
     System.Web.Mvc.Async.WrappedAsyncResult</code>1.End() +50
     System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +29
     System.Web.Mvc.Async.&lt;>c</em>_DisplayClass39.b_<em>33() +59
     System.Web.Mvc.Async.&lt;>c</em>_DisplayClass4f.b_<em>49() +240
     System.Web.Mvc.Async.&lt;>c</em>_DisplayClass37.b_<em>36(IAsyncResult asyncResult) +12
     System.Web.Mvc.Async.WrappedAsyncResult<code>1.End() +50
     System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +31
     System.Web.Mvc.Async.&lt;&gt;c__DisplayClass2a.&lt;BeginInvokeAction&gt;b__20() +23
     System.Web.Mvc.Async.&lt;&gt;c__DisplayClass25.&lt;BeginInvokeAction&gt;b__22(IAsyncResult asyncResult) +128
     System.Web.Mvc.Async.WrappedAsyncResult</code>1.End() +50
     System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +26
     System.Web.Mvc.&lt;>c</em>_DisplayClass1d.b_<em>18(IAsyncResult asyncResult) +14
     System.Web.Mvc.Async.&lt;>c</em>_DisplayClass4.b_<em>3(IAsyncResult ar) +25
     System.Web.Mvc.Async.WrappedAsyncResult<code>1.End() +55
     System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +41
     System.Web.Mvc.Async.&lt;&gt;c__DisplayClass4.&lt;MakeVoidDelegate&gt;b__3(IAsyncResult ar) +25
     System.Web.Mvc.Async.WrappedAsyncResult</code>1.End() +55
     System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +28
     System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
     System.Web.Mvc.&lt;>c</em>_DisplayClass8.b_<em>3(IAsyncResult asyncResult) +28
     System.Web.Mvc.Async.&lt;>c</em>_DisplayClass4.b__3(IAsyncResult ar) +25
     System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
     System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +30
     System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
     System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970061
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +184</p>
  
  <p>So, what in the world is happening? I have tried many different connectionStrings without success.</p>
  
  <p>Thanks</p>