Publish Azure Mobile Apps Backend - c#

When going to publish my Mobile Service Backend there is supposed to be an option that says "Microsoft Azure App Service" but instead I get two other options: "Microsoft Azure Web Apps" & "Microsoft Azure API Apps (Preview)".
The Web Apps option identifies my service plan and SQL server but wants me to create a new mobile web app url which I already have.
Neither of these show my App Service I have already created. Is it because I don't have Azure SDK v2.9 or higher (as stated by the online resource I'm using)? When going into the NuGet Packages and it only has v2.0 for Microsoft.Windows.Azure.Server and no higher version
Anybody know how to get the higher SDK without going through VS 2015 or any other options?

According to your description, I suggest you could firstly check the existing of the mobile service resource in the VS2015 server explorer.
You could open it in the view --> server explorer.
Anybody know how to get the higher SDK without going through VS 2015 or any other options?
If this resource is existing, but the publish windows doesn't show this resource.
I suggest you could update your azure SDK(the newest is 3.0.1), you could install it in this link.
Besides, I suggest you could check you have created mobile service not web app service.

Related

C# backend Azure

I have a C# application that is built using the .NET Core Web API template. This works great locally and I can access the rest endpoints in my application.
For example /api/person/0 where 0 is the id of a person.
The problem is with Azure. When I create an app service and use a github repository the app gets deployed. In the logs I see the following partial error:
Physical Path   C:\home\site\wwwroot\api\gerecht\1
Azure thinks that my C# app is a simple website and tries to access the path as a physical file and not as an endpoint in my application. Why is Azure not accessing the endpoint?
Thanks
How did you deploy the application to Azure?
[Brute Force]
You may want to use GitHub Action from inside Visual Studio for this.
Right Click Publish
Azure (Select appropriate OS)
Deploy using GitHub Action
I experience this in the past and that was how I solved it.
Alternatively, you could use the Azure CLI from inside the directory that contains your .csproj file.
Official documentation here.

automatically update desktop app

We have a web app and a desktop windows WPF app.
Windows app sends data to webapp (hosted on azure)
Users download app from website. There are occasionally new versions of desktop apps available.
What is the most efficient way to setup automatic updates for desktop app? We are using github.
I found "releases" in github but I'm not sure how to notify desktop app and how to create an updater. (I guess we need to check for github releases every time app is started. Do I need to use Github api for this?)
What is the best repository structure for releases?
I'm looking for best practicies on how to perform seamless updates to desktop apps. (In terms of repository setup, creating web api to pull version info maybe?)
You can deploy your desktop applications using ClickOnce Deployment mechanism. This will take care of updating the software. Your users download the software from a publicly accessible Internet site. Whenever you have a new version available, you can simply deploy the latest deployment files on the download link. ClickOnce deployed application automatically check for any updated version on that link and prompt the user to download and install the latest version.
From the same MSDN link, one of the problems solved by ClickOnce deployment is facilitating automated updates:
Difficulties in updating applications. With Microsoft Windows
Installer deployment, whenever an application is updated, the user
must reinstall the whole application; with ClickOnce deployment, you
can provide updates automatically. Only those parts of the application
that have changed are downloaded, and then the full, updated
application is reinstalled from a new side-by-side folder.
I was looking into accomplishing the same needs and came across this library which can do what you're asking for;
https://github.com/Squirrel/Squirrel.Windows
There's a lot of configuration, but what you're asking for is not trivial, but maybe you can get some ideas.
For our needs; we're going have our build server (teamcity) create an MSI using a Wix project then the app will download and execute the MSI. Once we go to production we'll move MSI hosting over to some more enterprise-y CDN type setup.

Install-Package : Unable to find package 'Phone.Notifications.BasePage.'

I was trying to implement Push Notification.I was trying based on this Link (http://www.wadewegner.com/2011/11/adding-push-notification-support-to-your-windows-phone-application/) in VisualStudio Express 2012 for windows phone.
When I was installing Package 'Phone.Notifications.BasePage'.
Following error was raising.How can i overcome this.
And also can anybody please tell me can I add Windows Azure Project.(ASP.Net MVC3 Webrole)to my exiting solution.Which Azure Package wil be supported in VS Express 2012 for windows phone.
Based on this link(https://msdn.microsoft.com/en-us/library/azure/ff683673.aspx) I am thinking WindowsAzurePackage will not be supported in VS Express 2012 for windows phone.I dont have any idea on this(Windows Azure Packages)PUShNotifications.I am Seeking for some help.
ManyThanks in Advance...
Adds a reference to the Azure Service Bus SDK with the WindowsAzure.ServiceBus NuGet package.
This is for 2013 but I am sure it will work in 2012
Look at the end of the following documentation on azures web site
http://azure.microsoft.com/en-us/documentation/articles/notification-hubs-windows-store-dotnet-get-started/
This will only work communicating from your MVC project to azure. Not communicating from your phone directly to the notification hub. You will have to add a rest api to your MVC application and then use RestSharp to send messages to your MVC application from the phone.

Update Javascript libraries when deploying a web application to Windows Azure

I have an MVC4 web application that uses jquery and some other libs (jquery-ui in particular).
Yesterday I decided to update all the packages via NuGet package manager; my web application worked correctly on my local machine, but when I deployed it to my azure website a javascript error popped out in my browser (it was related to jquery-ui library, something like "$browser is not a function").
I searched the web and found out that the cause of this error was that I was still using an old version of jquery. It seems that deploy process didn't publish the new version of the js libraries even if they have been updated in local project.
I solved the problem connecting via RDP to the Azure machine, deleting the contents of "Scripts" folder and deploying again, but I'm wondering if there's a way to "force" script/libraries update when deploying to Azure.
Edit 1: I'm developing with Visual Studio 2012, using Mercurial as source control provider
Edit 2: I'm deploying to Azure Web Sites
Please, in your future questions clearly indicate what type of Azure Service do you use. An MVC4 web application can be deployed to 3 different type of services: Azure Web Sites, Azure Cloud Service, Azure Virtual Machine!
Since you are talking about RDP, the viable options are Cloud Service or Virtual Machine. But then you say
I solved the problem connecting via RDP to the Azure machine, deleting
the contents of "Scripts" folder and deploying again, but I'm
wondering if there's a way to "force" script/libraries update when
deploying to Azure.
Now the question is how you do deploy to Windows Azure? Is it via Visual Studio's Publish feature to Azure Cloud Service. Is it Visual Studio's Package feature and then using any other method of deployment (upload the package from the portal, use Azure PowerShell cmdlets, or use third party tool to deploy the package)? Is it integration with Mercurial and deployment is done automatically when you check-in?
Any any case, the issue you face is a mixture of NuGET failing to do real clean update of everything. Browser caching - especially for local development - IE caches all the scripts, CSS and images and it is hard to say (without explicitly deleting all locally cached files) which script are you actually using. Simple version control issue - keeping old and new scripts.
When you do a JS/CSS updates I strongly advise all the customers to first delete all browser's cache (crtl+shift+del - works for all browsers) before testing locally.
I highly doubt that if you use a Cloud Service, RDP-ing and deleting anything in the sitesroot folder will help you when you redeploy. What you do in the ROLEROOT drive (usually E:, sometimes F: drive) is dropped of/forgotten when you re-deploy regardless of the re-deploy method you use: in-place-upgrade or full re-deploy. So what you did is actually creating new package and re-deploying your new package.
The fact that you deleted some folder has no effect on your re-deploy action.

Deploying a sql server based webservice on azure virtual machine

I have developed a web service in VS2008 in C#. The service queries a SQL Server Express 2012 database and returns the results. When I test the service on local development system it works fine.
Now I have a windows azure trial account, and I want this service to be deployed on a virtual machine.
1- I have tried to create virtual machines with SQL server and Visual Studio on it, but could not create the service there. VS does not have the Web services template there.
2- I have tried to create the deployment package on my dev system and tried to install the service but it also did not work.
Please suggest the correct way of doing this task. I am very much new to all these concepts so may be I am missing some basic information and a step by step guide will not hurt.
Install Visual Studio 2012 Express for Web
Get your application working in that version, and preferably upgrade it to .NET 4.5.
Create a Windows Azure SQL Database by following this Getting Started guide.
Download version 4.0.15 of the SQL Azure Migration Wizard from CodePlex.
Use the wizard to migrate your local database to Azure, being sure to fix all the problems it reports.
Set up a Windows Azure Web Site and publish your service to it as described in this article.
I am not sure that you did it that way, but the easiest way to create a cloud-hosted web service with MS SQL Backend would be:
Create a new instance of SQL Azure in Azure Management Portal.
Create a new database (probably a web edition in your case).
Use the connection string from the portal and Azure SDK to develop an ASP.NET application (web role) hosted on Azure. You can locally test this application in the similar way how you test your current ASP.NET application, provided you set up the firewall on your SQL Azure instance for inbound connections from your external IP.
(here is the step-by-step tutorial for the first three steps)
Create a new instance of cloud service in Azure management portal.
Deploy your application to the cloud directly from Visual Studio. You'll, however, need at least Visual Studio 2010 and the Express Edition would already do.
(Update: As Mark Rendle suggests in the comment and in his answer, there is no need to create a separate cloud instance as long as your service is light-weight and does only data fetching. Cloud instance would be, however, essential, if your service requires data processing or has some other logic entailing long-running processes).
Alternatively you might want to use Azure Mobile services, that already provide a web service for SQL Azure that might do. This is a fully RESTful web service and you'll just need to write some logic in JavaScript, similar to Node.js implementation. See an excellent tutorial on this issue.

Categories

Resources