asp.net - System.Web.Services : is there password property in Context.User.Identity -


just small query

i m using .net web service , created simple login method

[webmethod]     public bool login(string susername, string spwd)     {         if (susername == context.user.identity.name && **spwd == "123456"**)         {             formsauthentication.setauthcookie(susername, true);             return true;         }         else             return false;      } 

is there password property "context.user.identity.name" . or other alternative

please suggest if missing

your approach doesn't make sense. context.user set forms authentication module relies on information forms cookie. you, on other hand, try use information acually issue cookie.

this means need cookie issue cookie. won't work.

try rethink approach - need external data source, database or something, validate users against. in database have both usernames , passwords stored somehow.


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -