Results 1 to 8 of 8

Thread: windows authentication

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    windows authentication

    Hi, I know how to allow users access when using the form authentication in web.config, but I am working on an Intranet page, and had to set the authentication to "windows" for one page. I also have a Public folder, that I want to allows users out side of VPN have access to it, but I don't know how to enable that public folder to the users. Every time I try to access the page within that public folder, the network prompt shows up. How do I do that?

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: windows authentication

    Hey,

    Have you given the necessary users access to that folder? i.e. have you changed the security settings on the folder.

    Also, you may need to add the page that you are browsing to into the Local Intranet section within the options of Internet Explorer. When you do this, the credentials of the currently logged in user will be presented to the page.

    Gary

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: windows authentication

    If the network prompt shows up - that's correct behavior (especially if using Firefox/Opera). What are you expecting?

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: windows authentication

    I think I confused you two. Here is what I am trying to accomplish.

    1. I have a default.aspx page that I want it to be authenticated, which means, when the users browse to that page, the network prompt should show up. This is for users inside VPN.

    2. I also have a folder called "Public" and there are aspx files in that folder. I don't want that folder to authenticate users, which means, when users go to any aspx pages in that folder, the network prompt should not show up. This is for users outside of VPN.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: windows authentication


  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: windows authentication

    But I dont need the form authentication. That tutorial is form authentication.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: windows authentication

    Your app is going to be mixing authentication types - one being windows and the other being 'none'. That article talks about mixing authentication types. You're going to have to go low level with this and 'control' what happens at the level mentioned in that article.

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: windows authentication

    The tutorial has this, and I don't know what is for the none authentication one?

    public void FormsAuthentication_OnAuthenticate(object sender,
    FormsAuthenticationEventArgs e)
    {
    if (null == e) throw new ArgumentNullException("e");

    // Check that we have a Windows user
    WindowsIdentity winUser = e.Context.Request.LogonUserIdentity;
    if (null == winUser) return;

    // Check that the path allows Windows authentication
    string path = VirtualPathUtility.ToAppRelative(e.Context.Request.Path);
    if (!IsWindowsAuthenticated(path, e.Context)) return;

    // Don't allow guest accounts to access
    if (winUser.IsAnonymous || winUser.IsGuest || winUser.IsSystem)
    return;

    WindowsPrincipal winPrincipal = new WindowsPrincipal(winUser);
    if (winPrincipal.IsInRole("Guests")) return;

    e.User = winPrincipal;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width