Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 14th, 2009, 02:06 PM
Registered User
 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default A small problem with the code from CH06 and with next ones.

Hello,

I've bought this book (an excellent one).

Unfortunately in chapter 06 (a role-base security) I have a problem with the code.
I changed in table ENTUserAccount an user with ID=1 for "a correct MyUser which is a dbo" and I did correct a connection string but I still have an error on an url (for instance):
http://localhost/PaidTimeOffUI/Admin...istration.aspx

System.NullReferenceException

" in a row 101: of the ENTMenuItemBO.cs"
....
a row 99: {
a row 100: //Check if this user is in this role
a row 101: if (role.RoleUserAccounts.IsUserInRole(userAccount.ID ))
a row 102: {
a row 103: //Try to find the capability with the menu item Id.
....

Any ideas .
(I using VS 2008 Team System, MS SQL 2005 Std on Vista Ultimate and Integrated Security in MS SQL)
  #2 (permalink)  
Old February 14th, 2009, 10:54 PM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

Hello Jeremie,

The WindowsAccountName in the ENTUserAccount table should be changed to the windows account name that you logged on as, i.e. ComputerName\YourName. This is not a SQL Login account.

You also need to make sure Integrated Windows Authentication is checked for your website in IIS. The web site is using the current windows identity to find a matching user in the ENTUserAccount table.

Please let me know if this helps,
Vince
  #3 (permalink)  
Old February 15th, 2009, 07:40 AM
Registered User
 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile A small problem with the code ...

Hello Mr Vincent Varallo,

Thanks a lot for your attention.

I did a correct an account (domain\username) but it was a problem connected with "a disabling an anonymous authentication in IIS 7".

I thought that I did it (in Vista is done in a different way than in W2003).

Of course all examples are correct.

Good job this book!
Jeremy
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a small piece of code (New to VB) kwik10z Excel VBA 2 October 12th, 2007 06:46 AM
ch06-xmldistilled not open humayunlalzad BOOK: Beginning XML 3rd Edition 3 February 13th, 2007 09:35 AM
small C++ game code PLEASE HELP!!! ands122 C++ Programming 2 June 18th, 2005 04:55 PM
CH06\SwitchCase.aspx mdonald BOOK: Beginning ASP.NET 1.0 0 December 8th, 2004 07:38 PM
small problem harjinder_x XSLT 0 March 23rd, 2004 05:43 AM



All times are GMT -4. The time now is 11:03 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.