Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As neither the tests or the web application is working, it's likely that the problem you are seeing is because the configuration is not being loaded. I suspect that the following...</p> <pre><code>ConfigurationManager.ConnectionStrings["DomainDatabase"] </code></pre> <p>...returns null. The <em>NullReferenceException</em> is thrown when you attempt to access the <em>ConnectionString</em> property on that null object (reference). I would verify that your configuration for connectionStrings matches the definition defined <a href="http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.connectionstrings.aspx" rel="nofollow noreferrer">here</a>: </p> <p>You can verify that your settings aren't being loaded with the following test:</p> <pre><code>[TestMethod] public void VerifyThatMyDatabaseConnectionStringExists() { Assert.IsNotNull(ConfigurationManager.ConnectionStrings["DomainDatabase"]); } </code></pre> <p>If this test fails, add an app.config to your test project with the proper configuration. You will know that you have solved this problem when ...<a href="http://www.google.ca/search?q=when%20you%20can%20take%20this%20pebble%20from%20my%20hand" rel="nofollow noreferrer">you can take this pebble from my hand</a> -- no wait, wrong reference -- this test passes.</p> <p>Tip: <a href="https://stackoverflow.com/questions/344069/can-a-unit-test-project-load-the-target-applications-app-config-file/344233#344233">This answer</a> suggests you should write tests to verify that your settings are present to prevent madness.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload