title: Why might one app connect to SQL backend OK and a second app fail if they share the same connectionstring?
body: <p>Trying to figure out a SQL connection error 26 in our app.</p>
  
  <p>We've got two closely related apps Foo and FooAddIn. Foo is a Winforms app built in VS2010 and runs fine and connects fine to our SQLExpress back end.</p>
  
  <p>FooAddIn is an Outlook AddIn which references Foo.exe and connects to the same SQL Express instance. Or rather, it doesn't connect, instead reporting:</p>
  
  <blockquote>
  <pre><code>A network-related or instance-specific error occurred while establishing a connection
  to SQL Server. The server was not found or was not accessible. Verify that the 
  instance name is correct and that SQL Server is configured to allow remote 
  connections. (provider: SQL Network Interfaces, error: 26 - Error Locating 
  Server/Instance Specified)
  </code></pre>
  </blockquote>
  
  <p>Now, both apps share the same connectionstring and we've verified they really do share the same connectionstring. </p>
  
  <p>At this stage we're just testing from within the same developer machine, so the apps are on the same machine, going via the same VS2010 IDE.</p>
  
  <p>So a lot of the advice online for this error doesn't apply because the fact that Foo connects through to SQL Express tells us the database is there and available and can be reached.</p>
  
  <p>What else is there to check? One thing is that Foo and FooAddIn are running different runtime versions of <code>System.Data</code> (v2.0.50727 and v4.0.30319). Could that be a factor?</p>