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 2682:		Dim UniqueWineLink As String = String.Empty
Line 2683:		UniqueWineLink += "/vin"
Line 2684:		If Not Land.ToLower = "okänt" Then UniqueWineLink += "/" + Land
Line 2685:		If Not Distrikt.ToLower = "okänt" Then UniqueWineLink += "/" + Distrikt
Line 2686:		UniqueWineLink += "/"

Source File: C:\Zenta\Web Projects\winefinder.web\App_Code\VB_Code\site_functions.vb    Line: 2684

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   site_functions.CreateSEOFullpostLink(String Land, String Distrikt, String Namn, String Producent, String Ar, String ArtNr) in C:\Zenta\Web Projects\winefinder.web\App_Code\VB_Code\site_functions.vb:2684
   cmsz_product_details.GetDataText() in C:\Zenta\Web Projects\winefinder.web\_Plugins\cmsz_product_details.ascx.vb:199
   cmsz_main.FindAndReplaceWithSpecialFunctions(String InPluginName, String textStr, Int32 getActualid) in C:\Zenta\Web Projects\winefinder.web\_System\cmsz_main.ascx.vb:228
   cmsz_main.LoopThroughSpecialFunctions(String InWebContent, Int32 incid) in C:\Zenta\Web Projects\winefinder.web\_System\cmsz_main.ascx.vb:160
   cmsz_main.GetPluginsContent(String ReqPid, String ReqHTML) in C:\Zenta\Web Projects\winefinder.web\_System\cmsz_main.ascx.vb:77
   _default.Page_Load(Object sender, EventArgs e) in C:\Zenta\Web Projects\winefinder.web\default.aspx.vb:521
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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