I have created a simple web api in ASP.NET Core and wanted to publish to Azure Web App.
I'm using free trial subscription and have only one web app resource created in Azure.
The app service plan is using free tier 'D1' SKU and is the only one present in my subscription.
However, while trying to publish the web api by choosing this web app in Visual Studio publish profile, it says 'there are no existing instances available'.
The web app resource does appear here:
Clicking next while the resource is selected, results in the issue:
I have created a .Net Core Web App in the Azure free trial Subscription with free tier plan
Initially it contains only hoststart.html
KUDU Console of Initial App Service
Created a sample .Net Core Web API Application in Visual Studio and tried to Publish to the App Service which I have created in Azure portal
Make sure you have login to the same subscription in Visual Studio where you have created the web app in Portal
Initially it was prompted to re-enter the credentials after changing the Azure Subscription,I have refreshed the Visual Studio , after few seconds Iam able to see the correct Subscription details.
Iam able to see the App Service which I have created in Portal
Able to successfully deploy the WebAPI to the App service in Portal
KUDU Console of App Service after Publishing the WebAPI from Visual Studio
Deployed WebAPI Output
Update
You are in the correct path, after selecting the web app it asks to create the api.Click on the + symbol and add the API Management
Seems like you created a Web API resource and no API Management resources. Those two are independent Azure services. Former is needed to host your API application. The other one provides additional features to your APIs and is completely optional - you can look it up in the official documentation.
The step to select/configure API Management resource was introduced in deployment wizard at some point. It is confusing and probably could be handled differently.
Unless you need API Management resource, just skip the step and you'll have deployment profile ready.
Related
A bot is essentially a web API and so it can be hosted on any web service.
I am abit confused when one of the following approaches should be prefered over each other:
Option #1 Host a Bot on Azure Bot Service
Option #2 Host a bot as a plain PaaS Web API
Currently I am hosting my bot on a plain Azure PaaS App Services. It is working very well.
However, I expect there must be some advantages to hosting a bot on Azure Bot Service.
When I go through the documentations the following example shows how to Create an Azure Bot Service in Azure Portal, download its code, change it then deploy it again to the same Azure Bot Service:
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-build-download-source-code?view=azure-bot-service-4.0
In contrast, the following example shows how to build a bot in Visual Studio and publish it to an Azure Web App:
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-deploy-azure?view=azure-bot-service-4.0
What are the advantages of hosting a bot on Azure Bot Service?
Is there any resource or article that contrasts the two options?
They are essentially the same thing under the hood. A bot is basically just an API endpoint so there are many ways to host you bot. If you create A bot service you get options to add other services from the creation page. Whereas if you just create a web app or app service you will have to manually add these things.
Creating a Web App Bot will allow you to all in one step create:
Bot Channels Registration
Choose a template to start with
Configure a Luis app
Add Azure Storage
Add application insights
how can you Intergrate Asp.net web api with azure mobile service so as to do offline-online syncing xamarin.android app?
any code or samples
As I known, Mobile Apps in Azure App Service supports Offline Sync while Azure Mobile Services (with the URL like: service.azure-mobile.net) do not support this built-in feature. If you use Azure Mobile Service, I assumed that you need to Migrate your existing Azure Mobile Service to Azure App Service, in order to use offline sync feature.
For developing a Xamarin.Android App with offline sync, you could follow this official tutorial for creating an Azure Mobile App backend and download the Xamarin.Android demo project, then follow this tutorial to enable offline sync for your mobile app. Additionally, you could refer to adrian hall's book about Data Access and Offline Sync for a better understanding of offline sync.
Currently, my visual studio solution has 3 projects:
MVC project - to be deployed at say www.something.com
Web Api - to be deployed at api.something.com
SPA application - to be deployed at app.something.com
Will I be able to host all of these just through VSO source control? I am not sure if azure would be able to host the applications at respective sub-domains without explicitly defining them?
Can anybody please clarify? And what would be the best approach?
if you host your application on Azure App service, there is continues deployment service. You can have your code next to your site (Local Git https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/) or you can have your code in supported repository e.g github/bitbucket etc ..
And Azure App Service supports virtual directly, you can have multiple apps in the same site. see detail answer from here Publish Multiple Projects to Different Locations on Azure Website
While creating a provider-hosted app for SharePoint 2013 in Visual Studio 2013, in the app creation wizard on 'Configure authentication settings' page we have 2 options.
1) Use ACS
2) Use certificate(for on-premise)
Since I am using Azure as the host and I am forced to use ACS. Is it true? Is there any replacement for ACS for authentication in provider-hosted app in Azure?
I plan to change from Azure to on-premise at a later stage and I see this dependency on ACS annoying.
We can Authenticate with out ACS(or any external authentication provider) by using AFDS(active directory federation service). Federation Server needs to installed in Intranet(AD already exists). The external party (app) gets autheticated through this federation server. No external(outside intranet) authentication mechanism is needed.
I have a WebApi project that wraps the Dynamics CRM Online web service and provides a REST api. I have a simple controller that gets some contacts from CRM and returns them to the caller.
Everything works fine when I run it in the local emulator. However, when I deploy the project to Azure, I can reach the home page, but the controllers all return http 500 errors. Why would this happen? And how can I troubleshoot to get more details?
UPDATE
The issue is with the absence of Microsoft.IdentityModel.dll on the Server 2012 instance running the web role in Azure. I found this by opening web role instance in RDP, installing Fiddler, and making the request from Fiddler to the local IIS server. It responded with the detailed error.
Now my issue is figuring out how to enable IdentityModel on a Windows Azure Web Role. You're supposed to be able to add it via the Server 2012 Add Roles and Features wizard, but it's totally locked down on the Web Role. You can't check any boxes that aren't already checked. Is this even possible?
The issue is giving the Web Role access to Windows Identity Foundation when it's inherently not there. Marc Schweigert provides clear steps to do this here:
http://blogs.msdn.com/b/devkeydet/archive/2013/01/27/crm-online-amp-windows-azure-configuring-single-sign-on-sso.aspx
Go to the 23:00 mark of the video and you'll see the 4 necessary steps:
Reference Microsoft.IdentityModel.dll (need WIF SDK installed)
a. Set copy local = true
Create RegisterWIFGAC.cmd in your web role project
Create Startup Task in ServiceDefinition.csdef that invokes RegisterWIFGAC.cmd
Add GacUtil to the project (used in the startup task) to put Microsoft.IdentityModel.dll in the GAC every time the web role starts).