TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anele Ngqandu
1.3k
430
28.6k
Postasync works with UWP but breaks on android project
May 15 2017 10:35 AM
Hi
Been having issue with Xamarin Cross Platform Android Project. I am using Wep Api Project to call a service from xamarin portable project.
//Portable project
var auth =
new
SigninModel
{
Username = username,
Password = password
};
var stringContent =
new
StringContent(JsonConvert.SerializeObject(auth), Encoding.UTF8,
"application/json"
);
var response = await Client.PostAsync(
"http://localhost:54019/api/AuthenticationApi/Login"
, stringContent);
//WebApi
[System.Web.Http.Route(
"api/AuthenticationApi/Login/"
)]
[System.Web.Http.AcceptVerbs(
"GET"
,
"POST"
)]
[System.Web.Http.HttpPut]
public
DBResult Login(AuthenticationModel model)
{
SupervisorModel result =
null
;
bool
hasError =
false
;
string
errorText =
""
;
if
(ModelState.IsValid)
{
result = Authentication.AuthenticateUser(model.Username, model.Password);
}
else
{
hasError =
true
;
}
return
new
DBResult { status = !hasError ?
"Success"
:
"Fail"
, descripText = BadRequest(ModelState).ToString(), data =
new
SupervisorModel { Id = result.Id, Name = result.Name, Surname = result.Surname } };
}
Reply
Answers (
1
)
Show table form details based on distinct in PowerApps
"Resource. Id.file_settings" does not contain application