Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET Website failure - DataAccessLayer threw an exception
    text
    copied!<p>I have an ASP.NET 4.0 website hosted on GoDaddy that has a database. My site will not coming up. I think it's my database connection - </p> <p>My connection string -</p> <pre><code> &lt;connectionStrings&gt; &lt;add name="Personal" connectionString=" Server=xyz.com; Database=xyzDb; User ID=xyzUser; Password=xyzPass; Trusted_Connection=false" providerName="System.Data.SqlClient" /&gt; &lt;remove name="LocalSqlServer"/&gt; &lt;add name="LocalSqlServer" connectionString=" Server=abc.com; Database=abcDb; User ID=abcUser; Password=abcPass; Trusted_Connection=false" providerName="System.Data.SqlClient" /&gt; &lt;/connectionStrings&gt; </code></pre> <p>The error from my page -</p> <blockquote> <p>Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.</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>[NullReferenceException: Object reference not set to an instance of an object.] FonyFacts02.DataAccessLayer..ctor() +74<br> FonyFacts02.DataAccessLayer..cctor() +39</p> <p>[TypeInitializationException: The type initializer for 'FonyFacts02.DataAccessLayer' threw an exception.]<br> FonyFacts02.DataAccessLayer.GetInstance() +0<br> FonyFacts02.FonyFacts..ctor() +34<br> FonyFacts02.Default.Page_Load(Object sender, EventArgs e) +99<br> System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14<br> System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +91<br> System.Web.UI.Control.LoadRecursive() +74<br> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207</p> </blockquote> <p>Can anyone tell me if it is actually my connection string or something else? The website is located at - <a href="http://www.fonyfacts.com/" rel="nofollow">http://www.fonyfacts.com/</a> Thanks</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