p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 6th, 2009, 10:59 AM
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Default Chapter 5

Hi All,

Working my way through the book and I've come across a problem trying to implement the Exception Handling.

Page 129, editing the registry and adding ASPNET as a user for the eventlog, well, ASPNET does not exist as a user. I have Windows 7 Ultimate, VS 2008 Standard, SQL 2005 Exp, IIS7 with IIS6 bits installed.

I have run aspnet_regsql and used the same db as my solution, have also run aspnet_regiis to ensure that is all ok too.

Any direction would be greatfully received.

Gilbo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old November 6th, 2009, 12:36 PM
Authorized User
Points: 319, Level: 6
Points: 319, Level: 6 Points: 319, Level: 6 Points: 319, Level: 6
Activity: 82%
Activity: 82% Activity: 82% Activity: 82%
 
Join Date: Mar 2009
Posts: 72
Thanks: 4
Thanked 4 Times in 4 Posts
Default

I think with windows 7 you might want to try adding the
NT AUTHORITY\NETWORK SERVICE instead. Let me know what happens.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
The Following User Says Thank You to ZeroFactorial For This Useful Post:
Gilbo79 (November 6th, 2009)
  #3 (permalink)  
Old November 9th, 2009, 12:47 PM
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi,

That's worked fine. Thanks for your help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old November 9th, 2009, 01:04 PM
Authorized User
Points: 319, Level: 6
Points: 319, Level: 6 Points: 319, Level: 6 Points: 319, Level: 6
Activity: 82%
Activity: 82% Activity: 82% Activity: 82%
 
Join Date: Mar 2009
Posts: 72
Thanks: 4
Thanked 4 Times in 4 Posts
Default

Glad it worked out for you. Let me know if I can be of more assistance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
The Following User Says Thank You to ZeroFactorial For This Useful Post:
Gilbo79 (November 9th, 2009)
  #5 (permalink)  
Old November 9th, 2009, 03:54 PM
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi,

I have progressed to Chapter 6 and am getting the following error when building

Error 1 'XXX.XxxDAL.XxxDataContext' does not contain a constructor that takes '0' arguments C:\Users\Andrew\Documents\Visual Studio 2008\Projects\Xxx.net Solution\XXX.XxxBLL\Framework\ENTBaseEOList.cs 29 55 XXX.XxxBLL

Which refers to:
Code:
public bool Save(ref ENTValidationErrors validationErrors, int userAccountId)
        {
            // Check if this object has any items
            if (this.Count > 0)
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    using (XxxDataContext db = new XxxDataContext())
                    {
                        if (this.Save(db, ref validationErrors, userAccountId))
                        {
                            // Commit transaction if update was successful
                            ts.Complete();
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                }
            }
            else
            {
                //No items in the list so return true.
                return true;
            }
        }
The second datacontext in the second using line is what is underlined...

Any advice on this, greatly accepted

Gilbo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old November 9th, 2009, 04:29 PM
Authorized User
Points: 319, Level: 6
Points: 319, Level: 6 Points: 319, Level: 6 Points: 319, Level: 6
Activity: 82%
Activity: 82% Activity: 82% Activity: 82%
 
Join Date: Mar 2009
Posts: 72
Thanks: 4
Thanked 4 Times in 4 Posts
Default

Post your DAL and BLL for this Save. My first thought is that BLL EO item contains a Save method that passes nothing in. At minimum it has to pass in the DataContext, ref Validation and ENTUserAccountId.


Sample BLL
Code:
 
// Notice this is the same method that is referenced in the ENTEOList object
publicoverridebool Save(HRPaidTimeOffDataContext db, refENTValidationErrors validationErrors, int userAccountId)
{
if (DBAction == DBActionEnum.Save)
{
//Validate the object
Validate(db, ref validationErrors);
//Check if there were any validation errors
if (validationErrors.Count == 0)
{
if (IsNewRecord())
{
//Add
ID = newAETransferData().Insert(db, ENTUserAccountId)
//this is where your code is failing...I think :)
//Try making sure you have db and ENTUserAccountId as your first two items. 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #7 (permalink)  
Old November 10th, 2009, 11:15 AM
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi,

I've tried ENTUserAccountId as the first item after db in ENTRoleEO and ENTUserAccountEO I get another error, stating that:

Error 2 The name 'ENTUserAccountId' does not exist in the current context C:\Users\Andrew\Documents\Visual Studio 2008\Projects\Xxx.net Solution\XXX.XxxBLL\Framework\ENTUserAccountEO.cs 46 66 XXX.XxxBLL


Code:
if (IsNewRecord())
                    {
                        //Add
                        ID = new ENTUserAccountData().Insert(db, WindowsAccountName, FirstName, LastName, Email, IsActive, userAccountId);
                    }
                    else
                    {
                        //Update
                        if (!new ENTUserAccountData().Update(db, ID, WindowsAccountName, FirstName, LastName, Email, IsActive, userAccountId, Version))
                        {
                            UpdateFailed(ref validationErrors);
                            return false;
                        }
                    }
The error applies to both EO files
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #8 (permalink)  
Old November 11th, 2009, 10:33 AM
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 28%
Activity: 28% Activity: 28% Activity: 28%
 
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi,

I think I fixed it in the ENTBaseEOList.cs

Code:
using (XxxDataContext db = new XxxDataContext(DBHelper.GetXxxConnectionString()))
The BLL build fine with no errors but I get the following when building the whole solution:

1)
c:\Windows\Microsoft.Net\Framework\v2.0.50727\Temp orary ASP.Net\exporteaseui\de04c89b\8edfadb3\App_Web_lkq i3yjb.0.cs(14):error CS0534: 'ErrorPage' does not implement inherited abstract member

2)
'ErrorPage' does not implement inherited abstract member 'BasePage.capabilityNames()'

in file App_Web_lkqi3yjb.0.cs line 14

which is

Code:
public partial class ErrorPage : System.Web.SessionState.IRequiresSessionState {


Gilbo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 12:02 PM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 01:02 PM
Chapter 26 + Chapter 27 JoaquimC BOOK: Professional C# 2005 0 August 18th, 2007 07:07 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 10:40 PM
Chapter 8 End of Chapter Exercises SonicDynamite BOOK: Beginning Visual C# 2005 0 January 22nd, 2007 01:04 AM



All times are GMT -4. The time now is 07:42 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc