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:


Line 48:         ClassLibrary.ILingua reg = ClassLibrary.Factory.CreateLinguaService();
Line 49:         DataSet ds = reg.GetByID(idlingua);
Line 50:         DataRow dr = (DataRow)ds.Tables["Linguas"].Rows[0];
Line 51:         string lingua = dr["Cultura"].ToString();
Line 52: 

Source File: c:\inetpub\vhosts\infantarioabc.com\httpdocs\formularios.aspx.cs    Line: 50

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   formularios.InitializeCulture() in c:\inetpub\vhosts\infantarioabc.com\httpdocs\formularios.aspx.cs:50
   ASP.formularios_aspx.__BuildControlTree(formularios_aspx __ctrl) in c:\inetpub\vhosts\infantarioabc.com\httpdocs\formularios.aspx:1
   ASP.formularios_aspx.FrameworkInitialize() in c:\inetpub\vhosts\infantarioabc.com\httpdocs\formularios.aspx.cs:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +48
   System.Web.UI.Page.ProcessRequest() +76
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +24
   System.Web.UI.Page.ProcessRequest(HttpContext context) +62
   ASP.formularios_aspx.ProcessRequest(HttpContext context) in c:\inetpub\vhosts\infantarioabc.com\tmp\root\e48295a7\41d66614\App_Web_eis5ouoc.6.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +195
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4330.0