News

Azure Mobile Services .NET Adds CORS Support, Better Authentication

Support for cross-origin resource sharing now built in via the ASP.NET Web API.

Microsoft's Azure Mobile Team has an update to its Azure Mobile Services .NET that adds has built-in support for the cross-origin resource sharing specification, as well as improved authentication.

Azure Mobile Services is aimed at mobile developers who want to plug in a cloud-hosted backend to their mobile apps. It uses the ASP.NET Web API and is fully supported in the Visual Studio IDE.

Cross-origin resource sharing is a specification for standardizing cross-domain requests that bypasses JavaScript's same-origin policy. The CORS support in Azure Mobile Services .NET comes by way of support now embedded in the ASP.NET Web API 2.2 Cross-Origin Support 5.2.0 package, which can be downloaded via this Nuget package.

CORS is not enabled by default in Azure Mobile Services .NET, and must be turned on through the Azure management portal or set through the MS_CrossDomainOrigins app setting. Once done, CORS policy can be set at "a per-service, per-controller, or per-action level," blogs Henrik Frystyk Nielsen, principal architect for Microsoft Azure Mobile Services.

Authentication methods have also been improved. Besides authentication via Azure Active Directory, Twitter, Facebook, Google, and Microsoft Account, other authentication methods can be customized. Nielsen writes of an example using LinkedIn authentication that uses an OWIN middleware and registration of that package through the LoginProvider.

Azure Active Directory Authentication has been built in from the beginning, but Nielsen writes that it has been improved "using a server-side flow simplifying client authentication significantly."

Details and download instructions are here.

About the Author

You Tell 'Em, Readers: If you've read this far, know that Michael Domingo, Visual Studio Magazine Editor in Chief, is here to serve you, dear readers, and wants to get you the information you so richly deserve. What news, content, topics, issues do you want to see covered in Visual Studio Magazine? He's listening at [email protected].

comments powered by Disqus

Featured

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

  • Copilot Agentic AI Dev Environment Opens Up to All

    Microsoft removed waitlist restrictions for some of its most advanced GenAI tech, Copilot Workspace, recently made available as a technical preview.

Subscribe on YouTube