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
Re: windows authentication
If the network prompt shows up - that's correct behavior (especially if using Firefox/Opera). What are you expecting?
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.
Re: windows authentication
Re: windows authentication
But I dont need the form authentication. That tutorial is form authentication.
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.
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;
}