Open Closed

Increase column size for Abp Table #9230


User avatar
0
dhill created

We're getting this exception:

An error occurred while saving the entity changes. See the inner exception for details. String or binary data would be truncated in table 'SafetyPlusWeb.dbo.AbpSessions', column 'IpAddresses'. Truncated value: '10.1.0.23,10.1.1.7,10.1.1.14,10.1.1.15,10.1.0.18,10.1.0.32,10.1.0.4,10.1.1.12,10.1.1.10,10.1.0.25,10'.

How can we increase the size of IpAddresses field on the AbpSessions table?


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can change the IdentitySessionConsts and add new migrations.

    https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentitySessionConsts.cs#L5-L13

  • User Avatar
    0
    dhill created

    Is there a way to override consts without downloading the entire project?

    If not can we override the logger to trim anything beyond 30 chars so it'll save properly?

    Would like to avoid adding the entire project if we can.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You don't need to download the entire project.

    IdentitySessionConsts's properties are static. You can change them in your project.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on May 12, 2025, 05:22