locked
Toggle cookie consent banner RRS feed

  • Question

  • User-1104215994 posted

    Hi,

    I have an asp.net core 2.1 MVC application running on IIS. The problem is there is this tag on the page I would like to get rid of. How can I fix this? In <g class="gr_ gr_211 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="211" data-gr-id="211">development</g> there is no such thing.

            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#cookieConsent .navbar-collapse">
                        <span class="sr-only">Toggle cookie consent banner</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <span class="navbar-brand"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></span>
                </div>
                <div class="collapse navbar-collapse">
                    <p class="navbar-text">
                        Use this space to summarize your privacy and cookie use policy.
                    </p>
                    <div class="navbar-right">
                        <a class="btn btn-info navbar-btn" href="/Home/Privacy">Learn More</a>
                        <button type="button" class="btn btn-default navbar-btn" data-cookie-string=".AspNet.Consent=yes; expires=Sun, 13 Sep 2020 17:14:34 GMT; path=/; samesite=lax">Accept</button>
                    </div>
                </div>
            </div>
        

    Saturday, September 14, 2019 5:21 PM

Answers

  • User475983607 posted

    I don't need cookies.

    //app.UseCookiePolicy();

    The banner comes with of the standard Visual Studio template as clearly and openly covered in my previous link.  You are supposed to read the link.  Anyway the link shows the two location in the startup.cs file you'll need to delete and the associated HTML.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 15, 2019 11:17 AM

All replies

  • User475983607 posted

    You want to remove cookie consent (GDPR)?

    https://docs.microsoft.com/en-us/aspnet/core/security/gdpr?view=aspnetcore-2.2

    Saturday, September 14, 2019 5:43 PM
  • User-1104215994 posted

    I don't need cookies.

    //app.UseCookiePolicy();

    Saturday, September 14, 2019 7:33 PM
  • User409696431 posted

    If the code is on the production site, someone put it there.  It didn't get added by itself.  You'll have to find out how it got added, if it is not in your development code, in order to remove it and make sure it isn't re-added on an update.

    Sunday, September 15, 2019 12:31 AM
  • User475983607 posted

    I don't need cookies.

    //app.UseCookiePolicy();

    The banner comes with of the standard Visual Studio template as clearly and openly covered in my previous link.  You are supposed to read the link.  Anyway the link shows the two location in the startup.cs file you'll need to delete and the associated HTML.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, September 15, 2019 11:17 AM
  • User-284610338 posted

    This is the best one where you get all the information related to the cookie banner.

    Wednesday, September 2, 2020 10:33 AM
  • User-1679975208 posted

    yes you are right.

    using information provided here, i am compliant now with gdpr using cookie consent tool.

    Tuesday, February 2, 2021 9:23 AM