473,545 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question on the FormsAuthentica tion.Encrypt method

I want to encrypt the values of my cookies. I found out that I could
create a FormsAuthentica tionTicket, and use the
FormsAuthentica tion.Encrypt method to encrypt the cookie.

However, I do not want to use FormsAuthentica tion feature. I already
have custom code to redirect the use back to the login page if they
haven't signed on.

My question is can I use the FormsAuthentica tion.Encrypt method to
encrypt my cookies without using the FormsAuthentica tion feature of
ASP.NET?

Tommy,
Nov 17 '05 #1
1 2253
Tommy,

I think that you could but why not encrypt the cookies with a normal
encryption object? Then you won't have to tie in to all the forms
authentication objects which you may have to code around. Just encrypt the
data you're putting into the cookies and you're all set.

There are many good articles about how to use the encyrption object in .Net,
but if you want a quick and easy to use set of encryption methods I've
developed some. I'm offering all the object's I've built and their source
code on my web site, www.aboutfortunate.com, for free.

Just go to the code library and click the "Encryption " button in the left
menu.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Tommy" <To***@WebSoftw ares.net> wrote in message
news:aa******** *************** ***@posting.goo gle.com...
I want to encrypt the values of my cookies. I found out that I could
create a FormsAuthentica tionTicket, and use the
FormsAuthentica tion.Encrypt method to encrypt the cookie.

However, I do not want to use FormsAuthentica tion feature. I already
have custom code to redirect the use back to the login page if they
haven't signed on.

My question is can I use the FormsAuthentica tion.Encrypt method to
encrypt my cookies without using the FormsAuthentica tion feature of
ASP.NET?

Tommy,

Nov 17 '05 #2

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

Similar topics

0
2253
by: bill yeager | last post by:
Everything is working in my authentication process except for the fact that I can't retrieve the "UserData" property from the "FormsAuthenticationTicket". Write before I do a "RedirectFromLoginPage", I check the "UserData" property of the "FormsAuthenticationTicket". It's set to the value "Admin" (a role for the user) which is what I want....
2
4751
by: George Durzi | last post by:
When you call FormsAuthentication.SignOut(), is the FormsAuthentication cookie supposed to be destroyed automatically? I'm creating my FormsAuthentication cookie by doing: HttpCookie oCookie = new HttpCookie(FormsAuthentication.FormsCookieName, sTicket); where sTicket is an encrypted FormsAuthenticationTicket. When I create the...
4
1919
by: Jeff B | last post by:
I am having a very perplexing problem with setting the user's roles. I have tried to figure this out for 2 days now. When the user logs in to the site, I retrieve the roles from the database and create a semicolon delimited string listing the roles returned and store them in the forms authentication cookie. Then in the global.asax...
2
1806
by: Grant Merwitz | last post by:
Hi, i am using forms authentication in an ASP.NET project I am setting the Forms authentication cookie by using: FormsAuthentication.RedirectFromLoginPage(UserName.Text, false); Now when i review my trace on my page, there are two cookies created that look identical. When i FormsAuthentication.SignOut() they both dissappear. Any ideas...
4
8311
by: Matthias S. | last post by:
Hi there, I've created an application which is using Forms-based authentification. My Login-Button event handler looks somewhat like this: // validate the input, etc... // sUserName holds now the users name FormsAuthenticationTicket ticket = new FormsAuthenticationTicket( 1, sUserName, DateTime.Now, DateTime.Now.AddMinutes(20),false,
1
1970
by: Dean R. Henderson | last post by:
I setup FormsAuthentication on a couple websites where it has been working as expected for a long time. I used this code to setup the same type of authentication on a new website I am working on and the Cookie Name is not getting setup the same way. In my Web.config file, I use the following basic settings on both the old and new websites:...
0
1285
by: Mike | last post by:
We want to use FormsAuthenticationTickets as part of our ASP.NET security. The current design stores the user's ticket in the db, and later uses the ticket to extract other data from the database. When the user logs out, we use the ticket to delete the ticket from the db, using the encrypted ticket as the key. Problem is, the tickets don't...
2
2816
by: Kim André Akerø | last post by:
I'm trying to make my PHP scripts communicate with a ASP.NET based authentication solution. I have $_COOKIE, but it's encrypted using the FormsAuthentication.Encrypt method. This is the example code showing the encryption: http://dev.bd0.net/test/formsauth.txt Is there a way to decrypt this cookie using PHP?
0
2874
by: Rodrigo m. Ferreira | last post by:
Can you help me to solve the following problem? on my loggin page I have the code: protected void LoginButton_Click(object sender, EventArgs e) { if(Membership.ValidateUser(TXTUsuario.Text, TXTSenha.Text)) {
0
7473
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...
0
7408
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7433
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...
0
7763
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...
0
4949
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...
0
3458
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...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
712
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.