2
我正在完成從WCF移植到SS的應用程序,我有一個關於authenticationservice的問題......我已經實現了我自己的Provider,它從CredentialsAuthProvider中調用hinert並調用hxxp:// url/API /權威性?用戶名= ABC &通= 123它的工作原理... 我想知道(也許我錯了),爲什麼沒有AuthenticateRequest /響應DTOSilverlight的Servicestack身份驗證服務
我問這個,因爲我使用提供的實現here
對於我創建的驗證請求爲
public class AuthRequest
{
public string UserName { get; set; }
public string Password { get; set; }
}
和它傳遞給/ AUTH服務,但是當我處理響應(布爾)我得到的響應回調
private void ResponseCallback(IAsyncResult asyncResult)
{
try
{
// Get the web response
var webRequest = (HttpWebRequest)asyncResult.AsyncState;
var webResponse = webRequest.EndGetResponse(asyncResult);
// Get the web response stream
var stream = webResponse.GetResponseStream();
// Deserialize the json data in the response stream
var serializer = new DataContractJsonSerializer(typeof(TResponse));
// bool res = (bool)serializer.ReadObject(stream); //bool cannot be converted since it's not IConvertible
var response = (TResponse)serializer.ReadObject(stream);
...}
任何建議例外嗎?我應該定義自己的AuthFeature嗎? 謝謝
您好,感謝您的回覆...我就可以了!謝謝 – advapi