Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Do i have to publish my webservice before using it

$
0
0

Hi
I have created a REST web service using ASP.NET core web api. When i tried to use it, it is just getting out of function (not even throwing an error). I have read that Rest web services don't need to be published. Is it true?

BTW,
this is my code for the Web service consumption, i will appreciate it if you can tell me where i am wrong.

           string strUriGetusers = "https://localhost:49391/api/user/getusers";
            using (var objClient = new HttpClient())
            {
                 response = await objClient.GetStringAsync(strUriGetusers);

                var UserList = JsonConvert.DeserializeObject<List<User>>(response);

                UserCollection = new ObservableCollection<User>(UserList);                   
            }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>