amazon-web-services


Best way to handle path segment in ASPNET CORE MVC


I am creating an AWS ECS stack to deploy an ASPNet Core application, and the sample application you get works as expected if the application load balancer (ALB) is the root path:
/
But, I would like to deploy several applications using path parameters:
/aspnetapp
/somotherapp
In my ALB, I set the path parameter as follows:
But, when I set the path, the application fails with 503. To compensate, I have re-coded the Startup as follows:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.Map("/aspnetapp", HandleMapTest);
}
private static void HandleMapTest(IApplicationBuilder app)
{
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
}
This captures the path segment, but now scripts, images, and CSS styles fail to load.
What is the best way to configure the ASP Net Core app to run with a path parameter defined so everything is routed to /aspnetapp?

Related Links

Boto3 error: The AWS Access Key Id you provided does not exist in our records
Want to pass header value of a WebRequest to SQS (either as token value or in attribute) from API Gateway
Changing domain DNS from godaddy to amazon Route 53 not working
CodePipeline unable to locate SAM template yaml file
Does the SES email quota apply to verification mail by Amazon Cognito?
AWS Sending Notifications to a Lambda function in other account
AWS Lambda and Multipart Upload to/from S3
Using AWS Simple Directory for on-premise clients
Data Modeling with Amazon Cognito and DynamoDB
How to test API Gateway methods with custom authorizer and empty $context.authorizer.* variables?
AWS error while parsing .config YAML file in .ebextension
Does WireMock come out in deb file?
Why sudden spike in WriteIOPS on AWS RDS
AWS SES Suppression List
Common security group for vpc
Specifying delete stack order in cloudformation

Categories

HOME
spring-data
user-interface
svn
weblogic12c
cucumber
angular-ui-grid
eclipse-plugin
yahoo-weather-api
opencv-python
kendo-dropdown
activex
braintree
apk
websocket
tabs
malware
openflow
tibco
clone
google-search-console
fedora
javafx-8
game-maker
spring-amqp
jquery-select2-4
google-tasks-api
fosuserbundle
checkout
varnish-vcl
scheduled-tasks
parceler
liferay-6.2
uislider
qa
mod-wsgi
web-push
ipa
basex
django-import-export
boolean-logic
wampsharp
kendo-listview
serversocket
devtools
winrm
cmis
cups
djcelery
aurelia-http-client
gitolite
grunt-contrib-watch
flipkart
zend-form
autorelease
swift2.3
deployd
karabiner
gtk#
stateless-session-bean
clrs
google-shopping-api
ndk-build
decoder
nvda
timestamping
textblock
flipclock
okta-api
management-studio-express
android-expansion-files
stack-smash
nette
mixins
netdatacontractserializer
unidata
flow-js
subview
iodocs
xml-signature
libgcc
csslint
webaii
usb-flash-drive
windows-taskbar
assetic
proxy-server
xsd2code
mp4parser
disjoint-union
2d-vector
live-wallpaper
viewpagerindicator
algol68
memory-pool
zend-server-ce
django-apps
azure-acs
django-pagination
fxruby
rtti
tso
parentid

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App