Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Get int type error... #2725


User avatar
0
peterlee created

HI.!

public virtual int ArticlePrice { get; set; }

and

ListDto code is public int ArticlePrice { get; set; }

error code is.. The property 'ArticlePrice' is not a String or Byte array. Length can only be configured for String and Byte array properties.

int, string , double ...

Samples are limited and progress is slow

I can not get the knowledge I need to go through the documentation. Do you have a sample I do not know?


8 Answer(s)
  • User Avatar
    0
    peterlee created

    Sended email my source

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thank you for sending the source code. You cannot use MaxLength attribute on a float property, this is not related to ABP or AspNet Zero, it is related to .Net. Instead you can use Range attribute, for example

    [Range(0,1000)]
    

    Thanks.

  • User Avatar
    0
    peterlee created

    Okay ...

    Int -> float type and found the following error:

    chrome console test

    abp.services.app.article.getArticle({}); Object {} jquery.min.js:4 POST <a class="postlink" href="http://localhost:6240/api/services/app/article/GetArticle">http://localhost:6240/api/services/app/ ... GetArticle</a> 500 (Internal Server Error) send @ jquery.min.js:4 ajax @ jquery.min.js:4 (anonymous) @ abp.jquery.js:20 Deferred @ jquery.min.js:2 abp.ajax @ abp.jquery.js:19 serviceNamespace.getArticle @ GetAll?v=636256260106863172:910 (anonymous) @ VM343:1

    plz..help

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Can you check Logs.txt under your web project. It should contain detailed exception message.

    Thanks.

  • User Avatar
    0
    peterlee created

    okay.. here

    DEBUG 2017-03-21 15:45:53,582 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2017-03-21 15:45:53,851 [1 ] Abp.Modules.AbpModuleManager - Found 19 ABP modules in total. DEBUG 2017-03-21 15:45:53,855 [1 ] Abp.Modules.AbpModuleManager - Loaded module: PeterNet.SpoManage.Web.SpoManageWebModule, PeterNet.SpoManage.Web, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,857 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.Mvc.AbpWebMvcModule, Abp.Web.Mvc, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,857 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebModule, Abp.Web, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,859 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,859 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,860 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpZeroOwinModule, Abp.Zero.Owin, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,860 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.Zero, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,860 [1 ] Abp.Modules.AbpModuleManager - Loaded module: PeterNet.SpoManage.SpoManageDataModule, PeterNet.SpoManage.EntityFramework, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,860 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFramework.AbpZeroEntityFrameworkModule, Abp.Zero.EntityFramework, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,860 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkModule, Abp.EntityFramework, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,861 [1 ] Abp.Modules.AbpModuleManager - Loaded module: PeterNet.SpoManage.SpoManageCoreModule, PeterNet.SpoManage.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,861 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.Ldap.AbpZeroLdapModule, Abp.Zero.Ldap, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,861 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,861 [1 ] Abp.Modules.AbpModuleManager - Loaded module: PeterNet.SpoManage.SpoManageApplicationModule, PeterNet.SpoManage.Application, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,861 [1 ] Abp.Modules.AbpModuleManager - Loaded module: PeterNet.SpoManage.WebApi.SpoManageWebApiModule, PeterNet.SpoManage.WebApi, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,861 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.WebApi.AbpWebApiModule, Abp.Web.Api, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,861 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.SignalR.AbpWebSignalRModule, Abp.Web.SignalR, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,862 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Runtime.Caching.Redis.AbpRedisCacheModule, Abp.RedisCache, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,862 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Hangfire.AbpHangfireModule, Abp.HangFire, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:53,866 [1 ] Abp.Modules.AbpModuleManager - 19 modules loaded. DEBUG 2017-03-21 15:45:54,230 [1 ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-03-21 15:45:54,230 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-03-21 15:45:54,230 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-03-21 15:45:54,230 [1 ] o.Configuration.LanguageManagementConfig - Converted SpoManage (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-03-21 15:45:54,649 [1 ] EntityFramework.AbpEntityFrameworkModule - Registering DbContext: PeterNet.SpoManage.EntityFramework.SpoManageDbContext, PeterNet.SpoManage.EntityFramework, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-03-21 15:45:55,379 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2017-03-21 15:45:55,388 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2017-03-21 15:45:55,389 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2017-03-21 15:45:55,397 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2017-03-21 15:45:55,410 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: SpoManage DEBUG 2017-03-21 15:45:55,480 [1 ] Abp.BackgroundJobs.BackgroundJobManager - Start background worker: Abp.BackgroundJobs.BackgroundJobManager DEBUG 2017-03-21 15:45:56,304 [1 ] Abp.Owin.OwinUserTokenProviderAccessor - DataProtectionProvider has not been set yet. DEBUG 2017-03-21 15:45:56,448 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 35 classes define auto mapping attributes DEBUG 2017-03-21 15:45:56,448 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Friendships.Cache.FriendCacheItem DEBUG 2017-03-21 15:45:56,451 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Sessions.Dto.TenantLoginInfoDto DEBUG 2017-03-21 15:45:56,451 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Sessions.Dto.UserLoginInfoDto DEBUG 2017-03-21 15:45:56,451 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Organizations.Dto.OrganizationUnitDto DEBUG 2017-03-21 15:45:56,451 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Organizations.Dto.OrganizationUnitUserListDto DEBUG 2017-03-21 15:45:56,451 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Notifications.Dto.NotificationSubscriptionWithDisplayNameDto DEBUG 2017-03-21 15:45:56,451 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.MultiTenancy.Dto.TenantListDto DEBUG 2017-03-21 15:45:56,451 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.MultiTenancy.Dto.TenantEditDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Localization.Dto.ApplicationLanguageEditDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Localization.Dto.ApplicationLanguageListDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Friendships.Dto.FriendDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Editions.Dto.EditionEditDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Editions.Dto.FlatFeatureDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Editions.Dto.EditionListDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Chat.Dto.ChatMessageDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Chat.Dto.ChatUserDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Chat.Dto.ChatUserWithMessagesDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Users.Profile.Dto.CurrentUserProfileEditDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Users.Dto.UserLoginAttemptDto DEBUG 2017-03-21 15:45:56,452 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Users.Dto.UserListDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Roles.Dto.RoleListDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Roles.Dto.RoleEditDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Permissions.Dto.FlatPermissionDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Permissions.Dto.FlatPermissionWithLevelDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Auditing.Dto.AuditLogListDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.People.Dto.AddPhoneInput DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.People.Dto.CreatePersonInput DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.People.Dto.PersonListDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.People.Dto.PhoneInPersonListDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Articles.Dto.AddPictureInput DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Articles.Dto.CreateArticleInput DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Articles.Dto.ArticleListDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Articles.Dto.PictureInArticleListDto DEBUG 2017-03-21 15:45:56,453 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Authorization.Users.Dto.UserListDto+UserListRoleDto DEBUG 2017-03-21 15:45:56,454 [1 ] Abp.AutoMapper.AbpAutoMapperModule - PeterNet.SpoManage.Web.Models.Account.TenantSelectionViewModel+TenantInfo DEBUG 2017-03-21 15:45:56,788 [1 ] Abp.Owin.OwinUserTokenProviderAccessor - DataProtectionProvider has not been set yet. DEBUG 2017-03-21 15:45:56,807 [1 ] Abp.Owin.OwinUserTokenProviderAccessor - DataProtectionProvider has not been set yet. DEBUG 2017-03-21 15:45:56,817 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Timing.ITimingAppService' with service name 'app/timing'. DEBUG 2017-03-21 15:45:56,819 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Tenants.Dashboard.ITenantDashboardAppService' with service name 'app/tenantDashboard'. DEBUG 2017-03-21 15:45:56,820 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Sessions.ISessionAppService' with service name 'app/session'. DEBUG 2017-03-21 15:45:56,822 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Organizations.IOrganizationUnitAppService' with service name 'app/organizationUnit'. DEBUG 2017-03-21 15:45:56,824 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Notifications.INotificationAppService' with service name 'app/notification'. DEBUG 2017-03-21 15:45:56,825 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.MultiTenancy.ITenantAppService' with service name 'app/tenant'. DEBUG 2017-03-21 15:45:56,827 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Logging.IWebLogAppService' with service name 'app/webLog'. DEBUG 2017-03-21 15:45:56,829 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Localization.ILanguageAppService' with service name 'app/language'. DEBUG 2017-03-21 15:45:56,831 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Friendships.IFriendshipAppService' with service name 'app/friendship'. DEBUG 2017-03-21 15:45:56,832 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Editions.IEditionAppService' with service name 'app/edition'. DEBUG 2017-03-21 15:45:56,833 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Configuration.Tenants.ITenantSettingsAppService' with service name 'app/tenantSettings'. DEBUG 2017-03-21 15:45:56,835 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Configuration.Host.IHostSettingsAppService' with service name 'app/hostSettings'. DEBUG 2017-03-21 15:45:56,836 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Common.ICommonLookupAppService' with service name 'app/commonLookup'. DEBUG 2017-03-21 15:45:56,837 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Chat.IChatAppService' with service name 'app/chat'. DEBUG 2017-03-21 15:45:56,838 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Caching.ICachingAppService' with service name 'app/caching'. DEBUG 2017-03-21 15:45:56,839 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Authorization.Users.IUserLinkAppService' with service name 'app/userLink'. DEBUG 2017-03-21 15:45:56,840 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Authorization.Users.IUserLoginAppService' with service name 'app/userLogin'. DEBUG 2017-03-21 15:45:56,842 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Authorization.Users.IUserAppService' with service name 'app/user'. DEBUG 2017-03-21 15:45:56,843 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Authorization.Users.Profile.IProfileAppService' with service name 'app/profile'. DEBUG 2017-03-21 15:45:56,844 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Authorization.Roles.IRoleAppService' with service name 'app/role'. DEBUG 2017-03-21 15:45:56,845 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Authorization.Permissions.IPermissionAppService' with service name 'app/permission'. DEBUG 2017-03-21 15:45:56,846 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Auditing.IAuditLogAppService' with service name 'app/auditLog'. DEBUG 2017-03-21 15:45:56,848 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.People.IPersonAppService' with service name 'app/person'. DEBUG 2017-03-21 15:45:56,849 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'PeterNet.SpoManage.Articles.IArticleAppService' with service name 'app/article'. DEBUG 2017-03-21 15:45:59,124 [9 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected (on reconnected event): {"ConnectionId":"16d41844-2fde-4748-8cc7-11bb05540d35","IpAddress":"::1","TenantId":1,"UserId":2,"ConnectTime":"2017-03-21T06:45:58.9249163Z","Properties":{}} DEBUG 2017-03-21 15:46:07,754 [13 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"406e12b5-93f2-43be-b672-f5b601b01030","IpAddress":"::1","TenantId":1,"UserId":2,"ConnectTime":"2017-03-21T06:46:07.7521383Z","Properties":{}} DEBUG 2017-03-21 15:46:07,783 [7 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 406e12b5-93f2-43be-b672-f5b601b01030 DEBUG 2017-03-21 15:46:50,666 [19 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is disconnected: 406e12b5-93f2-43be-b672-f5b601b01030 DEBUG 2017-03-21 15:46:53,082 [20 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is connected: {"ConnectionId":"3be75365-0c48-42cb-944e-e381c50f797e","IpAddress":"::1","TenantId":1,"UserId":2,"ConnectTime":"2017-03-21T06:46:53.0799273Z","Properties":{}} DEBUG 2017-03-21 15:46:53,175 [15 ] Abp.Web.SignalR.Hubs.AbpCommonHub - A client is registered: 3be75365-0c48-42cb-944e-e381c50f797e

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks for sending the code. You didn't add ArticlePicture entity to your DbContext, I think it is the cause of problem.

    Add it to your dbContext, generate migration, update database and it should work.

    Thanks.

  • User Avatar
    0
    peterlee created

    I modified one of the subtractions in dbcontext.

    Nothing but ...

    thank you.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I didn't understand, do you still have the problem or is it solved ? If it is not solved, we can try to help you.

    Thanks.