title: CS0103 The name 'Request' does not exist in the current context
body: <p>I am trying to Implement <a href="https://pusher.com/tutorials/realtime-comments-aspnet#creating-our-view-files" rel="nofollow noreferrer">this</a> in an asp.netcoreapp2.2 mvc <a href="https://github.com/sabertooth9/MovieBlend/tree/comment-add" rel="nofollow noreferrer">project</a> but this is giving me error . I Downloaded their code and it complies fine. Here Request is HttpRequestBase WebpageRenderingPage which isn't seems to be available in my Project </p>
  
  <p>I tried to add System.web.dll manually but that doesn't work.
  Used Headers in PostDetailController.cs</p>
  
  <pre><code>using System;
  using System.Threading.Tasks;
  using Microsoft.AspNetCore.Mvc;
  using MovieBlend.Models;
  using MovieBlend.Services;
  using PusherServer;
  using Microsoft.AspNetCore.Identity;
  using Microsoft.AspNetCore.Authorization;
  using System.Web;
  </code></pre>
  
  <p>Index.cshtml</p>
  
  <pre><code>@model MovieData
  @{
      ViewData["Title"] = Model.Title;
  }
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.16.2/axios.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://js.pusher.com/4.0/pusher.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      var pusher
  &lt;/script&gt;
  @using Humanizer
  @using StmlParsing
  &lt;style&gt;
      .user_name {
          font-size: 14px;
          font-weight: bold;
      }
  
      .comments-list .media {
          border-bottom: 1px dotted #ccc;
      }
  
      h1 {
          color: snow;
          text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
      }
  
      h3 {
          text-align: center;
          color: snow;
          text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
      }
  
      .poster_name {
          text-align: left;
          color: darkred;
          text-decoration: underline
      }
  
      section {
          width: 100%;
          float: left;
      }
  
      .banner-section {
          background-image: url("https://static.pexels.com/photos/373912/pexels-photo-373912.jpeg");
          background-size: cover;
          height: 380px;
          left: 0;
          position: absolute;
          top: inherit;
          background-position: 0;
      }
  
      .post-title-block {
          padding: 100px 0;
      }
  
          .post-title-block h1 {
              color: #fff;
              font-size: 85px;
              font-weight: bold;
              text-transform: capitalize;
          }
  
          .post-title-block li {
              font-size: 20px;
              color: #fff;
          }
  
      .image-block {
          float: left;
          width: 100%;
          margin-bottom: 10px;
      }
  
      .footer-link {
          float: left;
          width: 100%;
          background: #222222;
          text-align: center;
          padding: 30px;
      }
  
          .footer-link a {
              color: #A9FD00;
              font-size: 18px;
              text-transform: uppercase;
          }
  
      .div-post {
          margin-top: 45px;
      }
  &lt;/style&gt;
  &lt;div id="app"&gt;
      &lt;section class="banner-section"&gt;&lt;/section&gt;
      &lt;section class="post-content-section"&gt;
          &lt;div class="container"&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-lg-12 col-md-12 col-sm-12 post-title-block"&gt;
                      &lt;h1 class="text-center"&gt;@Model.Title&lt;/h1&gt;
                      &lt;h3&gt; @Model.Release | @Model.Language | @Model.Genre&lt;/h3&gt;
                  &lt;/div&gt;
                  &lt;div class="col-lg-9 col-md-9 col-sm-12 div-post"&gt;
                      &lt;p&gt;
                          &lt;h6 class="poster_name"&gt;Posted By @Model.User_name&lt;/h6&gt;
                          &lt;h7 class="poster_name"&gt;Posted @Model.Postedate.Humanize()&lt;/h7&gt;
                          &lt;br /&gt;@Html.Raw(@StmlParser.Parse(Model.Description))
                      &lt;/p&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/section&gt;
      &lt;div class="container"&gt;
          &lt;br /&gt;
          &lt;p&gt;You Comment&lt;/p&gt;
          &lt;form onsubmit="return false;"&gt;
              &lt;input type="text" id="Name" placeholder="Your Name" v-model="comment.Name" class="form-control" /&gt;
              &lt;textarea rows="3" placeholder="Your Comment" id="Body" v-model="comment.Body" class="form-control"&gt;&lt;/textarea&gt;
              &lt;button class="btn btn-success" v-on:click="submit_comment()"&gt;save&lt;/button&gt;
          &lt;/form&gt;
      &lt;/div&gt;
      &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class="page-header"&gt;
                  &lt;h3&gt;&lt;small class="pull-right"&gt;{{comments.length}}&lt;/small&gt;Comments&lt;/h3&gt;
              &lt;/div&gt;
              &lt;div class="comments-list"&gt;
                  &lt;div class="media-body"&gt;
                      &lt;h4 class="media-heading user_name"&gt;{{com.name}}&lt;/h4&gt;
                      {{com.body}}
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;script&gt;
      var pusher = new Pusher('7ba0ddfcfbfe565ee8ee', {
          cluster: 'ap2'
      });
      var my_channel = pusher.subscribe('asp_channel');
      var app = new Vue({
          el: '#app',
          data: {
              comments: [],
              comment: {
                  Name: '',
                  Body: '',
                  BlogPostID: @Model.Id
              }
          },
          created: function() {
              this.get_comments();
              this.listen();
          },
          methods: {
  
              get_comments: function() {
                  axios.get('@Url.Action("Comments", "PostDetail", new { id = @Model.Id }, protocol: Request.Url.Scheme)')
                      .then((response) =&gt; {
  
                          this.comments = response.data;
  
                      });
  
              },
              listen: function() {
                  my_channel.bind("asp_event", (data) =&gt; {
                      if (data.BlogPostID == this.comment.BlogPostID) {
                          this.comments.push(data);
                      }
  
                  })
              },
              submit_comment: function() {
                  axios.post('@Url.Action("AddComment", "PostDetail", new {}, protocol: Request.Url.Scheme)', this.comment)
                      .then((response) =&gt; {
                          this.comment.Name = '';
                          this.comment.Body = '';
                          alert("Comment Submitted");
  
                      });
              }
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Its giving me error in this lines</p>
  
  <pre><code> axios.post('@Url.Action("AddComment", "PostDetail", new {}, protocol: Request.Url.Scheme)', this.comment)
  </code></pre>
  
  <p>and </p>
  
  <pre><code> axios.get('@Url.Action("Comments", "PostDetail", new { id = @Model.Id }, protocol: Request.Url.Scheme)')
  </code></pre>
  
  <p>saying Request isn't available</p>
  
  <p>csporj file</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk.Web"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.2&lt;/TargetFramework&gt;
      &lt;UserSecretsId&gt;aspnet-MovieBlend-2E001261-E25D-4A77-9170-29F16D765657&lt;/UserSecretsId&gt;
      &lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;
      &lt;GeneratePackageOnBuild&gt;true&lt;/GeneratePackageOnBuild&gt;
    &lt;/PropertyGroup&gt;
  
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="CoreCompat.System.Drawing" Version="1.0.0-beta006" /&gt;
      &lt;PackageReference Include="Humanizer" Version="2.6.2" /&gt;
      &lt;PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.App" /&gt;
      &lt;PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" /&gt;
      &lt;PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" /&gt;
      &lt;PackageReference Include="Newtonsoft.Json" Version="12.0.2" /&gt;
      &lt;PackageReference Include="PusherServer" Version="4.1.0" /&gt;
      &lt;PackageReference Include="StmlParser" Version="1.0.2" /&gt;
    &lt;/ItemGroup&gt;
  
  
    &lt;ItemGroup&gt;
      &lt;Reference Include="System.Web"&gt;
        &lt;HintPath&gt;E:\Downloads\Compressed\System.Web\System.Web.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.Abstractions"&gt;
        &lt;HintPath&gt;E:\Downloads\Compressed\System.Web.Abstractions\System.Web.Abstractions.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  
  </code></pre>
  
  <p>How to solve this problem?</p>