Re: some stuff private

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



There are a variety of ways to do this, depending on who you are "allowing"
or "keeping out" and which tools you have at your disposal.

1. Protect the directory in windows. This works well on an Intranet and will
prompt users who do not have access via a windows pop up box. This is NOT a
good option for an Internet site.

2. Add a config file to the directory in question that has authentication
and authorization sections set up. This alone will force the user to the
specified login page.

Now, if a regular login page is not an option (as you have stated), you can
either use a custom Membership provider, or you can fake it by using the
Membership piece and redirecting the user to a page as if they were logged
in.

'VB
FormsAuthentication.RedirectFromLoginPage(userName, False)

The second part (False) is whether to set a cookie. You might want this to
be true so the user can revisit the page over and over again.

You can also kludge up your own security, either by cookie or session, if
you so desire.

//C#
string sessionLogIn = Session["LogIn"];

if(sessionLogIn == null)
{
//usernot valid, send them to another page
}
else
{
//allow user to see page
}


Place on each page and set the Session["LogIn"] value on the page with the
questions.

If you can use Membership, it is potentially better, as it allows you to
reuse bits of the ASP.NET framework, but it may be overkill, especially with
a custom membership provider.

SPECIFICS INLINE


"jaems" <jaems@xxxxxxxxxxxx> wrote in message
news:MjaEj.35363$ki.24101@xxxxxxxxxxxxxxxxxxxxxxx
I want to keep some stuff just for certain web users using a secure folder
with id and password which I can set up via my web hosts control panel

If a visitor to my site needs to go to a page within this folder a login
window appears and they have to login

If I have a user who answers certain questions on one of the public page
on my site I need them to be able to enter the secure area directly

Is there any way to provide the credentials to get into the secure folder
with out invoking the login window?

You have the ability to log someone in without them supplying credentials.
That is the RedirectFromLoginPage() bits (see above). You make a login page
(your question page) without a login control.

As mentioned, you can also roll your own.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

*************************************************
| Think outside the box!
|
*************************************************


.



Relevant Pages

  • RE: Password never set - locked out of Windows XP Home
    ... Ran fixboot last night, and although the system said it had fixed the boot ... I am still stuck in the redundant loop of getting to a pop-up login ... only to not have it shutdown but instead pop back up with the same login box. ... my Windows XP Home system worked great. ...
    (microsoft.public.windowsxp.accessibility)
  • Re: Granting permission to a database - need help
    ... Windows authentication, and not use an application login, as then ... Links for SQL Server Books Online: ... USE Driver Access ...
    (microsoft.public.sqlserver.programming)
  • Re: sp_revoke login is not working as expected.
    ... EXEC xp_logininfo 'MyDomain\SomeUserAccount','members' ... Try specifying a group member rather than the group. ... This should list the Windows groups the user can connect with. ... connect with the non-existing login. ...
    (microsoft.public.sqlserver.security)
  • Re: Windows 98 getting stuck logging into a W2K3 domain.
    ... > workaround I've turned off Windows 98's ability in Client for MS ... > login stating that the domain can not be found, ... > Client for MS networks does the password validation. ...
    (microsoft.public.win2000.general)
  • RE: How to create a trusted connection
    ... You need to grant access for the Windows login by referring to the books ... is set to use Windows authentication to be able to do trusted connection. ... There are two modes of authentication in SQL Server: ...
    (microsoft.public.sqlserver.security)