I allow a few types of unauthenticated requests to some methods in an appservice on the application layer. I would like capture the requesting IP address. Is there any way to do that? Do I have access to the context?
I have your latest (7.0) single solution and I get a page not found error when I start the project: No webpage was found for the web address: http://localhost:22742/.
I have restored the database and everything seems to work fine when I use separate solutions. The startup project is set to Web.Host and I get no build errors. Did I miss a step somewhere? I found this https://support.aspnetzero.com/QA/Questions/6432 but it doesn't help. The only thing I have modified is MultitenancyEnabled. Any suggestions?
Hello,
I am trying to wrap my head around what would be involved adding a fast loading home page using your public site to an existing Azure setup. Currently I have two app services on Azure:
mydomainAPI.azurewebsites.net (.Net core 6.5) mydomainUi.azurewebsites.net (Angular 6.5)
I have a text domain pointer on godaddy for mydomain.com pointing @ to mydomainUi.azurewebsites.net
I have a public module in Angular that has a few components to handle public pages and has redirects in place to go to app/main when authentication is required. Everything works fine except the huge overhead of loading Agular on the home page (8+ seconds) . It is pretty bad locally too so it is not an Azure issue. Your public site loads very fast (.8s). I have published it to
mydomainPublic.azurewebsites.net
What do I need to do to have the public site handle the home page only and all other requests go to Angular? The urls in the browser still should just show mydomain.com and not the Azure app service domains.
What dns records do I need on godaddy?
I am assuming the appsettings.production.json for public site will look something like this:
"App": { "WebSiteRootAddress": "https://mydomain.com/", "AdminWebSiteRootAddress": "https://mydomainUI.azurewebsites.net" }
How will the appsettings.production.json look like for the Core and Angular project including CorsOrigins?
"App": { "WebSiteRootAddress": "", "ClientRootAddress": "", "CorsOrigins": "" },
Are there any additional steps required?
Thank you for your help
My azure pipeline fails at the ng build --prod step. This does not happen locally. I am on version 6.5. I have the same version of yarn locally.
Output of step:
##[section]Starting: Command Line Script
==============================================================================
Task : Command Line
Description : Run a command line script using cmd.exe on Windows and bash on macOS and Linux.
Version : 2.148.0
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
==============================================================================
Generating script.
Script contents:
d:\a\1\s\node_modules\.bin\ng.cmd build --prod
========================== Starting Command Output ===========================
##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "d:\a\_temp\25f9c426-3bbc-41dd-92ee-0fc57fb89c88.cmd""
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7A9AEF04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114
2: 00007FF7A9ACA0C6 node::MakeCallback+4518
3: 00007FF7A9ACAA30 node_module_register+2032
4: 00007FF7A9D520EE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7A9D5201F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7AA272BC4 v8::internal::Heap::MaxHeapGrowingFactor+9556
7: 00007FF7AA269C46 v8::internal::ScavengeJob::operator=+24310
8: 00007FF7AA26829C v8::internal::ScavengeJob::operator=+17740
9: 00007FF7AA267765 v8::internal::ScavengeJob::operator=+14869
10: 00007FF7AA271064 v8::internal::Heap::MaxHeapGrowingFactor+2548
11: 00007FF7A9E321C0 v8::internal::Factory::NewByteArray+112
12: 00007FF7AA4968AC v8::internal::compiler::MachineOperatorReducer::ReduceFloat64RoundDown+7564
13: 00007FF7AA18C920 v8::internal::compiler::Pipeline::AllocateRegistersForTesting+4608
14: 00007FF7AA184CCB v8::internal::compiler::ValueNumberingReducer::operator=+10123
15: 00007FF7AA252ACA v8::internal::Zone::NewExpand+1978
16: 00007FF7AA2550E4 v8::internal::Zone::NewExpand+11732
17: 00007FF7AA2BD589 v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions+393
18: 00007FF7AA099633 v8::internal::StackGuard::HandleInterrupts+531
19: 00007FF7A9EC26E7 v8::internal::WasmJs::Install+27911
20: 00000348008DC5C1
##[error]Cmd.exe exited with code '134'.
##[section]Finishing: Command Line Script
YML script:
pool:
name: Hosted VS2017
demands: npm
steps:
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
displayName: 'Use Yarn 1.x'
inputs:
checkLatest: true
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: 'Yarn install'
inputs:
Arguments: install
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: 'Yarn: yarn upgrade caniuse-lite browserslist'
inputs:
Arguments: 'upgrade caniuse-lite browserslist'
- task: Npm@0
displayName: 'npm install'
inputs:
arguments: '-g @angular/cli'
- script: '$(Build.SourcesDirectory)\node_modules\.bin\ng.cmd build --prod'
displayName: 'Command Line Script'
- task: CopyFiles@2
displayName: 'Copy Files to: $(System.DefaultWorkingDirectory)/dist/assets'
inputs:
Contents: appconfig.json
TargetFolder: '$(System.DefaultWorkingDirectory)/dist/assets'
- task: Npm@1
displayName: 'npm custom'
inputs:
command: custom
verbose: false
customCommand: 'build-prod'
Output yarn:
##[section]Starting: Yarn install
==============================================================================
Task : Yarn task
Description : Executes Yarn
Version : 2.8.1001
Author : Geek Learning
Help : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 2.8.1001).
Dear Angular and Ember CLI users, please check our [known issues](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Known-Issues)
==============================================================================
SYSTEMVSSCONNECTION exists true
SYSTEMVSSCONNECTION exists true
[command]C:\windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\yarn\1.16.0\x64\yarn-v1.16.0\bin\yarn.cmd install"
yarn install v1.16.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @swimlane/[email protected]" has unmet peer dependency "d3@^4.10.2".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-array@^1.2.1".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-brush@^1.0.4".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-color@^1.0.3".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-force@^1.1.0".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-format@^1.2.0".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-hierarchy@^1.1.5".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-interpolate@^1.1.5".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-scale@^1.0.6".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-selection@^1.1.0".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-shape@^1.2.0".
warning " > @swimlane/[email protected]" has unmet peer dependency "d3-time-format@^2.1.0".
warning " > [email protected]" has incorrect peer dependency "@angular/core@^7.1.4".
warning " > [email protected]" has incorrect peer dependency "@angular/common@^7.1.4".
[4/4] Building fresh packages...
Done in 131.50s.
##[section]Finishing: Yarn install
I have upgraded my project from 5.3 to 6.5. Last year after some struggle I was able to create an Azure pipeline for the Angular project that still functions with the 5.3 version. I have duplicated the pipeline but it fails at the command line step below. Also, would it be a tall order to post a yml script somewhere for the whole deployment? I could only find bits and pieces of the information
steps:
script: | $(Build.SourcesDirectory)\node_modules.bin\ng.cmd build -prod
displayName: 'Command Line Script'
Output from sucessful run on 5.3
Generating script.
Script contents:
D:\a\1\s\node_modules\.bin\ng.cmd build -prod
========================== Starting Command Output ===========================
##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\2c8ff0ae-ed20-48dd-b653-9fdbd14795d8.cmd""
Failed run on 6.5
Generating script.
Script contents:
d:\a\1\s\node_modules\.bin\ng.cmd build -prod
========================== Starting Command Output ===========================
##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "d:\a\_temp\ef0297eb-5672-464f-abae-f24f5fcf1608.cmd""
Unknown option: '-d'
##[error]Cmd.exe exited with code '1'.
##[section]Finishing: Command Line Script
I have a few public pages that need Angular functionality and no authentication. I have created a public module and added the routes to the root-routing module. The pages work fine until I log in. After I log in if I enter any of the public routes the page shows up for a second then I get redirected to notifications. I tried to do a redirect from ngOnInit on one of the pages but it does not work. Is there any way to disable the automatic redirect to notifications on certain routes? Here is the relevant portion of my root-routing.module.ts: I am on version 6.5
const routes: Routes = [
{ path: '', component: HomeComponent, data: {} },
{ path: 'faqs', component: PublicFaqsComponent, data: {} },
{ path: 'contact-us', component: ContactUsComponent, data: {} },
{ path: 'polls', component: PublicPollsComponent, data: {} },
{
path: 'account',
loadChildren: 'account/account.module#AccountModule', //Lazy load account module
data: { preload: true }
}
];