0

I'd like to start by saying that while I have programmed for 20 years, I have never gotten proficient at security issues. They have always plagued me. So if you don't dumb it down, I won't understand what you're telling me.

I have an existing ASP.NET MVC website that is working fine. In the past I could debug it in Visual Studio with no problem. Then my employer upgraded my development machine to Windows 10. Now whenever I start in debug mode the website says Access Is Denied. The error goes on to say:

401.2.: Unauthorized: Logon failed due to server configuration.

I can still open the same local copy in Internet Explorer running on IIS 7 (I think), but I get Access Is Denied when I try to run it from Visual Studio. So maybe I need to focus on the configurations in the development server, if that's the right term. I'm using Windows authentication and role-based security. I've looked over the IIS configurations (I don't understand that much better than security) and it appears that Windows authentication is enabled. That's about all I know. I'm hoping somebody has an idea how to solve this. I've looked at similar question on StackOverflow and I've seen some similar error solutions on MSDN, but none of them helped me. At least they're paying me by the hour.

Steve Gaines
  • 591
  • 1
  • 9
  • 25

2 Answers2

0

Based on other questions (IIS Express gives Access Denied error when debugging ASP.NET MVC, Error message 401.2.: Unauthorized: Logon failed due to server configuration. When application deployed) and my understanding of IIS, I would guess that somewhere along the chain of configuration, Windows Authentication is not enabled. Is your project debugging under IIS Express or IIS? IIS Express would have different settings. Is it all actions that fail, or just ones that are marked with [Authorize]? Check the project properties (right click project, hit 'Properties'), but also the "Properties" pane when the project is selected (yes, this is insanity -- with default keybindings, select the project in solution explorer and hit F4) -- I especially think this latter setting may be where you're getting hit.

Community
  • 1
  • 1
Mark Sowul
  • 10,244
  • 1
  • 45
  • 51
  • I checked a "NLTM" box on the Web section of properties and now it seems to search for role providers, so I think that might have solved the Access Is Denied error, but I'm getting another maybe unrelated, error.now that says something about a problem in MVC.dll. Does that sound familiar? I've disconnected from my Remote Desktop and I've got to get some rest now so I may have to deal with this tomorrow. – Steve Gaines Jun 28 '16 at 02:54
0

I cleaned up my project by reverting to the last stable version and tried to run the project again in debug. This time it was giving me an error that said I need to run Visual Studio as administrator to be able to debug. So I closed Visual Studio and re-started it using Run As Administrator. Problem solved. I was able to run debug as normal. Maybe something is different in Windows 10 regarding UAC security that caused debug to not work like before.

Steve Gaines
  • 591
  • 1
  • 9
  • 25