Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Error 500.19 - Internal Server Error #1

Closed
MaherJendoubi opened this issue Sep 5, 2016 · 5 comments
Closed

HTTP Error 500.19 - Internal Server Error #1

MaherJendoubi opened this issue Sep 5, 2016 · 5 comments

Comments

@MaherJendoubi
Copy link
Contributor

Hi,

When I do Ctrl+F5, I get this issue
image

Thank you

@jimmyca15
Copy link
Member

It looks like IIS Express is not letting you override the Windows authentication settings. If you are developing with Visual Studio you should have a .vs folder at the root of the repository. In .vs/config/applicationhost.config the line that says
<section name="windowsAuthentication" overrideModeDefault="Deny" />
should be changed to
<section name="windowsAuthentication" overrideModeDefault="Allow" />

@MaherJendoubi
Copy link
Contributor Author

@jimmyca15 I changed it but I get a popup for credentials. I put my correct login and password but it popups again!

@jimmyca15
Copy link
Member

jimmyca15 commented Sep 6, 2016

The default settings require the user to be in the 'Administrators' group or 'IIS Administrators' group to access the API. Even if you are part of the 'Administrators' group you may have this issue. This is due to the default security policy for windows. Here are some solutions and an explanation.

  • Log on with the Builtin Administrator account.
  • Create the "IIS Administrators" group and add yourself to it.

By default the API requires you to authenticate as an Administrator on the local machine. The default security settings of Windows prevent elevation into the Administrators group through remote authentication unless it is the builtin administrator account. Since this API is running on a web server, all authentication is remote even if you are authenticating on the local machine. The local security policy can be changed to allow the elevation (not recommended) or a local group can be added specifically for IIS Administration. During installation we create the 'IIS Administrators' group which is specified in the appsettings.json file as an Administrative group.

@shirhatti
Copy link
Contributor

@jimmyca15 Does it make sense to recommend folks run this script https://github.com/Microsoft/IIS.Administration/blob/dev/scripts/setup/activedirectory.ps1 even for dev time scenarios? Sounds like this might be a common problem

@jimmyca15
Copy link
Member

@shirhatti I agree. At the least we can have a configure script to alleviate this issue. I'll look into hooking it up gracefully into the dev workflow.

yaqiyang added a commit that referenced this issue May 25, 2022
* Convert all projects to .Net core 6.0

* Remove formatting chagnes

* Minor formatting fix

* Restore the call to AddAntiforgery. Parameter RequireSsl does not exist anymore

* Clean up compiler warnings (#2)

Co-authored-by: Yaqi Yang <yaya@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants