C# MVC最大内容长度
我正在使用产品:MVCForum。Github是 我知道有两个地方存在设置:C# MVC最大内容长度,c#,model-view-controller,C#,Model View Controller,我正在使用产品:MVCForum。Github是 我知道有两个地方存在设置: \Web.config \App\u Data\forum.config 在Web.Config文件中,我知道可以添加设置,我发现: <appSettings> <add key="webpages:Version" value="3.0.0.0" /> <add key="PreserveLoginUrl" value="true" /> <add key="Client
- \Web.config
- \App\u Data\forum.config
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<!-- Forum settings: -->
<add key="FileUploadAllowedExtensions" value="jpg,jpeg,png,gif,pdf,zip" />
<add key="FileUploadMaximumFileSizeInBytes" value="5242880" />
</appSettings>
以前有一个支持论坛:,它有很多很好的答案,但现在已经不存在了
YodasMyDad做了这么棒的工作,我希望他仍然有在线支持论坛。如果他愿意,我很乐意主持
有人能帮我解决这个问题吗?经过几个小时的调查,我找到了答案。没有人们想象的那么容易
在名称空间中:MVCForum.Website
您需要查找视图模型:CreateEditTopicViewModel和CreateAjaxPostViewModel
[StringLength(6000)]
public string Content { get; set; }
及
相应地更改这些字符串长度限制。重新构建dll并将其放入服务器上的bin目录中。我希望这能帮助别人
[StringLength(6000)]
public string Content { get; set; }
[StringLength(6000)]
public string PostContent { get; set; }