Azure Mobile app don't list web services - azure

This is driving me crazy. Testing Azure backend app to see my services, the TRY OUT Link doest not show in the page. Therefore I can't access the services list. However the mobile app pages shows perfectly saying that "This mobile app is up and running"
Tried entering the URL directly localhost:51550/Help and the server returns 404

See Azure App Service Mobile - Try It Out not visible. The Try it Out button has been removed in Azure Mobile Apps, in favor of Swagger support. See Adding Swagger Metadata and Help UI to a Mobile App.

Related

Uploading Web API to Azure makes Blazor Web App not accessible

I have been trying to understand what I am doing wrong for about a week now. Here is my structure:
I am publishing Blazor server app to number 1. Then I have created ASP.Net Web API, tested it on my localhost and would like to upload it to Azure to access it online. However after I am hitting Publish in Visual Studio, my entire Blazor app is not any longer accessible from https address. Then I am Publishing my Blazor app again from Visual Studio and it is working fine again. What I am doing wrong? Is there any guide how to publish Blazor Web App and then host ASP.Net Web API on the same Azure account?
"on the same Azure account" is of course possible, but when you have 2 projects you will need 2 App Services, maybe under 1 service plan.
Two services cannot share the same URL.
I don't think you need an "API Management service" but I could be wrong.

Forms Authentication not working in Azure app service

I have a .NET MVC 4 application with .net framework 4.6.1 with forms authentication enabled. Is it possible to have this hosted in Azure app services. I am not finding an option in app services to have forms authentication enabled and getting the attached message when I navigate to the website.
I have the application taking me to the login page on a local server with IIS however not being able to make it work in App services. Any help would be appreciated.
Thanks.
I was able to get this working by fixing a connection string which was causing an error however the message for default document not set in azure may have been misleading.

Running Angular5 app locally against Azure AD protected backend

We have an Angular5 application with a DotNet OData backend API. The application is hosted in a Web Application with a virtual directory for the Angular5 app and another virtual directory for the DotNet backend. The web application is secured by Azure AD, with an Azure AD Application defined for the web site.
This all works perfectly. We have no authentication code in the front end (except for 'withCredentials: true' set in the service calls) but apparently having the whole application protected by Azure AD makes the front end able to call the backend without issue (Azure makes you authenticate when you access the Angular5 front end).
The problem comes when we try to develop the front end. When developing Angular5 one needs to run the Angular5 code locally, so I've set up a web app which hosts only the backend code and point the local configuration for the Angular5 app there. This fails with the first backend call with a 401. One of our developers discovered that if you simply plug in the URL to the backend with the same browser (i.e. copy the failing call from the browser network developer tab into a new browser tab in the same browser) you will go through the authentication process and then when you run the local Angular5 app again it works. We thought we had found a workaround until we noticed that for some reason this only seems to fix the "read only" calls. GET works, OPTIONS works but POST fails with a 401. I put some debugging code in the backend but it seems this code does not even get called (i.e. Azure, not our backend, is blocking the call).
So I've tried to figure out how to get the local Angular5 instance to behave as the one hosted by the Web app but I can't figure out what I need to be doing. I have also been unable to find anyone else doing this so I can't find a solution.
I have tried various solutions of actively getting a token (e.g. setting up /.auth/me, using adal5 to "login", etc.) for the front end but it seems every possible solution is defeated by CORS in the end. Our backend has an Allow-Origin for localhost:4200 but this doesn't apply to login.windows.com for the authentication step. I tried putting localhost:4200 in the CORS setting on the Azure Web App but then it complains about an Allow-Authentication header being missing and I have no way to force Azure to provide that. I read online that this is happening because Azure didn't expect people to be using "cookie authentication" so after some research I found that "cookie authentication" was being used because of the "withCredentials: true" calls, so I changed all of those to false. Then the Allow-Authentication failure goes away but I just run into more CORS failures during the authorisation (login.windows.com).
So I'm really stuck here. I can't believe I'm the only person on earth who's trying to run a local instance of Angular5 against an Azure AD secured Azure Web app backend but I can't find any examples anywhere of people successfully doing this. I also would like to avoid having to do some elaborate local authentication because the code works perfectly as-is when hosted on the same Azure Web app as the backend. Does anyone have a setup like I describe that is working?

Azure - Making an API App available to a Logic App

I've created a web application API with a swagger interface that I've deployed as an API App to Azure.
When creating a Logic App I can find my API App but whenever I try to use it I get the following error:
Failed to fetch swagger. Ensure you have CORS enabled on the endpoint
and are calling an HTTPS endpoint.
I'm using the default https url for the API definition in the API App:
https://microsoft-SOME-LONG-MS-INTERNAL-ID.azurewebsites.net/swagger/docs/v1
The swagger docs have been provided in my C# web API application through Swashbuckle.
For CORS I've set a single * item.
This didn't seem sufficient for the Logic App to access the API App I then configured Authentication / Authorization for the API App to use Azure Active Directory (express), creating an AD Azure App.
I believe the issue will be one of configuring security which is all pretty new to me in Azure. I'd like to make the API App inaccessible externally, but available to Web Apps and Logic Apps within my Azure subscription.
I've not added any authentication mechanism to the ASP.NET web application itself as I figured the web application would effectively be sitting in a private network on Azure. Perhaps this is a bad assumption and I need to add authentication to allow Azure AD to work?
Any pointers / suggestions?
Turns out I needed to update the Azure SDK for Visual Studio. I had an older version that was deploying a preview Api App which resulted in a "Api app host" type being deployed rather that an "API app" type.
Everything works after the update and I've found some documentation for securing the API App and making it available in the Logic App - https://azure.microsoft.com/en-us/documentation/articles/app-service-logic-custom-hosted-api/

Web page in Azure Mobile app

I have created a Mobile App in New Azure portal. It has many APIs available for mobile users and some API for admin. we are creating Admin page (HTML with jquery). Is it possible to host the Admin page in Mobile App or do i need to create separate web app in Azure portal ?
A mobile app is essentially a web app customized for mobile features. So, yes, this is possible.
Place your HTML page (ie: index.html) in wwwroot of the web app.

Resources