Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "fguo"

I like to study the code on that link, but it seems no way for me to download/clone. Can you give me a hent how to do it?

Thanks,

It seems no "metronic" in my downloaded package. I then tried to download it by

It redirect me to https://github.com/aspnetzero/aspnet-zero-core/releases/download/v6.0.0/metronic_v5.5.5.zip, but shows "Not Found" on this site.

Answer

So, if I need to search a Forum number, directly modify url, instead of using the search box. Ok, it is acceptable to me.

I can use your way to search out the "Previous post". How long will that site exist?

Thanks,

It works! Thank you!

Just for curious, if I don't manually commit it, is it automatically committed at the method ending?

I think I need to learn more about the UnitOfWorkManager. Where can I find the documentation? Can you provide me a link?

Thanks again!

I encountered a new issue related this insert method.

I use "var id = await _repository.InsertAndGetIdAsync(obj); ". It does return a new id, however, the database seems not really updated. My code snippet is like:

var id = await _repository.InsertAndGetIdAsync(obj); Process proc = new Process(); proc.StartInfo.FileName = @"command"; proc.Start();

After inserting the obj, it triggers a Process with "command". The above Process should aggregate the whole obj table, but it actually always excludes the current inserted obj. For example, the MAX(id) is not the "new id", instead, it is always "new id - 1".

I also tried:

var id = await _repository.InsertAndGetIdAsync(obj); UnitOfWorkManager.Current.SaveChanges();

but it's no help.

Does "await _repository.InsertAndGetIdAsync(obj); " immedietely updates the database? If not, when it does?

Thanks,

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 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!

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,

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.

Showing 51 to 60 of 178 entries