Re: FormsAuthentication - <http://localhost> Works, <http://RealMachineName> Does Not
From: T. Regan (tjg0524_at_hotmail.com)
Date: 06/20/04
- Next message: Phil Winstanley [Microsoft MVP ASP.NET]: "Re: CreationDate"
- Previous message: Phil Winstanley [Microsoft MVP ASP.NET]: "Re: GC.GetTotalMemory() and ASP.Net"
- In reply to: Paul Glavich [MVP - ASP.NET]: "Re: FormsAuthentication - <http://localhost> Works, <http://RealMachineName> Does Not"
- Next in thread: Rick Spiewak: "Re: FormsAuthentication - <http://localhost> Works, <http://RealMachineName> Does Not"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 20 Jun 2004 12:18:38 GMT
Good morning, Paul. Glad to know someone else works on Sunday morning.
Here's the authentication section of web.config:
.......
<authentication mode="Forms">
<forms name="AuthCookie" loginUrl="LoginPage.aspx">
<credentials passwordFormat="Clear">
<user name="Tom" password="tucker" />
<user name="TomReal" password="tuckerreal" />
</credentials>
</forms>
</authentication>
.......
Configuration section is:
..........
<configuration>
<location path="SecuredPage.aspx">
<system.web>
<authorization>
<allow users="Tom"/>
<deny users="?"/>
</authorization>
</system.web>
</location>
.........
Here's the code from the login page:
.....................
Sub Login(obj as object, e as eventargs)
If (FormsAuthentication.Authenticate(txtUserName.Text,
txtPassword.Text)) then FormsAuthentication.SetAuthCookie(txtUserName.Text,
false)
Select Case txtUsername.Text
Case "Tom"
Response.Redirect ("SecuredPage.aspx")
Case Else Label4.Text = "Please contact Support. User "
& txtUserName.Text & " is not recognized."
End Select
Else
Label4.Text = "Sorry, invalid user name or password."
End If
End Sub
.....................
The IIS config for the site is:
Directory Security: Anonymous access set to IUSR_<RealMachineName>, IIS
controls password. Also set to Integrated Windows authentication.
Documents: Default documents set to (Default.htm,default.asp,
index.htm,iisstart.asp). I don't have any of those docs in the application.
My login page is loginpage.aspx, my application page is SecuredPage.aspx.
App permissions are set to: Read, Write, log visits.
Application settings are: Application name: TestApp
Execute permissions: Scripts only
Application Protection: Medium(pooled).
Let me know if there's another information that would be helpful.
Thanks for your help.
"Paul Glavich [MVP - ASP.NET]" <glav@aspalliance.com-NOSPAM> wrote in
message news:%23%23zLNwrVEHA.2696@TK2MSFTNGP09.phx.gbl...
> Need a bit mnore information on how yu have things setup. Can you provide
> details on the contents of the autentication element in your web.config,
as
> well as the IIS configuration for your *deployed* web site.
>
> --
> - Paul Glavich
> Microsoft MVP - ASP.NET
>
>
> "T. Regan" <tjg0524@hotmail.com> wrote in message
> news:8LeBc.19022$Y3.14658@newsread2.news.atl.earthlink.net...
> > I have a test app where I have Forms Authentication set up.
> >
> > When I build and run the app as http://localhost/testapp/login.aspx, it
> runs
> > correctly. I get the login prompt and the proper redirection to the
> secured
> > page.
> >
> > When I run the app as http://
> the
> > login page, but after logging in, I stay on the login page. The URL
> address
> > shows
> >
>
http://
> >
> > Can anyone tell me what I need to change here? Thanks.
> >
> >
> >
> >
>
>
Relevant Pages
... After upgrading from Debian 4.x to 5.x without any further configuration attempts my LDAP Authentication configuration fails. ... If an LDAP Administrator resets that users password and/or as long their ldap password is not expired the user can login anywhere just fine. ...
(Debian-User)
... authentication and it worked. ... >I think you might have made changes to SQL Server ... >Authentication" can not recognize SA login which is SQL ... >configuration to use mixed authentication. ...
(microsoft.public.sqlserver.security)
... I think you might have made changes to SQL Server ... to make was using Mixed Authentication which will ... Authentication" can not recognize SA login which is SQL ... configuration to use mixed authentication. ...
(microsoft.public.sqlserver.security)
... As Sue and I mentioned earlier, make sure you SQL Server is configured to allow both SQL Server and Windows authentication. ... Right-click on the server in object explorer, select Properties-->Security and then select 'SQL Server and Windows Authentication mode. ... Server properties" in the SQL Configuration Manager. ... and enter my Login ID and my Password. ...
(microsoft.public.sqlserver.security)
... Administering Security on the Solaris OE ... Configuration control, facility management, and system ... Authentication: The ability to prove who you are. ...
(comp.unix.solaris)