TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dotnet user
NA
2
0
Object reference not set to an instance of an object.
Apr 6 2010 2:25 PM
When I'm writing a unit test for failed authentication, I'm getting an error like this: Object reference not set to an instance of an object.
Here's my code(pretty simple):
//validate with wrong username
The validation fails here(as expected) but I get the error: Object reference not set to an instance of an object.
ValidateUserResults
validateUserTestFail = serviceClient.ValidateUser(
"newuser"
,
"newPass1-i"
);
Assert
.IsFalse(validateUserTestFail.Success,
"Validate result should have been false"
);
// Authentication failed-wrong password
The validation fails here too(as expected) but I don't get the error.
ValidateUserResults
validateUserTestFail1 = serviceClient.ValidateUser(
"newuser1"
,
"123"
);
Assert
.IsFalse(validateUserTestFail1.Success,
"Validate result should have been true"
);
Can anybody please tell me why this is happening? I tried everything I can, but couldn't find a solution....
Thanks a lot in advance
Reply
Answers (
1
)
.Net membership problem
Find and Highlight a Treenode in ASP.NET Web Application ( Treeview) ?