« Previous Next »

Thread: Problem when using App pool account for Anonymous Authentication

Last post 06-17-2009 3:10 PM by djwUnisys. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 03-25-2009, 5:29 AM

    • Bjorn S
    • Not Ranked
    • Joined on 03-25-2009, 9:25 AM
    • Posts 5

    Problem when using App pool account for Anonymous Authentication

    I'm porting our application to IIS 7. The application is very big and uses a mixture of Classic ASP and ASP.Net pages. So far there haven't any problems, but now I've encountered one thing that is a bit irritating.

    I really like the possibility to use the application pool account as the anonymous account. That way you get a much more manageable situation when it comes to security. The problem is that when I enabled this for my application I encountered an error when Session_End fires;
    "Failed to retrieve the Anonymous User Token for ASP Application /LM/W3SVC/1/ROOT/XXXXXXX.  Global.ASA OnEnd routines will not be executed.". It occurs when we try to create a com-object by "Server.CreateObject".

    I can understand that there is a special situation since this isn't a user-initiated event, rather a trigger that fires on the server. But it works without problems in the older IIS-versions and it works in IIS 7 if I use the IUSR acount as anonymous user. I should add that I have the problem regardless if I use a "classic" or "pipelined" app pool.

    Does anyone know of a fix/workaround for this? I'd really like to run it all as the app pool account.

  • 03-26-2009, 6:59 AM In reply to

    • Bjorn S
    • Not Ranked
    • Joined on 03-25-2009, 9:25 AM
    • Posts 5

    Re: Problem when using App pool account for Anonymous Authentication

    I have found a solution for this myself. The trick was to set

       <asp runOnEndAnonymously="false">

    for the application in applicationhost.config.

     

  • 06-16-2009, 1:57 PM In reply to

    Re: Problem when using App pool account for Anonymous Authentication

    Bjorn S:  In what section did you put this key?  I am having this issue and putting this line in doesn't make a change

    Thx


  • 06-17-2009, 2:12 AM In reply to

    • Bjorn S
    • Not Ranked
    • Joined on 03-25-2009, 9:25 AM
    • Posts 5

    Re: Problem when using App pool account for Anonymous Authentication

    Hi!

    This is how my section looked like. My virtual directorys name is "Arbetstagare" and it's under the Default Web Site.

        <location path="Default Web Site/Arbetstagare">

            <system.webServer>

                <asp runOnEndAnonymously="false">

                    <session timeout="00:20:00" />

                </asp>

                <security>

                    <authentication>

                        <anonymousAuthentication enabled="true" userName="" />

                    </authentication>

                </security>

            </system.webServer>

        </location>

     If your virtual directory doesn't have a location path you will have to add it to the file. Make sure you do a backup before editing the file.

     

     

  • 06-17-2009, 3:10 PM In reply to

    Re: Problem when using App pool account for Anonymous Authentication

     When I look for the applicationhost.config file, there are multiple copies in inetpub -> history -> CFGHISTORY_0000000020...

Page 1 of 1 (5 items)
Microsoft Communities