Instead of going directly to my forms authentication login page: https://sub.domain.org/forms/Login/default.aspx?ReturnUrl=xyz
and manually entering the username/password:
I am wondering if it is possible to post to an asp.net forms authentication url from a separate page
Example File:
https://sub.domain.org/forms/tests/login.html
<html><head><title>Test Page...</title></head>
<body>Connecting...
<form name="login" method="post" action="https://sub.domain.org/forms/Login/default.aspx">
<input type="hidden" name= "username" value="someusername">
<input type="hidden " name="password" value="somepassword">
</form><script language="JavaScript">
document.login.submit();
</script></body></html>
However, all this does is redirect to the login page.
https://sub.domain.org/forms/Login/default.aspx
It doesn't seem to create the session cookie.
I am trying to implement something like this between a portal authentication and my webforms authentication. The portal has support for running some code like above.
Any help would be greatly appreciated.
UPDATE: Here is the web.config section for the forms authentication based login application: https://sub.domain.org/forms/Login/default.aspx
<system.web>
<compilation debug="true" targetFramework="4.0" />
<machineKey
validationKey="3404677AC408C9E2EED87F8418FE2DD0D2AB8D0E824F5B53AC9133F7CC7152F4388E614C267D6DB04638CF6D1C19E55EB052FFD4273DEA04863829E1BFE9CDE4"
decryptionKey="C9668F6C98502220633033B21818EE57D6F903FC48C2A94B5EC99B8BC1F3F411"
validation="SHA1" decryption="AES" />
</system.web>
There is no web.config for the page that is posting to the login url. It is a simple html page: https://sub.domain.org/forms/tests/login.html as shown above.