microsoft / AzureTipsAndTricks

Learn some of our favorite Azure tips and tricks—some long-standing, and new ones that have recently been added to become more productive with Azure. Star the repo now to shave hours off your coding tasks tomorrow.
http://azuredev.tips
Creative Commons Attribution 4.0 International
1.49k stars 489 forks source link

Deploying an ASP.Net Web API (Core or Not) to IIS on Azure running SendGrid #18

Closed davidekarasek closed 5 years ago

davidekarasek commented 5 years ago

We already have ASP.Net Web API Core services running on Azure under IIS. The problem is the existing example for IIS configuration (written for IIS 7.5) of SendGrid makes no sense given that Azure 1) doesn't allow creation of an SMTP server, and 2) doesn't run IIS 7.5, but it runs IIS 10.

Can someone post exact steps, if any, to ensure that we can run our SendGrid C# ASP.Net Core API on an Azure virtual machine under IIS on Azure?

I should mention that we're doing this because our client HTML5 web apps, which call our web services, are also running on the same IIS instance and referenced within the same domain.

What we don't want to do is get into the complexity of running a custom Azure API running SendGrid on some other server/cloud instance not sharing the same domain. Though I understand the reason for doing this for some scalability, this is out of scope for what we need to more simply accomplish.

It's already disappointing that we can't directly host SMTP on Azure, but have to use a SendGrid as a third party product to accomplish the same functionality for our user. Almost every web app on the planet needs to perform SMTP services, and this thus defeats any simplicity of using Azure for Web App hosting.

mbcrump commented 5 years ago

There are a couple of options for sending mail that are outlined here.

davidekarasek commented 5 years ago

Cool scenario, but doesn’t seem that straightforward to implement. Seems to have additional closed architecture dependencies such as Azure SQL and Active Directory authentication. Maybe the latter’s only for the service accounts which is ok. But what if the solution doesn’t use a Microsoft RDMS? What if it uses OAUTH2 and not Active Directory for security?

On Tue, May 28, 2019 at 5:47 PM Michael Crump notifications@github.com wrote:

Closed #18 https://github.com/microsoft/AzureTipsAndTricks/issues/18.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/AzureTipsAndTricks/issues/18?email_source=notifications&email_token=ABRVAFJZ747HNU3F2PLYKW3PXWR5NA5CNFSM4HMZGLS2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGORV2KELY#event-2373231151, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRVAFPLGUY4GMHMLRLDVULPXWR5NANCNFSM4HMZGLSQ .

-- David Evan Karasek davidekarasek@gmail.com