我正在尝试使用以下代码块来使用移动服务客户端的服务api:
MobileServiceClient mSClient;
private async void Login_Click(object sender, RoutedEventArgs e)
{
mSClient = new MobileServiceClient("https://XXXX.azure-mobile.net", "UFakeKkrayuAeVnoVAddgddcjYziYFSFHUV89");
Dictionary<string, string> userobj = new Dictionary<string, string>();
userobj.Add("UserName", txtuser.text);
userobj.Add("Password", txtpass.text);
userobj.Add("DeviceUID", "010092780200134E0300215F0400CC37050083D807006B9B080066010900267F");
userobj.Add("DeviceToken", "device_123");
userobj.Add("OSVersion", "WindowsPhone");
userobj.Add("AppVersion", "2.0");
userobj.Add("DeviceModel", "Windows phone");
userobj.Add("DeviceTypeID", "1");
userobj.Add("DeviceAlertsOn","true");
var responce= await mSClient.InvokeApiAsync("/user/loguserin", HttpMethod.Post, userobj);
}
我收到以下异常:
类型的例外 Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException 发生在mscorlib.ni.dll中,但未在用户代码中处理。
获得以下答案:
{StatusCode:404,ReasonPhrase:&#39; Not Found&#39;,Version:1.1,Content:System.Net.Http.StreamContent,Headers: { 服务器:Microsoft-IIS / 8.0 Set-Cookie:ARRAffinity = 05b093af5f4e7c6d198da2b2771de80c714f0499531fcab7ac6cc84e48dfeafc; Path = /; HttpOnly; Domain = chiefservices.azure-mobile.net 日期:2017年9月27日星期三07:59:33 GMT X-Powered-By:ASP.NET 内容长度:0 }}
有人可以帮我吗?
谢谢, SRINIVAS