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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -