|
-
Aug 7th, 2009, 04:49 PM
#1
Thread Starter
Frenzied Member
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?
-
Aug 8th, 2009, 02:36 AM
#2
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
-
Aug 8th, 2009, 05:12 AM
#3
Re: windows authentication
If the network prompt shows up - that's correct behavior (especially if using Firefox/Opera). What are you expecting?
-
Aug 10th, 2009, 10:11 AM
#4
Thread Starter
Frenzied Member
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.
-
Aug 10th, 2009, 01:48 PM
#5
Re: windows authentication
-
Aug 10th, 2009, 03:21 PM
#6
Thread Starter
Frenzied Member
Re: windows authentication
But I dont need the form authentication. That tutorial is form authentication.
-
Aug 11th, 2009, 01:22 AM
#7
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.
-
Aug 11th, 2009, 10:27 AM
#8
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|