0
只是一個小的查詢System.Web.Services:有沒有在Context.User.Identity密碼財產
使用.NET Web服務,並創建了簡單的登錄方法
[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;
}
IM有任何密碼財產比如「Context.User.Identity.Name」。或任何其他可替代
請建議,如果我失去了一些東西
你想完成windows驗證?而且沒有這種靈活的上下文.user.identity.password – 2013-05-04 13:11:15
ASMX是一項傳統技術,不應該用於新開發。 WCF應該用於Web服務客戶端和服務器的所有新開發。一個暗示:微軟已經在MSDN上退役了[ASMX Forum](http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/threads)。 – 2013-05-04 13:50:09