Note that there are some explanatory texts on larger screens.

plurals
  1. POMvc action returns 401 error
    text
    copied!<p>This is a strange one. They always are when I get to this point.</p> <p>I have an MVC app. It's a single page app so all routes are ajax calls but I don't think this is relevant.</p> <p>Strangely and all of a sudden one particular page has started giving me a 401 and prompting for creds. Actually it's both pages that are in this MVC Area. It is only doing it in qa no locally so I can't debug. And It only started after last push. None of the other pages are doing this.</p> <p>So I compared the headers via fiddler for a successful page and the 401 page on the site. exactly the freakin same except the url. the actions</p> <p>the action for 401</p> <pre><code>public ActionResult Display_Template(ViewModel input) { return this.View("Display", new TasksByFieldViewModel()); } </code></pre> <p>for the 200</p> <pre><code>public ActionResult AddUpdate_Template(ViewModel input) { return View("VendorAddUpdate", new VendorViewModel()); } </code></pre> <p>The only changes are this and this makes no sense.</p> <p>From the 401 page, I redirect to an aspx page that has a reportviewer on it. But you have to click a button and then you are window.locationed on over. It can't possibly have anything to do with that.</p> <p>The second is that I upgraded from sqlserver trial to sqlserver standard on the qa server.</p> <p>That's all I got. completely befuddled.</p> <p>Any thoughts would be great.</p> <p>Thanks,</p> <p>Raif</p> <hr> <p><strong>EDIT\Fix\Hack:</strong></p> <p>Ok well this is either confusing or enraging. It's too early to tell.</p> <p>My MVC Area, the one that is breaking, well it was named "Reports" because, well it was full of reports. After doing some hail mary tests I changed the Area name to Reportsx, now it works like a dream. As I certainly never told any part of the stack to demand credentials if the Area name is Reports I can only assume that there is some IIS setting or MVC setting that says if the url is xxx/Reports then demand creds.</p> <p>I'm open to alternative views.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload