AVFP Authenticate demo

Topics: Developer Forum
Jul 17, 2012 at 8:10 PM

There are a few issues with this example in the latest version:

1) On the 5.61 main page(, the link for this example is missing the :444, so the page just times out.

2) When you press cancel in the Authentication Required dialog, you receive the message "Caught .NET exception, source: activevfp_dotnetproxy message: Thread was being aborted."

3) I've read that this method of authenticating may not work with ASP.NET. Is there a better way to accomplish this in an Active Directory environment?

Jul 17, 2012 at 9:23 PM
Edited Jul 17, 2012 at 9:24 PM

Thanks - fixed!!

It works with AVFP.  The return screen from a cancel may have something to do with an IIS setting since the example at GoDaddy returns with a better looking message:


Jul 17, 2012 at 9:36 PM

1) Do you have a valid user name / password that can be used to test on either of the demo sites?

2) The following code used to work on ASP, but fails on ASPX:

IF EMPTY(oRequest.servervariables("AUTH_USER"))
	oResponse.BUFFER = .T.
	oResponse.STATUS = "401 Unauthorized"
	IF ISNULL(oSession.Value("AuthUser"))
		lcUser = oRequest.servervariables("AUTH_USER")
		lcUser = SUBSTR(lcUser,AT('\',lcUser) + 1)

		oSession.Value("AuthUser", lcUser)

FYI, I just tested changing AUTH_USER to LOGON_USER, and that appears to have resolved my issue.

Jul 17, 2012 at 10:30 PM
Edited Jul 17, 2012 at 10:31 PM

so LOGON_USER is populated now after you fill out a login screen with the correct user info??  

- - - -

I found this when I googled which points to changes from IIS6 to IIS7 and above:

" I  had the same issue, and google was useless.  For me this was not a browser issue.  I had to configure IIS 7 to use NT authentication using add/remove features

then I had to use IIS 7 manager to update authentication 

anon authentication disabled

impersonation enabled

forms authentication disabled

windows authentication enabled

for some reason IIS kept turning anonymous authentication back on as I tried things... Good luck. maybe I'm getting o=ld, but IIS 7 is turning into a major roadblock when moving apps from iis6/5."

Jul 17, 2012 at 10:36 PM
Edited Jul 17, 2012 at 10:37 PM

Also web.config figures into this too apparently:

  • Re: Get Username for logged in user

    May 05, 2008 01:22 PM|LINK

    i was also getting the same error.I did following things and it start working :)

    Uncheck the Anonymous Access in IIS

    Removed  <allow users="*"/> from Authorization section in web.config



    Re: Get Username for logged in user
  • May 05, 2008 01:56 PM|LINK

    <authentication mode="Windows"/> <!--  <---- do you have this part? -->
                <deny users="?"/>

Jul 17, 2012 at 11:02 PM