Wrox Programmer Forums
|
BOOK: Beginning ASP.NET Security
This is the forum to discuss the Wrox book Beginning ASP.NET Security by Barry Dorrans; ISBN: 978-0-470-74365-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Security section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2011, 02:14 PM
Registered User
 
Join Date: Feb 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with session key and so on

Hello,
there is problem with subject I mean page 129 to 132
and unfotunately there were no source code for that part all in all I think it is a bit
foggy and I need some friendly explanation to cover that part and what is the usage of this subject in E-commerce?please help me

Last edited by hamed.minaee; August 16th, 2012 at 10:06 AM..
 
Old February 14th, 2011, 02:45 PM
Wrox Author
 
Join Date: Jan 2010
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well there's code in page 130. Basically you're computing a checksum on the data, via the GenerateMac() function and checking it with IsMacValid().

So you generate a key for validation using the GenerateRandomBytes() method on page 127, and then pass it, along with the text you want to calculate the checksum for into GenerateMac() then when you retrieve your data, after you unencrypt it, you validate the generated MAC
 
Old February 14th, 2011, 03:54 PM
Registered User
 
Join Date: Feb 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default cant relate these code

Hello Blowdart again,


you know till page 128 every thing is ok and I have a system .but how to ensure that date does not change ?

Last edited by hamed.minaee; August 16th, 2012 at 08:12 AM..
 
Old February 14th, 2011, 04:22 PM
Wrox Author
 
Join Date: Jan 2010
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default

You'd put it before you store the data somewhere, for example, a database. The demo scripts don't do storage, hence it's hard to put it in that example.

If you look at the step by step process starting on page 131 you'll see it as step 3 in adding a new record, step 6 in retrieving and step 3 in updating.
 
Old February 14th, 2011, 04:58 PM
Registered User
 
Join Date: Feb 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello again ,

is there any fuctional example for that??

Last edited by hamed.minaee; August 16th, 2012 at 08:11 AM..
 
Old February 14th, 2011, 05:12 PM
Wrox Author
 
Join Date: Jan 2010
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default

Not really - because an example would make too many assumptions about workflow within a target system (or end up needing a database to demonstrate etc.), there's no way beyond the steps to make it generic or a short example.





Similar Threads
Thread Thread Starter Forum Replies Last Post
foregin key problem sbglobal SQL Language 1 September 15th, 2010 01:33 AM
Key press problem diegoblin Beginning VB 6 3 October 5th, 2006 02:10 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM
primary key problem Abhinav_jain_mca SQL Server 2000 1 September 2nd, 2004 08:11 AM
Foreign Key Problem re_anu SQL Server 2000 1 September 26th, 2003 10:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.