Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to deploy the Azure Functions in Local IIS?

I have created a HttpTrigger using Visual Studio 2017. I can able to debug and able to call the azure function from web browser using below mentioned URL.

localhost:7071/api/Demofunction?name=amit

I have published the Project in a Local Folder in my system. Is it possible to deploy the generated dlls in the Local IIS and call the API from browser? If Yes, then how to do this?

like image 780
amit325 Avatar asked Dec 08 '25 08:12

amit325


2 Answers

If your primary concern is how to use Azure Functions on premises instead of using azure you can use the Azure Functions Runtime to deploy and run azure functions on premises:

The Azure Functions Runtime provides a new way for you to take advantage of the simplicity and flexibility of the Azure Functions programming model on-premises. Built on the same open source roots as Azure Functions, Azure Functions Runtime is deployed on-premises to provide a nearly identical development experience as the cloud service.

like image 108
Peter Bons Avatar answered Dec 10 '25 05:12

Peter Bons


I think you should look to this article:

https://dev.to/gjcampbell/running-azure-functions-in-iis-32a

It seems that you can run .net core V2 Azure Functions on your IIS.

All you have to do is download and install a release (here) from azure-functions GitHub repository (here) and configure your web.config of a pretty empty web site hosted in IIS:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <remove name="aspNetCore" />
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="C:\hosting\Functions.3.0.14191\3.0.14191\64bit\Microsoft.Azure.WebJobs.Script.WebHost.exe" hostingModel="InProcess">
      <environmentVariables>
        <environmentVariable name="AzureWebJobsStorage" value="UseDevelopmentStorage=true" />
      </environmentVariables>
    </aspNetCore>
  </system.webServer>
</configuration>

Of course, you will need .NET Core Runtime installed on server as well (download).

like image 34
Bruno Leitão Avatar answered Dec 10 '25 04:12

Bruno Leitão