reply sent via email.
This issue has been resolved by the creator.
ANZ 8.1.0 angular/.net core
Occasionally my ANZ app works when Published.
I make a small change, and then I get the following message from the client site in the Chrome debug console:
Access to XMLHttpRequest at 'https://myapp-server.azurewebsites.net//AbpUserConfiguration/GetAll?d=1616355221806' from origin 'https://myapp-client.azurewebsites.net' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
The server app is able to display swagger login page. The error persists even after rolling back the change. What might be causing this? How can I diagnose the cause?
ANZ 8.1.0 angular/.NET core
An unhandled exception occurred while processing the request.
Win32Exception: The system cannot find the file specified.
Unknown location
SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, uint waitForMultipleObjectsTimeout, bool allowCreate, bool onlyOneCheckConnection, DbConnectionOptions userOptions, out DbConnectionInternal connection)
...appears in the browser. How can I diagnose this? How can I know the connection string that is invalid?
ANZ version 8.1.0 angular/.net core
When attempting to register a new user, the following error occurs with Release builds. Debug builds to not report the error. Error from "Logs.txt":
ERROR 2021-03-21 10:11:42,888 [9 ] Mvc.ExceptionHandling.AbpExceptionFilter - An attempt was made to access a socket in a way forbidden by its access permissions. 127.0.0.1:25
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. 127.0.0.1:25
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at MailKit.Net.SocketUtils.ConnectAsync(String host, Int32 port, IPEndPoint localEndPoint, Boolean doAsync, CancellationToken cancellationToken)
at MailKit.Net.SocketUtils.ConnectAsync(String host, Int32 port, IPEndPoint localEndPoint, Int32 timeout, Boolean doAsync, CancellationToken cancellationToken)
at MailKit.MailService.ConnectSocket(String host, Int32 port, Boolean doAsync, CancellationToken cancellationToken)
at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, Boolean doAsync, CancellationToken cancellationToken)
at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)
at Abp.MailKit.DefaultMailKitSmtpBuilder.ConfigureClient(SmtpClient client)
at ngTTM.Net.Emailing.ngTTMMailKitSmtpBuilder.ConfigureClient(SmtpClient client) in C:\Users\Tim\Documents\__ngTTMv810\ngTTM\aspnet-core\src\ngTTM.Core\Net\Emailing\ngTTMMailKitSmtpBuilder.cs:line 20
at Abp.MailKit.DefaultMailKitSmtpBuilder.Build()
at Abp.MailKit.MailKitEmailSender.BuildSmtpClient()
at Abp.MailKit.MailKitEmailSender.SendEmailAsync(MailMessage mail)
at Abp.Net.Mail.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize)
at ngTTM.Authorization.Users.UserEmailer.ReplaceBodyAndSend(String emailAddress, String subject, StringBuilder emailTemplate, StringBuilder mailMessage) in C:\Users\Tim\Documents\__ngTTMv810\ngTTM\aspnet-core\src\ngTTM.Core\Authorization\Users\UserEmailer.cs:line 360
at ngTTM.Authorization.Users.UserEmailer.SendEmailActivationLinkAsync(User user, String link, String plainPassword) in C:\Users\Tim\Documents\__ngTTMv810\ngTTM\aspnet-core\src\ngTTM.Core\Authorization\Users\UserEmailer.cs:line 124
at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func`1 postAction, Action`1 finalAction)
at ngTTM.Authorization.Users.UserRegistrationManager.RegisterAsync(String name, String surname, String emailAddress, String userName, String plainPassword, String webPageUrl, Boolean tosAcceptance, Boolean isInvitee, Boolean isVerified, Boolean isEmailConfirmed, String emailActivationLink) in C:\Users\Tim\Documents\__ngTTMv810\ngTTM\aspnet-core\src\ngTTM.Core\Authorization\Users\UserRegistrationManager.cs:line 110
at ngTTM.Authorization.Accounts.AccountAppService.Register(RegisterInput input) in C:\Users\Tim\Documents\__ngTTMv810\ngTTM\aspnet-core\src\ngTTM.Application\Authorization\Accounts\AccountAppService.cs:line 302
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
question withdrawn - OK to delete
Your suggestion worked. Thank you.
ANZ version 8.1.0 Angular/.net core
Following instructions here: https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Deployment-Angular-Publish-Azure Apply Migrations section.
The following error occurs when attempting 'update-database'. Please advise on how to proceed. Thank you.
Package Manager Console:
Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.
Package Manager Console Host Version 5.9.0.7134
Type 'get-help NuGet' to see all available NuGet commands.
PM> update-database
Build started...
Build succeeded.
RequestId:28362d0d-501a-0068-27a9-1b74df000000
Time:2021-03-18T03:51:27.6418034Z
An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: The resource doesn't support specified Http Verb.
RequestId:28362d0d-501a-0068-27a9-1b74df000000
Time:2021-03-18T03:51:27.6418034Z
Status: 405 (The resource doesn't support specified Http Verb.)
ErrorCode: UnsupportedHttpVerb
Headers:
Server: Windows-Azure-File/1.0,Microsoft-HTTPAPI/2.0
x-ms-request-id: 28362d0d-501a-0068-27a9-1b74df000000
x-ms-client-request-id: 64972fb1-e660-4a27-8059-175e9ddc04ee
x-ms-version: 2020-04-08
x-ms-error-code: UnsupportedHttpVerb
Date: Thu, 18 Mar 2021 03:51:27 GMT
Allow: REDACTED
Content-Length: 237
Content-Type: application/xml
System.ArgumentException: Keyword not supported: 'perpendere-dev-dbserver.database.windows.net; database'.
at Microsoft.Data.Common.DbConnectionOptions.ParseInternal(Dictionary`2 parsetable, String connectionString, Boolean buildChain, Dictionary`2 synonyms, Boolean firstKey)
at Microsoft.Data.Common.DbConnectionOptions..ctor(String connectionString, Dictionary`2 synonyms)
at Microsoft.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
at Microsoft.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at Microsoft.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
at Microsoft.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at Microsoft.Data.SqlClient.SqlConnection..ctor(String connectionString)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerConnection.CreateDbConnection()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection()
at Microsoft.EntityFrameworkCore.Diagnostics.RelationalLoggerExtensions.MigrateUsingConnection(IDiagnosticsLogger`1 diagnostics, IMigrator migrator, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_0.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Keyword not supported: 'perpendere-dev-dbserver.database.windows.net; database'.
PM>
for security reasons 'appsettings.json' sent by email.
package.json
{
"name": "abp-zero-template",
"version": "8.1.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"publish": "gulp build && ng build --prod",
"start": "gulp buildDev && 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"
},
"private": false,
"dependencies": {
"@angular/animations": "^8.2.5",
"@angular/cdk": "^8.1.4",
"@angular/common": "^8.2.5",
"@angular/compiler": "^8.2.5",
"@angular/core": "^8.2.5",
"@angular/forms": "^8.2.5",
"@angular/http": "^7.2.15",
"@angular/platform-browser": "^8.2.5",
"@angular/platform-browser-dynamic": "^8.2.5",
"@angular/platform-server": "^8.2.5",
"@angular/router": "^8.2.5",
"@aspnet/signalr": "^1.1.4",
"@fortawesome/fontawesome-pro": "^5.15.1",
"@ng-bootstrap/ng-bootstrap": "^5.1.4",
"@nth-cloud/ng-toggle": "^3.0.3",
"@swimlane/ngx-charts": "^12.0.1",
"@types/bootstrap": "^4.3.1",
"@types/dwt": "^15.2.3",
"@types/moment": "^2.13.0",
"abp-ng2-module": "^5.0.0",
"abp-web-resources": "^4.1.0",
"adal-angular": "^1.0.17",
"angular-gridster2": "^8.2.0",
"angular-oauth2-oidc": "^8.0.4",
"angular-resizable-element": "3.2.2",
"angular-resize-event": "^1.1.1",
"angular2-counto": "^1.2.5",
"angular2-text-mask": "^9.0.0",
"animate.css": "^3.7.2",
"body-scroll-lock": "^3.0.2",
"cookieconsent": "^3.1.1",
"core-js": "^3.3.3",
"dwt": "15.3",
"famfamfam-flags": "^1.0.0",
"file-saver": "^2.0.2",
"js-cookie": "^2.2.1",
"just-compare": "^1.3.0",
"localforage": "^1.7.3",
"lodash": "^4.17.13",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"ng-number-picker": "^1.1.9",
"ng-recaptcha": "^5.0.0",
"ng2-file-upload": "^1.4.0",
"ngx-bootstrap": "^5.2.0",
"ngx-drag-drop": "^2.0.0",
"ngx-filesaver": "^8.1.0",
"ngx-image-cropper": "^1.5.1",
"ngx-perfect-scrollbar": "^8.0.0",
"ngx-spinner": "^8.0.3",
"object-path": "^0.11.4",
"primeflex": "^1.0.0",
"primeicons": "^2.0.0",
"primeng": "7.0.5",
"push.js": "^1.0.12",
"quill": "^1.3.7",
"rtl-detect": "^1.0.2",
"rxjs": "^6.5.3",
"simple-line-icons": "^2.4.1",
"spin.js": "^4.1.0",
"sweetalert2": "^8.18.6",
"text-mask-addons": "^3.8.0",
"typescript": "3.4.5",
"typescript-string-operations": "^1.3.1",
"webdriver-manager": "^12.1.7",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.3",
"@angular/cli": "^8.3.3",
"@angular/compiler-cli": "^8.2.5",
"@angularclass/hmr": "^2.1.3",
"@angularclass/hmr-loader": "^3.0.4",
"@types/jasmine": "~3.4.0",
"@types/jasminewd2": "^2.0.8",
"@types/lodash": "^4.14.144",
"@types/moment-timezone": "^0.5.12",
"@types/node": "^12.11.6",
"codelyzer": "^5.2.0",
"gulp": "^4.0.1",
"gulp-clean-css": "^4.2.0",
"gulp-concat": "^2.6.1",
"gulp-less": "^4.0.1",
"gulp-postcss": "^8.0.0",
"gulp-uglify": "^3.0.2",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"merge-stream": "^2.0.0",
"nswag": "13.0.6",
"postcss-url": "^9.0.0",
"protractor": "~5.4.2",
"ts-node": "~8.3.0",
"tslib": "1.10.0",
"tslint": "~5.19.0"
}
}