Currently, if I try to register a new user I get the following error (on screen) "This user already exists". I've followed the stack and it appears that it is trying to register a Guest.. following it through this is whats happening:
Hi there, when you put 2 diferents passwords , appears a pop ups to change your password, for a default user i think, so this is a bug right ummm i wonder see in there app a search to return values in external view to insert some entity in database (for
example for insert a selling of a product you have to search for wich client is, as an example) ^^
Please dont forget mark as an answer, if this post helped you... Thanks!
ChanceUSC
Member
319 Points
209 Posts
Is registration turned off?
Jun 01, 2008 06:05 PM|LINK
Currently, if I try to register a new user I get the following error (on screen) "This user already exists". I've followed the stack and it appears that it is trying to register a Guest.. following it through this is whats happening:
Input:
Here is the trace (it may look like rubbish but check out the bold line):
Commerce.MVC.Data.DLL!Commerce.MVC.SqlRepository.DB.Users.get() Line 182
Commerce.MVC.Data.DLL!Commerce.MVC.Data.SqlUserRepository.GetUsers() Line 22
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 32
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103
> Commerce.MVC.Data.DLL!Commerce.MVC.Data.SqlUserRepository.GetUsers() Line 22 + 0xd bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 32 + 0xc bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
> Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 32 + 0xc bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
> Commerce.MVC.Data.DLL!Commerce.MVC.Data.UserFilters.WithUserName(System.Linq.IQueryable<Commerce.MVC.Data.User> qry = {SELECT [t0].[UserName], [t0].[FirstName], [t0].[LastName], [t0].[Email]
FROM [dbo].[Users] AS [t0]
}, string userName = "TestName") Line 11 C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 32 + 0x17 bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
> Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 32 + 0x17 bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
> Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 36 C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
> Commerce.MVC.Data.DLL!Commerce.MVC.Data.User.User(string first = "Guest", string last = "", string userName = "TestName", string email = "anon@nothing.com") Line 21 C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 38 + 0x26 bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
> Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 38 + 0x26 bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
> Commerce.MVC.Data.DLL!Commerce.MVC.Data.ShoppingCart.ShoppingCart(string userName = "TestName") Line 25 C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.GetUser(string userName = "TestName") Line 39 + 0x15 bytes C#
Commerce.MVC.Services.DLL!Commerce.MVC.Services.UserService.Register(Commerce.MVC.Data.User newUser = {Commerce.MVC.Data.User}, string password = "Password", string confirmPassword = "Password", string question = "Question", string answer = "Answer") Line 82 + 0x1a bytes C#
Commerce.MVC.Web.DLL!Commerce.MVC.Web.Controllers.UserController.Create() Line 103 + 0x28 bytes C#
robconery
Participant
852 Points
195 Posts
Re: Is registration turned off?
Jun 02, 2008 11:52 PM|LINK
It shouldn't be - but then again I haven't polished it up. I'll keep working on it for now - treat it as a bug.
JProgrammer
Member
133 Points
175 Posts
Re: Is registration turned off?
Jun 04, 2008 05:38 AM|LINK
Hi there, when you put 2 diferents passwords , appears a pop ups to change your password, for a default user i think, so this is a bug right ummm i wonder see in there app a search to return values in external view to insert some entity in database (for example for insert a selling of a product you have to search for wich client is, as an example) ^^
C# my main PL in .NET
Miha Markic[...
Member
14 Points
6 Posts
Re: Is registration turned off?
Jun 24, 2008 11:18 AM|LINK
Method GetUser isn't correct in this context.
Add this method to Services/UserService.cs:
public User CheckUser(string userName){
User result = _repository.GetUsers()
.WithUserName(userName)
.SingleOrDefault();
return result;
}
And change this line (method Register(...)):
User userCheck = GetUser(newUser.UserName);
to
User userCheck = CheckUser(newUser.UserName);
Righthand .Net consulting and software development
Blog: blog.rthand.com
Web: www.rthand.com
robconery
Participant
852 Points
195 Posts
Re: Is registration turned off?
Jun 25, 2008 12:20 AM|LINK
Thanks - fixed this week :) thank you