Object reference not set to an instance of an object

Developer
Mar 10, 2011 at 12:25 AM

I've tried everything in the other discussions.....

Still cant get past this error, any help will be appreciated.

-----------------------------------------------

 

Server Error in '/' Application.

Object reference not set to an instance of an object.

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.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   shfa.snomtastic.data.SqlDataProvider..ctor() +28
   shfa.snomtastic.data.business.AppConfigController..ctor() +23
   shfa.snomtastic.data.business.AppConfig..ctor() +51
   shfa.snomtastic.root._Default..ctor() +26
   ASP.default_aspx..ctor() +13
   __ASP.FastObjectFactory_app_web_jd1s5dxc.Create_ASP_default_aspx() +20
   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +119
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
   System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155



Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016

<!-- [NullReferenceException]: Object reference not set to an instance of an object. at shfa.snomtastic.data.SqlDataProvider..ctor() at shfa.snomtastic.data.business.AppConfigController..ctor() at shfa.snomtastic.data.business.AppConfig..ctor() at shfa.snomtastic.root._Default..ctor() at ASP.default_aspx..ctor() at __ASP.FastObjectFactory_app_web_jd1s5dxc.Create_ASP_default_aspx() at System.Web.Compilation.BuildResultCompiledType.CreateInstance() at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->
Developer
Mar 10, 2011 at 12:30 AM

Sorry, but SNOM sales dept recommended yall's software for out 200+ SNOM-OCS deployment, but I just cant get it running.

<-- "Have LiveMeeting, will screen share"

Mar 10, 2011 at 12:34 AM

OK, the bit at the top of the error message where it says "The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps" is telling you that what you're seeing isn't the real error. You need to enable debug mode to see the real error. To enable debug mode you need to do either 1 or 2 in that error message.

I personally always found 2 to be the quicker one.

Do one or the other of those two things, go back to that page again and you should see a different (and much more useful) error message.

Developer
Mar 10, 2011 at 12:49 AM

the 2nd debug option (editing the release.config fine in the root dir) produces the above page

debug option #1 produces this information

 

Server Error in '/' Application.

Object reference not set to an instance of an object.

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.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2111cad2\e1850b73\App_Web_vx8k7mdi.0.cs    Line: 0

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   shfa.snomtastic.data.SqlDataProvider..ctor() +28
   shfa.snomtastic.data.business.AppConfigController..ctor() +23
   shfa.snomtastic.data.business.AppConfig..ctor() +51
   shfa.snomtastic.root._Default..ctor() +26
   ASP.default_aspx..ctor() in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2111cad2\e1850b73\App_Web_vx8k7mdi.0.cs:0
   __ASP.FastObjectFactory_app_web_vx8k7mdi.Create_ASP_default_aspx() in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2111cad2\e1850b73\App_Web_vx8k7mdi.1.cs:0
   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +119
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
   System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155



Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016

Developer
Mar 10, 2011 at 1:27 AM

Now getting this error....

 

Internet Information Services 7.0

<fieldset><legend>Error Summary</legend>

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

</fieldset>
<fieldset><legend>Detailed Error Information</legend>
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x8007000d
Config Error Configuration file is not well-formed XML
Config File \\?\C:\SNOM-PROV-WEBsite\shfa.snomtastic.root\web.config
Requested URL http://ocs-prov-01.sbl.na:80/
Physical Path  
Logon Method Not yet determined
Logon User Not yet determined
</fieldset>
<fieldset><legend>Config Source</legend>
   17: 	</configSections>
   18:   <connectionStrings>    <add name="cnn" connectionString="Data Source=OCS-PROV-01\SNOMPROV; Initial Catalog=SnomTastic; User Id=snom; Password=snomprov; providerName="System.Data.SqlClient"/>  </connectionStrings>  <appSettings>
   19:     <add key="EncryptionPassPhrase" value="p@55werd"/>
</fieldset>
<fieldset><legend>Links and More Information</legend>This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

View more information »

</fieldset>