IIS
  • Logout cand se foloseste Windows Authentication
    • Se trimite response code 401, si browser-ul va incerca sa il reautentifice pe utilizator.
if (hidCurrentUserName.Value != Request.LogonUserIdentity.Name)
{     
     Response.Redirect("Default.aspx", false);
}
else
{
     Response.StatusCode = 401;
     Response.StatusDescription = "Unauthorized";
     Response.End();
}
  • IIS7: The requested page cannot be accessed because the related configuration data for the page is invalid - cand nu are drepturi de Read pe web.config
    • Drepturi de Read pentru contul IIS APPPOOL\DefaultAppPool
    • Drepturi de Read pentru contul IIS APPPOOL\ASP.NET v4.0
  • IIS7: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
    • Si "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined"
    • Din cauza ca proiectul era compilat cu .NET 3.5 iar IIS astepta 4.0. A mers odata ce am schimbat target framework-ul proiectului.
  • IIS7: You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.
    • Drepturi de Read pentru contul IUSR
  • IIS7: Could not load file or assembly ‘<insert name here>′ or one of its dependencies. An attempt was made to load a program with an incorrect format.
    • AppPool-ul ar trebui setat sa ruleze si aplicatii sub 32 de biti.
  • IIS7: nu serveste fisiere cu extensia json (sau orice alta extensie pe care nu o stie)
    • trebuie adaugat un mime-type pentru extensia respectiva, fie din IISManager, fie in web.config
<system.webServer>
        <staticContent>
            <mimeMap fileExtension=".json" mimeType="application/json" />
        </staticContent>
</system.webServer>
  • IIS7: probleme cu handling-ul fisierelor statice de catre ASP.NET/evenimentele BeginRequest/EndRequest nu se executa cum ar trebui
    • Ar trebui activat cel putin rolul Web Server -> Performance -> Static Content Compression
iis_roles.png
  • IIS7: Activarea Windows Authentication
    • Implicit nu e disponibil in sectiunea de autentificare a site-ului
    • Pentru a il activa: Computer management -> Roles -> right click Web Server (IIS) -> Add Role Services -> Windows Authentication.
    • Sau
    • Open Control Panel -> Programs and Features -> Turn windows features on or off -> Scroll down to IIS, expand all of the nodes to find the ‘Security’ node within there – and there it is, “Windows Authentication” is unchecked – as is “basic authentication”. Check the providers you want, then click OK.
    • Apoi in sectiunea Authentication a site-ului -> Enable
  • HTTP Error 403.7 - Forbidden. The page you are attempting to access requires your browser to have a Secure Sockets Layer (SSL) client certificate that the Web Server recognizes.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License