Base solution for your next web application
Open Closed

Deploy on IIS ERROR #2337


User avatar
0
avanekar02 created

when i enter the login page and enter credentials it throws the following error , i have attached the error page


7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    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 ?

  • User Avatar
    0
    avanekar02 created

    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

  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    avanekar02 created

    @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>

    &lt;meta content=&quot;width=device-width, initial-scale=1.0&quot; name=&quot;viewport&quot;&gt;
    &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge,chrome=1&quot;&gt;
    
    @* Fill these meta tags upon your project specification *@
    &lt;meta content=&quot;CmsProTest&quot; name=&quot;description&quot;&gt;
    &lt;meta content=&quot;CmsProTest&quot; name=&quot;keywords&quot;&gt;
    &lt;meta content=&quot;CmsProTest&quot; name=&quot;author&quot;&gt;
    
    @* You can enable and fill these lines according to documentation on &lt;a class=&quot;postlink&quot; href=&quot;http://ogp.me/&quot;&gt;http://ogp.me/&lt;/a&gt;
    &lt;meta property=&quot;og:site_name&quot; content=&quot;-CUSTOMER VALUE-&quot;&gt;
    &lt;meta property=&quot;og:title&quot; content=&quot;-CUSTOMER VALUE-&quot;&gt;
    &lt;meta property=&quot;og:description&quot; content=&quot;-CUSTOMER VALUE-&quot;&gt;
    &lt;meta property=&quot;og:type&quot; content=&quot;website&quot;&gt;
    &lt;meta property=&quot;og:image&quot; content=&quot;-CUSTOMER VALUE-&quot;&gt;
    &lt;meta property=&quot;og:url&quot; content=&quot;-CUSTOMER VALUE-&quot;&gt;*@
    
    &lt;link rel=&quot;shortcut icon&quot; href=&quot;~/favicon.ico&quot;&gt;
    
    &lt;link href=&quot;~/Content/fonts-open-sans.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
    &lt;link href=&quot;~/Content/fonts-ptsans-narrow.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
    &lt;link href=&quot;~/Content/fonts-sourcesans-pro.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
    
    @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")
    
    &lt;script type=&quot;text/javascript&quot;&gt;
        @* 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';
    &lt;/script&gt;
    

    </head> <body class="corporate">

    @Html.Action("Header", "Layout", new { currentPageName = ViewBag.CurrentPageName })
    
    &lt;div class=&quot;main&quot;&gt;
        &lt;div class=&quot;container&quot;&gt;
            @RenderBody()
        &lt;/div&gt;
    &lt;/div&gt;
    
    @Html.Partial("~/Views/Layout/_Footer.cshtml")
    
    
    
    @Scripts.Render("~/Bundles/Frontend/libs/js")
    
    &lt;script type=&quot;text/javascript&quot;&gt;
        abp.localization.defaultSourceName = '@LocalizationSourceName';
    &lt;/script&gt;
    
    
    &lt;script src=&quot;~/AbpScripts/GetScripts&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
    
    @Scripts.Render("~/Bundles/Frontend/metronic/js")
    
    @Scripts.Render("~/Bundles/Common/js")
    
    &lt;script type=&quot;text/javascript&quot;&gt;
        $(function () {
            Layout.init();
        });
    &lt;/script&gt;
    
    @RenderSection("Scripts", false)
    

    </body>

    </html>

  • User Avatar
    0
    avanekar02 created

    i tried running on another browser firefox, exactly the same error, i also re published after deleting .

  • User Avatar
    0
    velu created

    Hi,

    I am getting below mentioned error. Please help me on this.

    The name 'SetAntiForgeryCookie' does not exist in the current context

  • User Avatar
    0
    ismcagdas created
    Support Team

    @velu, we can continue here #2350.