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 501:
Line 502:
Line 503:		conn.ConnectionString = ConfigurationManager.ConnectionStrings("IrolloConnectionString").ConnectionString
Line 504:
Line 505:		cmd.CommandText = String.Format("Select Percorso From FotoHomePage WHERE Categoria='{0}'", qualecategoria)

Source File: D:\inetpub\webs\dtsgroupit\App_Code\funzionicomuni.vb    Line: 503

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   funzionicomuni.RecuperaFotoHomeCategoria(String qualecategoria) in D:\inetpub\webs\dtsgroupit\App_Code\funzionicomuni.vb:503
   index.Page_Load(Object sender, EventArgs e) in D:\inetpub\webs\dtsgroupit\index.aspx.vb:25
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2848


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