0

I can't find an example code for publishing ASP.NET Webforms websites to Azure Functions. Months ago I tried to replicate the C# example but I ended up with only being able to use the precompiled batch function type.

I want to publish VB.NET web apps - any framework version, using Web Deploy...

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Deploy Web Forms to Azure Function? For what? – Cindy Pau Nov 19 '19 at 05:47
  • I not sure what you want to do, but if you just want to deploy, you can use ftp to deploy the Web Form websites: https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp – Cindy Pau Nov 19 '19 at 05:56
  • @BowmanZhu I developed a simple _web chat_ app – UnhandledException-InvalidChar Nov 19 '19 at 05:56
  • You do know that Azure Functions don't have a UI, right? – jmcilhinney Nov 19 '19 at 05:57
  • @UnhandledException-InvalidChar What does Azure Function do in your program? Maybe you just want to deploy to Azure web app? – Cindy Pau Nov 19 '19 at 06:00
  • @BowmanZhu Yes, it works as a web app, but I want to use the benefits of Az. Functions. – UnhandledException-InvalidChar Nov 19 '19 at 06:08
  • @UnhandledException-InvalidChar Can you describe it in detail? Which kind of Azure Function you need to use? And what are the 'benefits' you mean? – Cindy Pau Nov 19 '19 at 06:09
  • @jmcilhinney I know they're serverless. As I imagine, when a function is triggered, it's instance runs in memory so it could behave as a Web App, but this is probably not the case, is it? – UnhandledException-InvalidChar Nov 19 '19 at 06:13
  • If you want Azure Functions then you don't want Web Forms and vice versa. They are incompatible. You might have a Web Forms application invoke a Function, but they are two independent apps. Azure Functions is like basic web services. If you do need a UI that users can load into a browser then you need a web site. Whether or not you might gain from breaking part of your functionality out to an Azure Function would depend on that specific functionality. – jmcilhinney Nov 19 '19 at 06:16
  • @UnhandledException-InvalidChar Even you 'deploy' to Azure Function, your website will be not showen on the azure website. This is what I am confused about your question. – Cindy Pau Nov 19 '19 at 06:19
  • @BowmanZhu I was hoping that I can then map a custom domain name – UnhandledException-InvalidChar Nov 19 '19 at 06:25
  • @UnhandledException-InvalidChar Have a look of this: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain You can think of Azure Function as a simple function that will trigger by the condition and then run the code in it to get the result. – Cindy Pau Nov 19 '19 at 06:33
  • @UnhandledException-InvalidChar Any other doubts? – Cindy Pau Nov 19 '19 at 06:42
  • @BowmanZhu Thanks, but I bumped into that article a dozen times before and I'm not paying 10€/month only to map my domain – UnhandledException-InvalidChar Nov 19 '19 at 06:45
  • @UnhandledException-InvalidChar But buy domain need you spend money. If you want to avoid spending 10 Euros per month, you can choose to use the default url. – Cindy Pau Nov 19 '19 at 07:04
  • @UnhandledException-InvalidChar If you have more questions, please modify your question and give a detailed description. For your current question, the answer is that it can be deployed, but the webpage will not be displayed after deployment. – Cindy Pau Nov 19 '19 at 07:20
  • I can get some domain names for as low as 3$/year Can you spot the difference: 3 : 120 …? – UnhandledException-InvalidChar Nov 19 '19 at 07:21
  • @UnhandledException-InvalidChar StackOverflow discourages asking questions in the comments of the question. This is a different question... Please start a new one. – Cindy Pau Nov 19 '19 at 07:34
  • @UnhandledException-InvalidChar Have more questions about this issue? If my answer help you learn about the differences, can you mark it as the answer of this question? – Cindy Pau Nov 19 '19 at 07:54

1 Answers1

0

Here are some important concepts you should know about Azure Web App and Azure Function:

Azure Web App:

Azure Web App is a sand box. The only way an Azure web app can be accessed via the internet is through the only two already-exposed HTTP (80) and HTTPS (443) TCP ports. For Nodejs App deployed to Azure, Azure will create a named pipe for your server to listen, and pass the request from 443 port(as you use https) to the named pipe.

Azure Function:

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. You can write just the code you need for the problem at hand, without worrying about a whole application or the infrastructure to run it. Functions can make development even more productive, and you can use your development language of choice, such as C#, F#, Node.js, Python or PHP. Pay only for the time your code runs and trust Azure to scale as needed. Azure Functions lets you develop serverless applications on Microsoft Azure.

Api apps and Web apps are pretty much the same deal. Logic Apps and Functions are the same in a sense that they allow you to do something as a response to event or on a schedule, but Functions are a way to run code (or existing app) and Logic Apps are more like a workflow constructor, where you take existing actions and chain them (so no coding, or almost no)

Deploy:

Use ftp to deploy your web form to Azure Function. There will be no problems with the deployment, but the webpage will not display.

Note:

Although Azure Function and Azure Web App are very similar in many cases. But if you choose to deploy web form app, you will still find differences. Even if you can deploy your project to Azure Web App, it won’t display any webpages.

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27