Base solution for your next web application

Activities of "justinp"

I went through in very extreme detail and made sure that all the properties were virtual and also noticed I had put my enum for Type inside the Phone class definition. I have no idea why this gave me the issue I saw, but this is resolved.

I'm following along the step-by-step tutorial (Core + Angular) and get to the point where you add a phone number. However, I get an error from the server.

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
(unknown) ERROR: 
(unknown) Object
code:0
details:null
message:"An internal error occurred during your request!"
validationErrors:null

I set a break point and walk through the code no error is thrown by the server, but it fails at the equivalent line:

person.Phones.Add(phone);

If I set a breakpoint, it never reaches the next line:

await CurrentUnitOfWork.SaveChangesAsync();

When I use Swagger UI, my break point is never hit and I see the following response:

Response Body
{
  "result": null,
  "targetUrl": null,
  "success": false,
  "error": {
    "code": 0,
    "message": "**Current user did not login to the application!**",
    "details": null,
    "validationErrors": null
  },
  "unAuthorizedRequest": true,
  "__abp": true
}

Is there a way to test the API, or any reason that it would be failing without throwing an error? Does this have something to do with the method being Async?

Any help solving the issue or help to improve debugging is much appreciated.

I ran into this same issue, but the instructions don't seem clear for using Simple Line Icons.

hikalkan mentions above that they are using the Simple Line Icons. In the default menu, "icon-globe" is used. Replacing with "icon-user" works, but replacing it with "icon-user**<ins>s</ins>**" does not work. <ins>So how do I get this to work?</ins>

By the way, if I did want to use Font Awesome, I use the syntax above in the new SideBarMenuItem (e.g. "fa fa-users"), and this works, so thank you for those instructions, but some instructions on the Simple Line Icons would be appreciated.

EDIT: I did find that the icon I was trying to use is listed as "icon-users" on the Metronic site, but when I looked at what Abp was using, it was "icon-people." I'm not sure where the proper names are located, but be aware that they do not match the Metronic site.

Thank you for the response. I get a 404 when I click the link you provided. Perhaps I was not added to some group that I need to be.

However, I'm just looking for documentation on _HOW_to use the Migrator project. The startup documentation only mentions that it can be used as an alternative to using the EF commands Again, here's what the page says:

ASPNET ZERO MIGRATOR APPLICATION

AspNet Zero solution includes a .Migrator (like Acme.PhoneBook.Migrator) project in the solution. You can run this tool for database migrations on development and production (see development guide for more information). However, it links to here (<a class="postlink" href="https://www.aspnetzero.com/Documents/Development-Guide-Angular#configuration">https://www.aspnetzero.com/Documents/De ... figuration</a>) but there isn't any information on the Migrator project. This is just a documentation error.

The link should go here: <a class="postlink" href="https://www.aspnetzero.com/Documents/Development-Guide-Core#migrator-console-application">https://www.aspnetzero.com/Documents/De ... pplication</a>, or better the information on the migrator console should be included in the Angular2 project documentation, supposing it works with that project.

Thank you for answering my question _and_letting me know that the new version is coming soon. I will not work on this and will focus my efforts elsewhere.

Thank you very much!

This post does a decent job of explaining the change: <a class="postlink" href="https://github.com/aspnet/Announcements/issues/209">https://github.com/aspnet/Announcements/issues/209</a>

Some more research led to this post: <a class="postlink" href="http://stackoverflow.com/questions/40858155/ef-core-1-1-to-webapi-core-add-migration-fails/40862092#40862092">http://stackoverflow.com/questions/4085 ... 2#40862092</a>

The issue is related to the builder.AddUserSecrets() call. To fix perform the following steps:

  • Adding the user secret to the assembly (instead of just project.json) by adding attribute [assembly: UserSecretsId("aspnet-TestApp-ce345b64-19cf-4972-b34f-d16f2e7976ed")] to Startup.cs
  • In Startup.cs replace builder.AddUserSecrets() with builder.AddUserSecrets<Startup>(); Reference: InvalidOperationException: Could not find 'UserSecretsIdAttribute' on assembly

The difference being that builder.AddUserSecrets() is being called from the static class AppConfigurations from inside the Web.Core project (as opposed to the EF or Web.Host projects). So I'm not sure what to change the builder.AddUserSecrets() to builder.AdduserSecrets<T>().

I would guess that since it wants an IConfigurationBuilder, that it would be builder.AddUserSecrets<ConfigurationBuilder>(). Ideas?

So is no one aware of where the EF6 Migrator tool documentation is? Am I missing something? #2653@1c71b90c-f27e-4559-9414-854a033a7d91

Continuing with the attempt to get the Entity Framework working since there isn't any documentation on using the Migrator project...

I've installed the following packages on the EF project: a. Microsoft.EntityFrameworkCore b. Microsoft.EntityFrameworkCore.Tools

Now I run:

PM> update-database Both Entity Framework Core and Entity Framework 6 are installed. The Entity Framework Core tools are running. Use 'EntityFramework\Update-Database' for Entity Framework 6. An error occurred while calling method 'ConfigureServices' on startup class 'Startup'. Consider using IDbContextFactory to override the initialization of the DbContext at design-time. Error: This method could not find a user secret ID because the application's entry assembly is not set. Try using the ".AddUserSecrets(string userSecretsId)" or ".AddUserSecrets<TStartup>()" method instead. No DbContext was found in assembly 'Project.EntityFramework'. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.

Thank you for the reply.

Yes, I'm switching to VS2017 and aware that some things are different (project.json vs global.json) and working through that. However your suggestion did not resolve the issue.

The following packages that are prompted to be updated when the solution is opened, which does include the one you mentioned.

xunit -> v2.2.0 xunit.extensibility.execution -> v2.2.0 xunit.runner.visualstudio -> v2.2.0 Microsoft.NET.Test.Sdk -> v15.0.0 Migrator.EF6.Tools -> v1.1.0

After upgrading and restoring the packages, I did the following:

Set Web.Host project as default Built the solution

You mentioned using the Migrate tool. As I mentioned in this post the documentation referenced is missing: [http://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=5370])

Running console from inside folder: No executable found matching command "dotnet-ef"

Running from Package Manager Console: PM> update-database The EntityFramework package is not installed on project 'ApolloEHR.EntityFramework'.

So I checked, and just like the error says EntityFramework wasn't installed! Installed it, then get the errors about the project.json missing.

There should be either both clear documentation on the workaround using Migrator, and updated documentation on using EF CLI. There are neither that I can find, but if you can point me to it, I'd be grateful.

Showing 51 to 60 of 79 entries