I have a page that first checks to see if the message property contains a value, if it does then display it. The problem is that when I publish the site to the web server, the page displays an error; see attached. If I comment out the alert(msg) the page displays without an error. If I uncomment, it errors out. Not knowing enough about this I'm not sure what to consider as the problem. i suspect it's iis related or permissions, but not sure.
var msg = '@ViewData["Message"]';
if (msg != "")
alert(msg); //problem line