0034 - ASP NET MVC Core routing in Service Fabric

  Рет қаралды 641

clouddeveloper.io

clouddeveloper.io

Күн бұрын

Пікірлер: 7
@itwolves
@itwolves 7 жыл бұрын
Great tutorial how to make ASP.NET Core MVC routing working in Service Fabric. Even better would be if this would be already part of the VS 2017 Service Fabric project template.
@clouddeveloperio
@clouddeveloperio 7 жыл бұрын
Thanks for watching and glad it helped you. I think the main reason why they don't include it in the project template is because not everyone might want to use the Application Gateway feature of Service Fabric and this issue is really only showing up when you try to host non-server based code such as javascript, css, images, etc... When you try to access web api type of resources through the Application gateway then everything works. I actually think that it would better if the Service Fabric team enhances their Application Gateway implementation to support better content rewriting and then this would not be needed. I have already made a recommendation to them about it so let see how it goes.
@clouddeveloperio
@clouddeveloperio 7 жыл бұрын
Michal, I noticed you posted another comment but for some odd reason it is not showing up and I wanted to answer your question. I think the reason for the routing issue that you are seeing is due to an enhanced version of the code that I didn't get a chance to record specifically in the Startup.cs file in the SFContacts.UI project that I have. It deals with adding some header forwarding code that helps when requests are sent through a reverse proxy type of middleware that the Application Gateway is. I have uploaded the code into my github repository for this channel that you can find here: github.com/clouddeveloperio/SFContacts Look specifically at the Startup.cs file inside of the Configure method. You will notice that I am building a variable called forwardedHeaderOptions and later using it in the method to tell the Application Gateway to forward the headers to the target server. Hopefully that addresses you issue and you can get the application working.
@itwolves
@itwolves 7 жыл бұрын
Thank you for point this. I didn't realize this. I deleted my comment, because I thought routing problem was due to your global route config change. That wasn't the case. My problem was, that generated AccountController has RouteAttribute defined on class level, that was overriding your global route. Removal of RouteAttribute fixed my problem.
@letsworksimple
@letsworksimple 2 жыл бұрын
Does the mapped route "ApplicationGatewayDefault" get used because it's just a route or does it have a specific name that Service Fabric recognise and then use?
0033 - Hosting your ASP.NET MVC Core application in Service Fabric
17:02
clouddeveloper.io
Рет қаралды 2,5 М.
Clean Architecture with ASP.NET Core 9
27:01
dotnet
Рет қаралды 40 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
0040 - Upgrading your standalone Service Fabric cluster tutorial
12:23
clouddeveloper.io
Рет қаралды 1,5 М.
0044 - JMeter - Recording your tests tutorial
16:27
clouddeveloper.io
Рет қаралды 965
Which Agentic AI Framework to Pick? LangGraph vs. CrewAI vs. AutoGen
24:16
Remotely Control Any PC with this FREE Software!
15:05
Loi Liang Yang
Рет қаралды 22 М.
.NET Project Setup From Scratch Using These 6 Best Practices
16:07
Milan Jovanović
Рет қаралды 20 М.
What's New for ASP.NET Core & Blazor in .NET 9
40:26
dotnet
Рет қаралды 32 М.
Azure Key Vault with App Configuration introduction tutorial - 0055
23:27
clouddeveloper.io
Рет қаралды 11 М.
The Right Way To Use Feature Flags in .NET (targeting users explained)
17:44
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН