Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2006

Tip: Looking for answers? Try searching our database.

Authentification using WSE2

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
escristian@hotmail.com - 05 Dec 2006 22:02 GMT
I'm trying to login to a web service using Web Service
authentification. Everything works fine, but when I'm treating the case
where the user enters an invalid user name or password I get an
SoapHeaderException with the error message "The security token could
not be authenticated or authorized"

The problem is I end up with code like this when tryint to catch a bad
username or password:

catch (SoapHeaderException soapEx)
{
 //A SoapHeaderException with this error message means that we have an
invalid login
 if (soapEx.Message == "The security token could not be authenticated
or authorized")
   throw new ArgumentException("Could not logon to the Server. The
UserName or Password is invalid");
 else throw soapEx;
}
catch(Exception ex)
{
 //Normal Logic
}

Is there a better way, i.e that doesn't compare the Message string from
the exception to know that the user name or password we passed along is
invalid?

Thanks
Pablo Cibraro [MVP] - 06 Dec 2006 15:56 GMT
Hi,

I work with WSE for a long time, and I think your approach is correct, there
aren't better ways to do the same.

Regards,
Pablo Cibraro

> I'm trying to login to a web service using Web Service
> authentification. Everything works fine, but when I'm treating the case
[quoted text clipped - 25 lines]
>
> Thanks

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.