Publishing the web service to Microsoft Azure

Houssem Dellai
A free video tutorial from Houssem Dellai
Currently working at Microsoft, ex Microsoft MVP
4.1 instructor rating • 4 courses • 30,767 students

Learn more from the full course

I want to connect my Xamarin Forms app to REST API

In less than 3hours, learn how to create a REST API with ASP.NET Core and call it from Xamarin Forms app (iOS & Android)

02:18:15 of on-demand video • Updated March 2018

  • Develop mobile app prototype
  • Understand how REST web services works with mobile apps
  • Implement CRUD operations' calls with user interface
English [Auto] I want to publish my web site and do a public and point instead of using the localhost. You can still using localhost But later when we move to other forms application actually you can still call the local host from the windows the WP application but from Android and iOS stimulators you need to add some configuration to a Visual Studio and two ideas in order to be able to access the local host from the emulator to make things simple and easier. I just publish my baby into public and point and here I choose you. If you are new to Azure actually you can start free so you can get a free account with just your credit card. You can get three months free account where you have 200 USD each each month for testing. And if you are a student you can you can get a free account on using your student card. I created an account on Azure and here is my dashboard on Azure and right here I go and provision a web application from Azure. Then I go back to Visual Studio and upload my ISP NET application code to this server. So I go to create a new resource by clicking create through stores then here from these templates I choose word up because what they want to create here is that we're up and this window. It is asking for a public email and point that I'll be using and which under which my obligation will be hosted. So I'll go with this to do up you one for example. So I give it a name and it will have this I think that over Web sites dot net but they can change that to have a personalized you added. Then here I check. I choose my subscription. I choose the first one. So for you you might have another subscription called pay as you go for example for the research group. If it does you're the first time you use Azure that will ask or at least exist that you create a new resource for the West. We'll be hosting our web app on Windows but we've been at war that is now cross-platform we can host hosted on Linux to the absolute plan from here and to some other places but here we can get this default. After that it's done we had to create and that will provision the Web Application for us. So why is it still provisioning up. We'll go back to our visual studio and hear from you. So do I go and make a last change. So we so that we are using sequel's server that is because in up settings the connection string here is pointing to a Stigwood server that I base that to make things simpler. I just use sequel lite. You can keep using sequel server. It's OK but for me here or will I be carrying with Stigwood light so that in azure I don't have to create a new service and pay for it which will be a sequel server. My app here is up so I can do that. But any real order application in the real production application has to go live. It might be not enough. And moving to the core server might be the best option to do so here I make some changes in order to use another database and those changes are only on the start. So from the start that you use we will change this one right here used to go server by telling it to use a sequel right. So here we have the command for telling my app to use Cygwin light instead of sequent server will keep using the same key for the connection string but we need to change the value of this connection string to use the connection strength for a sequel like that that is which is a simple thing here saves only data source and then the file for our database is an existing existing file because it will be created later. So those are the only two changes in order to move from using SQL Server to use sick or light inside. And its been at an obligation. Now let's move back to Azure. And here it tells me that the web was created successfully. I would go to that web app actually and move to another one that they have created earlier which is right here so you can go to this page by clicking on the link provided or by selecting the on the server the resource or the service that you have created. So from your vague bros. It will go to this website that tells here that the site is under construction because we don't have any file on that services. From here I need to use this publish profile from visual to studio in order to be able to publish my application from Visual Studio to Asia. So I did get published profile and that we'll go and download a publish set things for me. I use that publish things from visuals to do so here for business to do this to publish this application is to go to the project Right-Click then hit publish I think publish now we get this window daily that expose some options for publishing a web application from a visual studio so here we can connect to our Azure subscription from Houston to and from there will detect automatically our our Web. But here we make things simpler. I go and import the files that they have downloaded from the azure portal. So I select that then hit publish and from here it asks where the file is located. So it is in my downloads. And here it is. I select that file and now viewas Did you will start connecting to Azure and sand my web application or create this. And the digital files that needs to be uploaded to Azure to my website that they have created. Once that done the website will be allowed inside the browser and from here I can go to my API. So you see here it doesn't contain any new web pages because this is an arrest API. It's not a web site. So from here I can go to AB I-Slash to hit enter and from here I get the I'm just trying to say that for my database I don't have any data storage yet to add data to this publisher add web application. I can go back to postman and from within postman. The only thing I need to change is the local hosts so I can reuse my previously created requests and only change the user. So I get this and you were you were right here and replace it with look at. So I got that then I'm back to right here. Let's go to the first and change that by this new added gas hit sand and now it's down to my Azure Web site and here it is. Now it's telling us that it was done successfully by the Veikko on. If I go back to the get request and I'll make it go to get all the to do sand. Now I get this right here. I can also move back to refresh and get my my to do story in azure.