Yes, you are right, but ... My point was that It is not so simple as you describe to change the default background job processor to Hangfire. After exchanging we also need to rewrite some logic to something like you offered. Currently, the documentation doesn't have warnings about this. My offer was to modify HangfireBackgroundJobManager to move enqueueing a job on transaction committing level. Thanks
Yes, but after an exception at the end of this method all changes will be rolled back, but Hangfire job will be left.
As I understand, is this behaviour(asp.net zero angular UI sends Authorization: Bearer null in a request to API) is a bug?
Hi. I got null token before login.
The problem in UI part:
.\angular\src\AppPreBootstrap.ts
private static getUserConfiguration(callback: () => void): JQueryPromise<any> { const cookieLangValue = abp.utils.getCookieValue('Abp.Localization.CultureName'); return abp.ajax({ url: AppConsts.remoteServiceBaseUrl + '/AbpUserConfiguration/GetAll', method: 'GET', headers: { Authorization: 'Bearer ' + abp.auth.getToken(), <---------------Without null Bearer it works---------------------------------------------------- '.AspNetCore.Culture': ('c=' + cookieLangValue + '|uic=' + cookieLangValue), 'Abp.TenantId': abp.multiTenancy.getTenantIdCookie() } }).done(result => { $.extend(true, abp, result);
HTTP raw request data:
GET <a class="postlink" href="http://localhost:22742/AbpUserConfiguration/GetAll">http://localhost:22742/AbpUserConfiguration/GetAll</a> HTTP/1.1 Host: localhost:22742 Connection: keep-alive Pragma: no-cache Origin: <a class="postlink" href="http://localhost:4200">http://localhost:4200</a> Abp.TenantId: null User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36 Content-Type: application/json Accept: application/json, text/javascript, /; q=0.01 Cache-Control: no-cache X-Requested-With: XMLHttpRequest .AspNetCore.Culture: c=null|uic=null Expires: Sat, 01 Jan 2000 00:00:00 GMT Referer: <a class="postlink" href="http://localhost:4200/account/login">http://localhost:4200/account/login</a> Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9
HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: application/json; charset=utf-8 Server: Kestrel Access-Control-Allow-Origin: * X-SourceFiles: =?UTF-8?B?RDpcc291cmNlc1xBc3AuTmV0IFplcm9cQXNwLk5ldCBDb3JlICYgQW5ndWxhclw1LjAuNFxORVQgRnJhbWV3b3JrIDQuNi4xXFBsYXRmb3JtMlxQbGF0Zm9ybVxhc3BuZXQtY29yZVxzcmNcU3BlcnNlLlBsYXRmb3JtLldlYi5Ib3N0XEFicFVzZXJDb25maWd1cmF0aW9uXEdldEFsbA==?= X-Powered-By: ASP.NET Date: Mon, 18 Dec 2017 16:43:43 GMT
e3e {"result":{"multiTenancy":{"isEnabled":true,"sides":{"host":2,"tenant":1}},"session":{"userId":null,"tenantId":null,"impersonatorUserId":null,"impersonatorTenantId":null,"multiTenancySide":2},"localization":{"currentCulture":{"name":"en","displayName":"English"},"languages":[{"name":"de","displayName":"Deutsch","icon":"famfamfam-flags de","isDefault":false,"isDisabled":false,"isRightToLeft":false},{"name":"en","displayName":"English","icon":"famfamfam-flags gb","isDefault":true,"isDisabled":false,"isRightToLeft":false},{"name":"es-MX","displayName":"Español (México)","icon":"famfamfam-flags mx","isDefault":false,"isDisabled":false,"isRightToLeft":false},{"name":"es","displayName":"Español (Spanish)","icon":"famfamfam-flags es","isDefault":false,"isDisabled":false,"isRightToLeft":false},{"name":"fr","displayName":"Français","icon":"famfamfam-flags fr","isDefault":false,"isDisabled":false,"isRightToLeft":false},{"name":"it","displayName":"Italiano","icon":"famfamfam-flags it","isDefault":false,"isDisabled":false,"isRightToLeft":false},{"name":"pt-BR","displayName":"Português (Brasil)","icon":"famfamfam-flags ................ ................ ...............
What about using LocalDb for auto-tests? Or update DBContext to move schema part to table prefix (if not dbo) when running tests?