Server Error in '/' Application.

Current node is null. This might be due to previewing an unpublished node. As the NodeFactory works with published data, macros using the node factory won't work in preview mode.
Parameter name: Current node is 1193

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.ArgumentException: Current node is null. This might be due to previewing an unpublished node. As the NodeFactory works with published data, macros using the node factory won't work in preview mode.
Parameter name: Current node is 1193

Source Error:


Line 82:         {
Line 83: 
Line 84:             var node = Node.GetCurrent();
Line 85:             BioLiteral.Text = node.Properties["bodyText"].ToString();
Line 86:             BioTextBox.Text = node.Properties["bodyText"].ToString();

Source File: d:\web\localuser\wcf3k.dk\public_html\usercontrols\team.ascx.cs    Line: 84

Stack Trace:


[ArgumentException: Current node is null. This might be due to previewing an unpublished node. As the NodeFactory works with published data, macros using the node factory won't work in preview mode.
Parameter name: Current node is 1193]
   umbraco.NodeFactory.Node.getCurrentNodeId() +297
   umbraco.NodeFactory.Node.GetCurrent() +9
   usercontrols_competitor.Page_Load(Object sender, EventArgs e) in d:\web\localuser\wcf3k.dk\public_html\usercontrols\team.ascx.cs:84
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   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