I am having difficulties using form authentication in my Delphi 8 ASP.NET application.
To test, I created a small project with two forms, WebForm1.aspx and Login.aspx in a new virtual directory under IIS on my Win 2KPro machine. Both forms display fine using the "Run without debugging" option without authentication.
The problem arises when I add these lines to the web.config file:
<forms name="AuthTestCookie" loginUrl="login.aspx" protection="All" path="/" />
<deny users="?" />
With these additions, I often get a "Server Application Unavailble" error, but not always. This is usually followed by a inetinfo.exe - Application Error popup (trying to read memory at 0x0000004).
Sometimes, it will take me to the Login page, only to give the error after clicking the Login button. The login form is simply a blank form with a button. The event handler looks like this, for simplicity:
r: System.Object; e: System.EventArgs);
WebForm1.aspx contains one line of text, "Hello World!!!".
<form runat="server">Hello World!!! </form>
Sometimes it works. Mostly, it doesn't.
I tested the application using Alt+RD, 'Run without Debugging' from Delphi 8. (The start page is set to WebForm1.aspx.)
I've also tested directly from my browser -> http://localhost/AuthTest/WebForm1.aspx
I am using IIS, not Cassini.
I can remove the "Deny Users" line from the web.config and both pages load ok.
IIS is set to allow aynonomous users.
I've tried <deny users="*" /> as well.
I have run the command: