Base solution for your next web application

Activities of "KarakTheWise"

Greetings,

I know we've been trying to take care of this via email but as my emails are not getting through, I thought I post here. I really need help with this. I can send TeamViewer login data. I just need some direction as to where since, as I said, my emails are not getting through.

Access to XMLHttpRequest at 'http://karakthemad//AbpUserConfiguration/GetAll?d=1640727457038' from origin 'http://karakthemad:4500' has been blocked by CORS policy: Request header field abp.tenantid is not allowed by Access-Control-Allow-Headers in preflight response.

I've tried various Access-Control settings This is my current setup and still does not work: And I would prefer to not have a wild card for the origin.

&lt;customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> &lt;add name="Access-Control-Allow-Headers" value="Origin, Content-Type,  X-Auth-Token" /> &lt;add name="Access-Control-Allow-Methods" value="HEAD, GET, POST, PUT, DELETE, PATCH, OPTIONS" /> &lt;/customHeaders>

From appsettings.production.json: "App": { "ServerRootAddress": "http://KarakTheMad:80/", "ClientRootAddress": "http://KarakTheMad:4500/", "CorsOrigins": "http://KarakTheMad/" }

I tried removing port 80 in the CorsOrigin as suggested in an older post. No luck.

The .NET Core app and the Angular app are in two separate projects and thus two separate IIS sites.

What do you need me to get setup for you when you do the TeamViewer session so I can have folders open etc. so you don't have to hunt around for them.

Thanks once again!

Thank you so much!

Greetings,

I know this is a lot to ask in the above post. If I could at least get a little direction on the appconfig.production.json settings, that would be really helpful. Also, for some reason I cannot edit the appconfig.production.json once it's in the wwwroot/. Should I make virtual directory and have the actual path just somewhere on the drive and not in the wwwroot?

Thanks again!

Question

API Version 9.2.0 .NET Core / Angular

Greetings,

I apologize for this long post in advance!  I have several question related to an IIS deployment as well as Azure. I have three principal customers that are going to be using my application before it goes to market. The first two are on-prem IIS and the third will be on Azure, which will be a great help to me since I plan to deploy the final product to Azure. This will be a good test run.

IIS: I've tried to follow the steps in the 'Step By Step Publish To IIS' documentation and I was able to follow most of it. Here's where I'm struggling:

1.) "Change appsettings.production.json to configurations with your own settings" I know every set up is different but I no idea what to look for and what this would be. 2.) On the Angular side: "Change the assets/appconfig.production.json file with your one configuration". Again, not sure how to approach this. 3.) The note about getting a 404 and using the ASP.NET Zero Angular UI web.config file. A little guidance on this would be so helpful.

The second part I need some direction for the on-prem setups.

1.) How do I setup their iteration of ASP-NET Zero to be single tenant? I've written the application with multi-tenant in mind and I don't want to confuse them with the go to use it. 2.) What do files do I actual send to the IIS on-prem installations? 3.) During my development, I've never dealt with the email portion of the ASP-NET Zero. So things like emailing a new user and email activation notice once created is something I've never been able to get to work. I don't know where to enter the email server information etc. I may be way off base here and just need guidance. Basically, I need to know how to guide my admin users on how to set up their users and so on. 4.) Passwords: I've never found out how to change this and will definitely need to be doing that for deployment. I guess I'm just needing some specific direction on some this or where to find because I haven't had any success finding it in the documentation. 5.) Database setup on-prem. What is the best way to deploy this? Do I use Visual Studio's PMC to run my migrations? Or is there a better solution?

Lastly, for the Azure deployment: I know this is huge subject. I've read quite a few support forum posts here on this. The biggest questions I have at this time are: 1.) What do they need to set up in Azure? I found this post https://support.aspnetzero.com/QA/Questions/9188/If-you%27re-hosting-on-Azure---can-you-share-what-it-costs-per-month that I'm using a guideline for recommending what the client may need. They are large facility. Is this a good place to start? Any guidance would so appreciated. 2.) The question of security on Azure has been brought up. How secure is ASP-NET Zero running on Azure? And are some things we need to set up a specific way on Azure to make sure it's as secure as possible? 3.) Deployment to Azure. I have the ASP-NET Zero documentation here: https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Deployment-Angular-Publish-Azure and I'm hoping by understanding some of the settings for IIS will help in the Azure deployment.

Again, I'm sorry for the long post. I've been compiling my questions for several weeks and though I'd get this started. Thank you again for all your help!

Excellent! So glad it helpled.

Well, what solved it for me was adding this line to my scripts in package.json:

"build-serve": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve",

To run the project I use npm run build-serve

I also was advised to by ASP-Zero support to remove 'gulp buildDev' from the start script:

"<span class="colour" style="color: rgb(34, 34, 34);">Then, just run "</span>npm run create-dynamic-bundles<span class="colour" style="color: rgb(34, 34, 34);">" once... You only need to run "</span>npm run create-dynamic-bundles<span class="colour" style="color: rgb(34, 34, 34);">" if you make any changes in the files which is used in bundles.json."</span>

<span class="colour" style="color: rgb(34, 34, 34);">That alone did not solve problem since the root of the problem was this error:</span>

<span class="colour" style="color: rgb(34, 34, 34);">FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory</span>

Thus the need add the 'build-serve' section to the scripts.

<span class="colour" style="color: rgb(34, 34, 34);">Here's my current scripts section from package.json:</span>

"scripts": { "ng": "ng", "publish": "gulp build && ng build --prod", "start": "ng serve --host 0.0.0.0 --port 4200", "hmr": "gulp buildDev && ng serve --host 0.0.0.0 --port 4200 --hmr", "test": "gulp buildDev && ng test", "pree2e": "webdriver-manager update --standalone false --gecko false", "e2e": "gulp buildDev && protractor", "create-dynamic-bundles": "gulp buildDev", "build-serve": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve", "nswag": "cd nswag/ && refresh.bat" },

I hope that helps your issue!

Excellent! Thank you. I'll take a look at it now.

Thank you! It has been sent.

I've been getting this for several weeks on first compile of the day. It usually compiles after closing WebStorm and recompiling. No luck today. I increased my JavaScript memory to 8 GB, at least as far as I can tell? I'm not sure if this is only issue though. Please advise as I'm unable to run my project at all at this point. I have 48 GB of RAM on my machine, so I know that can't be the issue. It always crasches at 93% as shown below.

Here are my heap stats: I'm currently using Node.js v12.18.3

v8.getHeapStatistics() { total_heap_size: 5222400, total_heap_size_executable: 573440, total_physical_size: 5222400, total_available_size: 8637309544, used_heap_size: 3011792, heap_size_limit: 8640266240, malloced_memory: 65600, peak_malloced_memory: 1053672, does_zap_garbage: 0, number_of_native_contexts: 1, number_of_detached_contexts: 0 }

Not sure exactly how to proceed.

93% after chunk asset optimization SourceMapDevToolPlugin vendor.js generate SourceMap <--- Last few GCs --->

[19860:000001C5262FB520]    95014 ms: Mark-sweep 2038.8 (2053.9) -> 2037.0 (2053.9) MB, 457.5 / 0.0 ms  (average mu = 0.105, current mu = 0.016) allocation failure scavenge might not succeed [19860:000001C5262FB520]    95668 ms: Mark-sweep 2038.9 (2053.9) -> 2036.9 (2057.9) MB, 645.4 / 0.1 ms  (average mu = 0.063, current mu = 0.013) allocation failure scavenge might not succeed

<br> <--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 00007FF66CEFB3BD] Security context: 0x0356158808d1 &lt;JSObject> 1: keys [00000356158815B1](this=0x035615880969 &lt;JSFunction Object (sfi = 000003917984A381)&gt;,0x0001c3b07991 &lt;Object map = 000002552A180439&gt;) 2: SourceNode_walkSourceContents [000002E73AEEB461] [D:\App Development\Resolution\ASPNET-Zero\Resolution\angular\node_modules\source-map\lib\source-node.js:~301] [pc=00000003F63BDD42](this=0x02f6219928b9 <Sour...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF66C2E5EBF napi_wrap+114095 2: 00007FF66C290B46 v8::base::CPU::has_sse+66998 3: 00007FF66C291946 v8::base::CPU::has_sse+70582 4: 00007FF66CAA6E4E v8::Isolate::ReportExternalAllocationLimitReached+94 5: 00007FF66CA8EF21 v8::SharedArrayBuffer::Externalize+833 6: 00007FF66C95B18C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436 7: 00007FF66C9663C0 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312 8: 00007FF66C962EE4 v8::internal::Heap::PageFlagsAreConsistent+3204 9: 00007FF66C9586E3 v8::internal::Heap::CollectGarbage+1283 10: 00007FF66C956D54 v8::internal::Heap::AddRetainedMap+2452 11: 00007FF66C97809D v8::internal::Factory::NewFillerObject+61 12: 00007FF66C6DE1E1 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1665 13: 00007FF66CEFB3BD v8::internal::SetupIsolateDelegate::SetupHeap+546637 14: 00007FF66CECA747 v8::internal::SetupIsolateDelegate::SetupHeap+346839 15: 00000003F63BDD42 npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR! [email protected] start: `gulp buildDev && ng serve --host 0.0.0.0 --port 4200` npm ERR! Exit status 134 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR!     C:\...AppData\Roaming\npm-cache\_logs\2021-09-13T20_04_01_432Z-debug.log

Thank you! I've looked into that library and may try it out. Thanks for all the help!

Showing 21 to 30 of 56 entries