question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid column name 'Description'

See original GitHub issue

Your Abp package version: 5.13 Your base framework: .Net Framework or .Net Core: Net core Exception message and stack trace if available.: Invalid column name ‘Description’

Steps needed to reproduce the problem.

  1. Download a new project from the website
  • SPA Angular application
  • Include login, register, user, role…
  1. Open the solution and run the migrator on a fresh database
  2. Run the host application and before it’s fully started it will throw an exception

I’ve debugged the issue as far as possible, in {companyname}.Authorization.Roles.Role there is a property ‘Description’, which isn’t there in my previous project. By removing this property the error disapears.

[StringLength(MaxDescriptionLength)]
public string Description {get; set;}

The exception is thrown when the following line (in the HostRoleAndUserCreator.cs) is executed by the host application. var adminRoleForHost = _context.Roles.IgnoreQueryFilters().FirstOrDefault(r => r.TenantId == null && r.Name == StaticRoleNames.Host.Admin);

The weird thing is, the migrator application is also executing this code without any exceptions…

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
StefanKoenencommented, Oct 19, 2020

Hmm okay, then I probably got an older template 😓 but still… In my situation it looks like something is cached between the different solutions, I’m not going to continue with the new template so from my side we can close the issue I guess.

0reactions
ismcagdascommented, Oct 19, 2020

Description field is there almost for 3 years https://github.com/aspnetboilerplate/module-zero-core-template/commit/63f6e3b6147b6df7a08b09a53dad562c57dac17c 😃 . Probably the issue is related to your database. Maybe it was there before you create the template.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQL Server: Invalid Column Name
When using double quotes, it's parsed as a column name instead of a string. If that column name is not available (a string...
Read more >
Invalid Column Name SQL: What It Means & How to Fix
Invalid column name SQL is a common error that simply means that the column in your SQL statement does not exist. Invalid Column...
Read more >
Invalid Column Name SQL: How to Use Columns Properly
An invalid column name error in SQL means that the column name violates the conditions of the column name. If you reference an...
Read more >
What does 'invalid column name' mean in SQL?
It means that the column name violates the condition(s) of a column name. For example, it may have a special character in the...
Read more >
Why is this query throwing an "Invalid Column Name" error?
If the field [ParameterName] is the value "StaffTablesRefreshed" , then set the value of [ParameterValue] to "1" . When executed, SQL Server ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found