|
|
 |
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.
|
 |

November 6th, 2009, 10:59 AM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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
|

November 6th, 2009, 12:36 PM
|
|
Authorized User
|
|
Join Date: Mar 2009
Posts: 72
Thanks: 4
Thanked 4 Times in 4 Posts
|
|
I think with windows 7 you might want to try adding the
NT AUTHORITY\NETWORK SERVICE instead. Let me know what happens.
|
|
The Following User Says Thank You to ZeroFactorial For This Useful Post:
|
|

November 9th, 2009, 12:47 PM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Hi,
That's worked fine. Thanks for your help
|

November 9th, 2009, 01:04 PM
|
|
Authorized User
|
|
Join Date: Mar 2009
Posts: 72
Thanks: 4
Thanked 4 Times in 4 Posts
|
|
Glad it worked out for you. Let me know if I can be of more assistance.
|
|
The Following User Says Thank You to ZeroFactorial For This Useful Post:
|
|

November 9th, 2009, 03:54 PM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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
|

November 9th, 2009, 04:29 PM
|
|
Authorized User
|
|
Join Date: Mar 2009
Posts: 72
Thanks: 4
Thanked 4 Times in 4 Posts
|
|
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.
|

November 10th, 2009, 11:15 AM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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
|

November 11th, 2009, 10:33 AM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 11
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |