Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling Azure Function from Static Web App #445

Closed
mizrael opened this issue May 26, 2021 · 4 comments
Closed

calling Azure Function from Static Web App #445

mizrael opened this issue May 26, 2021 · 4 comments

Comments

@mizrael
Copy link

mizrael commented May 26, 2021

hi All,
I've created a Blazor Wasm project and I've deployed it as Static Web App. The Azure Portal automatically created the GitHub workflow for me, and everything worked fine.

Now I'm trying to add a Function App. I've created a .NET 5 isolated app and updated the deployment configuration to point to the right folder. I can see the Function showing up in the "Functions" blade. So far so good.

Now my question: is there a way to run/debug the whole system on localhost and call the Functions from the Blazor client? I've seen some documentation but it's using Nodejs for the backend.

@anthonychu
Copy link
Member

.NET 5 isolated function apps are not supported at this time if you use the function app that is built into Static Web Apps. Can you confirm that it is indeed a .NET 5 app?

As for local debugging, you would following the same steps as indicated here. Instead of npm run build, run dotnet publish and pass the CLI the generated wwwroot folder.

@mizrael
Copy link
Author

mizrael commented May 26, 2021

yes, my bad. I initially deployed a .NET 3.1 version, which worked fine. Then updated it to 5 locally and "forgot" to push the changes. Too much excitement, things were going too well :D

I'll try the debugging instruction as suggested and keep you posted. Thanks!

@anthonychu
Copy link
Member

We're investigating supporting newer .NET versions. Tracking that here: #375 . No ETA but we're hoping to have this ability before .NET 6 is GA.

@thomasgauvin
Copy link
Contributor

thomasgauvin commented Apr 4, 2023

Closing this issue, SWA currently supports .NET Core 3.1, .NET 6.0 in-process, .NET 6.0 isolated, .NET 7.0 isolated, refer to this table to all runtimes for APIs https://learn.microsoft.com/en-us/azure/static-web-apps/languages-runtimes#api

Feel free to reopen as needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants