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 31:         ClassLibrary.ILingua reg = ClassLibrary.Factory.CreateLinguaService();
Line 32:         DataSet ds = reg.GetByID(idlingua);
Line 33:         DataRow dr = (DataRow)ds.Tables["Linguas"].Rows[0];
Line 34:         string lingua = dr["Cultura"].ToString();
Line 35: 

Source File: c:\inetpub\vhosts\guiadoporto.net\httpdocs\info_empresas.aspx.cs    Line: 33

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   info_empresas.InitializeCulture() in c:\inetpub\vhosts\guiadoporto.net\httpdocs\info_empresas.aspx.cs:33
   ASP.info_empresas_aspx.__BuildControlTree(info_empresas_aspx __ctrl) in c:\inetpub\vhosts\guiadoporto.net\httpdocs\info_empresas.aspx:1
   ASP.info_empresas_aspx.FrameworkInitialize() in c:\inetpub\vhosts\guiadoporto.net\httpdocs\info_empresas.aspx.cs:912307
   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.info_empresas_aspx.ProcessRequest(HttpContext context) in c:\inetpub\vhosts\guiadoporto.net\tmp\root\99054418\59ca39c2\App_Web_yiilfjgz.0.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