7 Answer(s)
-
0
Hi,
It seems like _Layout.cshtml of Account does not include consts.js.
It is included in _Layout.cshtml here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/5fef9a8e7b894fd9586eba9f8dc50bbd3e629b2f/src/MyCompanyName.AbpZeroTemplate.Web/Views/Account/_Layout.cshtml#L111">https://github.com/aspnetzero/aspnet-ze ... shtml#L111</a>.
Can you check it in your project ? This is the file <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/5fef9a8e7b894fd9586eba9f8dc50bbd3e629b2f/src/MyCompanyName.AbpZeroTemplate.Web/Common/Scripts/consts.js">https://github.com/aspnetzero/aspnet-ze ... /consts.js</a>.
By the way, do you have this problem in development time ?
-
0
No , in development environment it runs fine.....
the error shows
Uncaught ReferenceError: angular is not defined 4Login.js?v=635907020060000000:61 Uncaught TypeError: Cannot read property 'consts' of undefined
-
0
Hi,
Can you share your _Layout.cshtml under Views/Account folder ? In the mean time you can try to delete files in IIS folder and re-publish your website.
One more thing, you can try to enter this page with a different browser. Current browser might cache javascript files.
-
0
@using System.Web.Optimization @using Abp.Web.Mvc.Extensions @using Samit.CmsProTest.Localization @{ SetAntiForgeryCookie(); } <!DOCTYPE html>
<html lang="en" dir=@(CultureHelper.IsRtl ? "rtl" : "")>
<head> <meta charset="utf-8"> <title>CmsProTest</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> @* Fill these meta tags upon your project specification *@ <meta content="CmsProTest" name="description"> <meta content="CmsProTest" name="keywords"> <meta content="CmsProTest" name="author"> @* You can enable and fill these lines according to documentation on <a class="postlink" href="http://ogp.me/">http://ogp.me/</a> <meta property="og:site_name" content="-CUSTOMER VALUE-"> <meta property="og:title" content="-CUSTOMER VALUE-"> <meta property="og:description" content="-CUSTOMER VALUE-"> <meta property="og:type" content="website"> <meta property="og:image" content="-CUSTOMER VALUE-"> <meta property="og:url" content="-CUSTOMER VALUE-">*@ <link rel="shortcut icon" href="~/favicon.ico"> <link href="~/Content/fonts-open-sans.css" rel="stylesheet" type="text/css"/> <link href="~/Content/fonts-ptsans-narrow.css" rel="stylesheet" type="text/css"/> <link href="~/Content/fonts-sourcesans-pro.css" rel="stylesheet" type="text/css" /> @Styles.Render("~/Bundles/Frontend/libs/css" + (CultureHelper.IsRtl ? "RTL" : "")) @RenderSection("Styles", false) @Styles.Render("~/Bundles/Frontend/metronic/css" + (CultureHelper.IsRtl ? "RTL" : "")) @Styles.Render("~/Bundles/Common/css") @Html.IncludeStyle("~/Views/Layout/layout.css") <script type="text/javascript"> @* This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS. *@ var abp = abp || {}; abp.appPath = '@ApplicationPath'; </script>
</head> <body class="corporate">
@Html.Action("Header", "Layout", new { currentPageName = ViewBag.CurrentPageName }) <div class="main"> <div class="container"> @RenderBody() </div> </div> @Html.Partial("~/Views/Layout/_Footer.cshtml") @Scripts.Render("~/Bundles/Frontend/libs/js") <script type="text/javascript"> abp.localization.defaultSourceName = '@LocalizationSourceName'; </script> <script src="~/AbpScripts/GetScripts" type="text/javascript"></script> @Scripts.Render("~/Bundles/Frontend/metronic/js") @Scripts.Render("~/Bundles/Common/js") <script type="text/javascript"> $(function () { Layout.init(); }); </script> @RenderSection("Scripts", false)
</body>
</html>
-
0
i tried running on another browser firefox, exactly the same error, i also re published after deleting .
-
0
Hi,
I am getting below mentioned error. Please help me on this.
The name 'SetAntiForgeryCookie' does not exist in the current context