title: Blazor server side with form submit on IIS
body: <p>I have a Blazor server-side project with form submit:</p>
  
  <pre><code>        &lt;EditForm Model="@myWebUserVM" OnValidSubmit="HandleValidSubmit"&gt;
              &lt;DataAnnotationsValidator /&gt;
              &lt;ValidationSummary /&gt;
              @if (IsPasswordIncorrect)
              {&lt;h6 class="text-danger"&gt;User Name or Password is incorrect.&lt;/h6&gt;}
              &lt;div class="row"&gt;
                  &lt;label class="col-md-4"&gt;User Name:&lt;/label&gt;
                  &lt;div class="col-md-8"&gt;
                      &lt;InputText id="uname" class="form-control" placeholder="User Name" @bind-Value="myWebUserVM.UserName" /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="row my-3"&gt;
                  &lt;label class="col-md-4"&gt;Password:&lt;/label&gt;
                  &lt;div class="col-md-8"&gt;
                      &lt;InputText id="upassword" class="form-control" type="password" placeholder="Password" @bind-Value="myWebUserVM.Password" /&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="text-center"&gt;
                  &lt;button class="btn btn-outline-success" type="submit"&gt;Login&lt;/button&gt;
              &lt;/div&gt;
          &lt;/EditForm&gt;
  </code></pre>
  
  <p>This works perfectly when I run it locally in VS2019. When I publish to IIS the form works differently. Hitting the submit button will http post to server and the page/form just reloads. So it looks like I just open it first time or pressed F5 in the browser. Code in "private void HandleValidSubmit()" will not hit. That looks like I just post a regular form with HTTP. But this is a SPA, I do not need it to post over HTTP. What should be the correct code for Blazor form with validation? Why it works in VS2019 debug mode? Or, most likely, the IIS setup required?
  Thanks.</p>