Thank you for your response!
I am a little concern about "This does not comply with security regulations." As I know, many popular applications have this kind of authentication, such as Slack and Twilio. When my app (as a caller) sends requests to their API endpoint, I need to include my AccountId and AuthToken, which I got when I subscripted on their service and never expired.
Now, I am an API provider (same as Slack and Twilio) , and want to provide same way of authentication/authorization. Dose AspNetZero has (or will have) this feature? If not yet, is it easy to add by myself? Can you provide a code example?
Thanks,
I am using Angular+Core v5. I need to provide an API which is called from other program (instead of real person). For caller authentication, I need to provide a static "Authorization Token" which is never expired. I wonder what is the best way to do it in ASPNETZero. Can you give me an example?
Thanks,
I need to transfer hundreds user info from another application to AbpUsers table to avoid manually enter them in admin interface. I am going to map the columns, such as:
insert into AbpUsers (AccessFailedCount, CreationTime, EmailAddress, UserName) select 0, getdate(), email, login from TableOnAnotherApp
Is it possible? What is the best practice in this scenario?
I am concerning the column "Password", which is "not null" and must be a token. Can I just make up it as a plan string?
For the ConcurrencyStamp and SecurityStamp columns, can I just leave it as null?
Thanks,
I did exactly same on both of your quoted, but no help. There is another answer on your second link about Anonymous Authenticate. It gives me a clue.
The login page is accessible by anonymous, so the "Anonymous Authenticate" in IIS must be enabled. The default "Anonymous user identity" setting is IUSR on IIS. I have to explicitly add IUSR and assign its permission (“read” is enough).
Another alternative is simply select “Application pool identity” as Anonymous user identity.
I tried both. All work.
Thanks again!
I am using Core+Angular version. While I deploy the Angular part onto IIS server, I find its folder permission must be assigned to the local user (e.g. MyServer\users). Otherwise, it returns 401 unauthorized error. I've tried to add same permissions to group of IIS_IUSRS and IIS APPPOOL group, but no help.
I don't want any local user to access that folder. That is why I need to remove MyServer\users group from the permission list. This way works on my other applications on same IIS.
Do you have any idea why AspNetZero Angular site needs a local users permissions on IIS?
Thanks,
Thank you for your solution! The bat file is very helpful. I run it but does not solve the problem. There are still some projects missed in VS, and showing "restoring failed" with errors around some .csproj files.
As I dug out, the missed projects are not included in web.sln. This may be the root of the issue. Not sure if it is related to the VS update for v15.6.6. The web.sln file seems modified just after the update time.
I deleted that web.sln, copied/pasted a web.sln from old backup, run "Delete BIN OBJ Folders.bat", and opened it in VS again. It succeeds this time. There are still some warnings:
Warning NU1603 Hangfire.Core 1.6.17 depends on Newtonsoft.Json (>= 5.0.0) but Newtonsoft.Json 5.0.0 was not found. An approximate best match of Newtonsoft.Json 5.0.1 was resolved.
Warning MSB3245 Could not resolve this reference. Could not locate the assembly "System.ComponentModel.DataAnnotations". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
There is no running problem so far, as my testing. Shall I do something to resolve these warnings, or just ignore them?
Thanks again!
Thank you for your advice. I tried it but seems no help.
The aspnet-core folder has 3 .sln files. I have to run "dotnet restore *.Web.sln". It runs with several same NU1603 warning, "... Newtonsoft.Json 5.0.0 was not found. An approximate best match of Newtonsoft.Json 5.0.1 was resolved."
After run this command, I tried to open the *.Web.sln in VS2017. Same thing happends. The src folder only shows 5 projects: Application.Shared, Core.Shared, EntityFrameworkCore, Web.Host, and Web.Public.
I tried to build solution in VS2017 but got much more errors.
Any suggestion?
Thanks,
I am using Core+Angla v5.0.4. Just now, after updating my VS2017 to version 15.6.6 and reopen VS, many projects disappeared, and many build-errors pupup. Most errors like:
Error NU1105 Unable to find project information for 'C:\MyPrj\aspnet-core\src\MyPrj.Web.Core\MyPrj.Web.Core.csproj'. The project file may be invalid or missing targets required for restore. MyPrj.Web.Host C:\MyPrj\aspnet-core\src\MyPrj.Web.Host\MyPrj.Web.Host.csproj
and
Error CS0012 The type 'AbpController' is defined in an assembly that is not referenced. You must add a reference to assembly 'Abp.AspNetCore, Version=3.2.5.0, Culture=neutral, PublicKeyToken=null'. SNet.Web.Host C:\MyPrj\aspnet-core\srcMyPrj.Web.Host\Controllers\AntiForgeryController.cs
Do you have any idea about restoring?
Thanks,
Found out. That seems browser Edge's problem.
I just copied the whole url to Chrome <a class="postlink" href="http://localhost:4200/account/login?ss=true&returnUrl=http:%2F%2Flocalhost:45776%2FAccount%2FLogin">http://localhost:4200/account/login?ss= ... nt%2FLogin</a>. It works just as expected.
Or, set Web Browser as Chrome in Visual Studio and press F5. It works too.