Server Error in '/' Application.

Conversion from type 'DBNull' to type 'String' is not valid.

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.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.

Source Error:


Line 19:         'Response.Write(strFileName & "<br>")
Line 20: 
Line 21:         LabSiteMap.Text = Software.Get_Site_Name_and_Page_Name(strFileName, Request("ID"))
Line 22:         LabPageName.Text = Software.Gvar_Page_Name
Line 23:         Software.Hit_Counter(strFileName)

Source File: C:\htdocs\Kensol_FranklinHotStamp\A_Main_Master_Page.vb    Line: 21

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1033
   Get_Software_dll.Get_Software.Get_Software.Get_Site_Name_and_Page_Name(String strFileName, Int32 Page_ID) +2944
   MasterPage.Get_Site_Map() in C:\htdocs\Kensol_FranklinHotStamp\A_Main_Master_Page.vb:21
   ASP.a_main_master_page_master.Page_Load(Object sender, EventArgs e) in C:\htdocs\Kensol_FranklinHotStamp\A_Main_Master_Page.master:158
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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