title: ASP.NET Web Pages Web Service Calls Redirecting to about:blank
body: <p>I just reformatted my computer and re-installed everything. I enabled IIS, the website I am working on in Visual Studio 2015 is working fine, even with the SQL database. However, none of my web services are returning any data. The web services are all .asmx web services. I tried going to the .asmx page itself and invoking the web methods, but all that happens is I am redirected to about:blank. This is after I successfully reach the asmx page, but after I click invoke on a specific web service.</p>
  
  <p>Furthermore, I have Fiddler running, and there isn't even an http request created at all. I have tried invoking the web services using the asmx page, the ajax control toolkit, and jQuery AJAX calls, all of which don't even produce an http request. The website is running in IIS.</p>
  
  <p>Any idea what could cause this behavior?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is some sample code.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          debugger;
          var vendorId = 5;
          var postData = JSON.stringify({ vendorId: vendorId });
  
          $.ajax({
              type: "POST",
              url: "../WebServices/BuildMaterialService.asmx/GetPurchaseOrderItemsByVendorId",
              data: postData,
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              timeout: 5000,
              success: function (data, textStatus, jqSHR) {
                  debugger;
                  data = data.d;
                  alert(data);
              },
              error: function (request, status, error) {
                  debugger;
                  if (status == "timeout")
                      alert("A timeout occurred. Please try again.");
                  else
                      alert("An unknown error occurred. Please try again.");
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Yes, jQuery is already loaded and working. The first debugger is hit, vendorId and postData are set correctly. The AJAX call never generates an HTTP request in Fiddler. In fact, it goes to the AJAX call, and when I hit F10, the next step is in some other background code. I'll let javascript run again and it stops again at the debugger command in the error function.</p>
  
  <p>Again, this code has been working perfectly fine for 3 years now, it only stopped working after reformatting. The code is correct, so the error might be from IIS.</p>
  
  <p>I'm trying to narrow down why, but actually that line <code>var vendorId = 5;</code> in my real code is replaced with <code>var vendorId = Number($('#ddlVendors :selected').val());</code> - this fails and goes immediately to the error function in the AJAX call without ever getting to the AJAX command. If I go in to the console and write the same line of code but change the variable name it works perfectly fine <code>var abc = Number($('#ddlVendors :selected').val());</code> - abc is set correctly here. It isn't anything to do with the variable name vendorId as I went in to the code and changed vendorId to abc and the same error happens. Even in the console, EVEN BEFORE that variable declaration is called (paused on debugger just before), I cannot declare a variable of whatever name I put there and assign the value. i.e. <code>var vendorId = 5;</code> fails but <code>var blabla = 5;</code></p>
  
  <p>Sorry this is long and confusing, but it's baffling me and hard to describe.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>I noticed that in IE it actually is successful. I took out the line <code>dataType: 'json',</code> which changed the behavior in Chrome so that it doesn't go to the error function, but rather the success function; however, the data is not actually returned from the server. Fiddler does show the http post from IE, but none exists from Chrome.</p>
  
  <p>Furthermore, still in IE the web service requests via the ajax toolkit are not working. I have noticed people saying to switch from using <code>&lt;asp:ScriptManager</code> to <code>&lt;ajaxToolkit:ToolkitScriptManager</code>. I don't know why suddenly after a reformat this would be necessary but I tried it. The result is I get an error <code>Could not load file or assembly 'AjaxMin, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The system cannot find the file specified.</code> The response from people online seems to be to install AjaxMin from NuGet. I did this but I still don't get the AjaxMin.dll file and it isn't installing the correct version. I tried using the command <code>Install-Package AjaxMin -Version 4.97.4951.28478</code> but it gives an error that it can't find that package. I'm not sure why that file is even being requested as I don't see any reference to AjaxMin anywhere in my project directory.</p>
  
  <p>I even downloaded the AjaxControlToolkit from <a href="https://github.com/DevExpress/AjaxControlToolkit/" rel="nofollow">https://github.com/DevExpress/AjaxControlToolkit/</a> and built it on my machine. I ran the sample site and went to cascading drop down samples and it doesn't work in Chrome, but does in IE. This is using IIS Express.</p>