473,811 Members | 2,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: form authentication complete?

Hello,
I used this site to do form authentication
http://msdn.microsoft.com/library/de...l/secmod17.asp

My code successfully comes to the point:
if (passwordVerifi ed == true )
{
// The user is authenticated
// At this point, an authentication ticket is normally created
// This can subsequently be used to generate a GenericPrincipa l
// object for .NET authorization purposes
// For details, see "How To: Use Forms authentication with GenericPrincipa l
// objects
lmsg.Text = "Logon successful: User is authenticated";
Server.Transfer ("MyMainPage.as px", true);.
}

As you see, I do not do anything after that and switch to my main page by
using Server.Transfer ("MyMainPage.as px", true);. My problem is, even if I
have anonymous access and integrated windows checked, I get prompt to login
when I go to my main page. Maybe I should cerate ticket here to complete
authentication. If that is the case, how can I do that?

Nov 19 '05 #1
3 1145
If you use Windows security to secure files, you will have to log in to
access the files. The same is true if you set the config file up to check
whether the user is valid for certain pages. Even with anon access on, you
will end up with a security check if the app is configured to check.

If you would like to have an app on a domain that automatically logs people
in, that is a setting in Internet Explorer. The best way to facilitate is to
talk to the network admins and have them push it.

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

*************** ************
Think Outside the Box!
*************** ************
"JIM.H." wrote:
Hello,
I used this site to do form authentication
http://msdn.microsoft.com/library/de...l/secmod17.asp

My code successfully comes to the point:
if (passwordVerifi ed == true )
{
// The user is authenticated
// At this point, an authentication ticket is normally created
// This can subsequently be used to generate a GenericPrincipa l
// object for .NET authorization purposes
// For details, see "How To: Use Forms authentication with GenericPrincipa l
// objects
lmsg.Text = "Logon successful: User is authenticated";
Server.Transfer ("MyMainPage.as px", true);.
}

As you see, I do not do anything after that and switch to my main page by
using Server.Transfer ("MyMainPage.as px", true);. My problem is, even if I
have anonymous access and integrated windows checked, I get prompt to login
when I go to my main page. Maybe I should cerate ticket here to complete
authentication. If that is the case, how can I do that?

Nov 19 '05 #2
I could not believe that nobody is able to answer this question. This whole
concept of authorization, authentication, IIS are complex. Microsoft should
come up with better simple way of handling these issues. High level security
is important but if you have to know all details to have it, then you are
actually missing the whole point of security. It should be implement-able
easily.

Anyway, I put this line
FormsAuthentica tion.SetAuthCoo kie(txtUserName .Text,false);
before server transfer, it works fine.

"JIM.H." wrote:
Hello,
I used this site to do form authentication
http://msdn.microsoft.com/library/de...l/secmod17.asp

My code successfully comes to the point:
if (passwordVerifi ed == true )
{
// The user is authenticated
// At this point, an authentication ticket is normally created
// This can subsequently be used to generate a GenericPrincipa l
// object for .NET authorization purposes
// For details, see "How To: Use Forms authentication with GenericPrincipa l
// objects
lmsg.Text = "Logon successful: User is authenticated";
Server.Transfer ("MyMainPage.as px", true);.
}

As you see, I do not do anything after that and switch to my main page by
using Server.Transfer ("MyMainPage.as px", true);. My problem is, even if I
have anonymous access and integrated windows checked, I get prompt to login
when I go to my main page. Maybe I should cerate ticket here to complete
authentication. If that is the case, how can I do that?

Nov 19 '05 #3
from... "System.Web.Sec urity" namespace

FormsAuthentica tion.RedirectFr omLoginPage("So mePage.aspx")

This will work by parsing a querystring in Login page's URL. There are
also some entries in web.config that have to be set.

Let the forms security do the redirect/transfer. Do not do it
explicitly. Examples on gotdotnet.com.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4469
by: Frank | last post by:
I have observed that a temporary loss of a domain controller can cause problems creating new ado connections between a client machine running ado and a separate sql server machine that are members of the domain. I understand why this happens when creating connections with windows authentication. What is a mystery is that it also sometimes effects new connections that use "sql authentication". Below is a description of my test scenario. ...
3
1386
by: Jeremy Ames | last post by:
Can someone please help with this? Unfortunately, that did not work. "Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote in message news:uwMY%23fquDHA.2308@TK2MSFTNGP11.phx.gbl... Hi Jeremy, Please try using 127.0.0.1 instead of (local) in the connection string: cnTask.ConnectionString="Data Source=127.0.0.1;" +
11
2975
by: David W. Simmonds | last post by:
I have a form that will prompt for a user name/password. In VS.NET, I have the protected form in a folder named Admin. I have a Web.config file in that folder as well. It contains the following section: <authorization> <deny users="?" /> <allow users="*" /> </authorization> In the root folder where the other forms are located I have a Web.config
3
1553
by: Arjen | last post by:
Hello, I need a very simple login management system. I can create it by myself... but if somebody has done this before... it can saves me a lot of time. What I want is this: - Form authentication - Login page - Account management page (add/change/delete accounts and roles)
2
2914
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public users). If user is from intranet, web server should recognize it and application should create additional options in controls regarding groups the user belongs to. If user is from extranet it should be logged in as anonymous and a link to login page...
2
1054
by: James Radke | last post by:
Hello, If I have some older C++ functions that I am calling from my code behind in a web form; and these functions use the C++ runtime which is found in the windows/system32 directory; how do I ensure that I have security set up to access these functions from my web form code behind? My application is just hanging when I call the functions from a webform, but they run fine in a windows application.....
10
4072
by: Hriday | last post by:
Hi there, Please help me..It is urgent This is Hriday, working on windows authentication with Active Directory... My requirment is when a user sends a request to my web Applicatoin I want to Pop up windows Authentication box so that user will give his userId, Password & domain name for authenticaion. After that I want to take these three info of user and make a search in Active Directory.
2
7524
by: Frank Swarbrick | last post by:
I am trying to understand "client authentication" works. My environment is DB2/UDB LUW 8.2 on zSeries SLES9 as the database server and DB2 for VSE 7.4 as the client. We currently have DB2/LUW set up as follows: Client Userid-Password Plugin (CLNT_PW_PLUGIN) = Client Kerberos Plugin (CLNT_KRB_PLUGIN) = Group Plugin (GROUP_PLUGIN) = GSS Plugin for Local Authorization ...
0
1257
by: stevecnz | last post by:
I'm looking for feedback on an authentication solution we are considering for an ASP.NET 2.0 project. The site will be accessed by both internal users who are logged into the Windows domain, and external (business partner) users via the internet. The internal users are required to be authenticated via Windows Integrated Authentication (WIA), and external users will be authenticated using a custom solution based on a signed ticket that...
0
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10393
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.