I'm evaluating Xamarin and Azure. I would like to use App Service as a backend store.
I downloaded the C# backend and the Xamarin.Forms client application
I published the backend but it doesn't create the TodoItem table in my SQL Azure database.
It's possible to create this table by selecting the Node.js backend and click the Create TodoItem table. After this, the client application works nicely.
So, is there something to do for the C# backend to create the tables at startup?
is there something to do for the C# backend to create the tables at startup?
1.Add the data connection for Azure mobile service
2.Download the C# backend, and publish it to Azure. Make sure that conection string is the same as azure mobile App.
3.After that we could visit the browser
(http://yourmobilesitename.azurewebsites.net/tables/todoitem?ZUMO-API-VERSION=2.0.0)
it will create todoitem table for us automatically.
4.Check it from the VS Server Explorer
Note: If we want to connect the Azure SQL, we need to add the client ip in the Azure SQL firewall to allow our client to connect.
Another way is that we could use code-first migration easily to do that. I created a demo before, more detail please refer to another SO thread. We also could get more info from this tutorials.
Related
I want to create a native android app by using angular nativescript because I already have angular knowledge. I do not need to re-use angular code because of a parallel existing web app. There will just be the android app.
The user will create and save some data which could be stored on a sqlite/room database on the smartphone. All links about data access I found are about JAVA.
How can I write the backend database access code with C#. Even better would be an ORM to access the local persistent store. I do not want to create a database on azure and make it available via C# web api. Thats total overhead for my situation.
I started developing a new Cross-Platform app with Xamarin.
For other projects my teammates created an azureDB with certain tables that I want to Query for my new Application. Can anyone tell me how to connect my new app to the AzureDB?
Thanks!
The recommended way to connect to the database is using an API that will manage the interaction with the database. On this article you will find how to build a REST API to access an Azure SQL Database.
I have a website, but some of the back-end infrastructure is little slow.
So I am planning to get help from CLOUD, I haven't decided which one yet.
I need to know does Microsoft Cloud does the same thing.
What I need is following,
1) Have database on external web resource.
2) Have code and http enabled methods that I will write in C# and place it on Cloud.
3) And call the methods in step 3 from my asp.net MVC wesite's codebehind and client side(javascript).
I need to know if I get support from Microsoft Cloud platform, will I get the solution required in above 3 mentioned points?
And if I get support from Microsoft Cloud, then the coding syntax for SQL, will be same as if I run queries against normal SQL Server database
Thanks,
If I am understanding you correctly in that you are looking to have a cloud hosted SQL database and HTTP access to this database through custom C# code, then yes to all three of these.
You can set up your database as an Azure SQL database and create an ASP.NET WebAPI application to open up your database to HTTP calls as you see fit. Then you can use the REST client of your choice to access your database from your MVC controllers or through Javascript in your views.
Also, yes, SQL syntax for Azure SQL is the same as for regular SQL Server.
I'm pretty new to MVC. I'd like to deploy the default sample web app to Azure with a basic Identity Model installed so that I can confirm basic user authentication is working in production. I can't seem to get it working.
I am using Visual Studio 2015 RC. I launch a new MVC web application project. IdentityModels.cs is installed by default. If I connect to LocalDB, it runs great. If I connect to an Azure SQL DB instead, it runs great. I am able to register and then log in with the credentials I've created. The database updates as expected either locally or on my Azure SQL instance.
The problem is when I deploy to production. I make no changes to the code whatsoever, and Publish via Web Deploy. When running the same code from an Azure website, I try to submit user info on the Registration page and I get a 500 error: Failed to load resource.
It seems that my Azure website cannot connect to the Azure SQL DB, even though I verified that it could connect just before I used Web Deploy. Can anyone help me figure out why?
You need to allow Windows Azure Services for your Azure DB through managing the allowed IP addresses, because your DB is initially inaccessible, except from an IP range that you specify.
I'm working on an exercise and i want a help. So far I have to created an MVC4 Internet Application using C# and uploaded it to azure as a web site (custom create with sql server). Now I want to create a web service to use the same database that my web application is using. How I can do it?
I found an option when you create a new project (C#->Cloud Project-> Windows Azure Cloud Service)
Note that then i want to use the web service with workflow based service
Thank you
Connections to SQL Azure are just Connection Strings. This isn't any different than creating applications on premises or hosting them elsewhere. Get the connection string of your existing Azure SQL Database and then use that when setting up your database calls in your web service project. You can get the connection string from the Windows Azure Management portal. Dig down to the database and there will be a Show Connection Strings option on the dashboard page for the database. See this documentation if you aren't familiar with working with connection strings Azure SQL: http://msdn.microsoft.com/en-us/library/windowsazure/ee336282.aspx
Note that Azure SQL Databases do not support integrated windows authentication, so the connection string will contain the username and password. You may want to look into securing that information in your configuration.