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 24:         //remove wierd characters
Line 25: 
Line 26:         str = str.Replace("–", "-"); 
Line 27:         str = str.Replace("’", "'");
Line 28:         str = str.Replace("‘", "'");

Source File: d:\Inetpub\vhosts\4brmusic.com\httpdocs\App_Code\functions.cshtml    Line: 26

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.functions.CleanHTML(String phrase) in d:\Inetpub\vhosts\4brmusic.com\httpdocs\App_Code\functions.cshtml:26
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +252
   ASP._Page_news_cshtml.Execute() in d:\Inetpub\vhosts\4brmusic.com\httpdocs\news.cshtml:36
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +254
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +93
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +182
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +143


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