在我的项目中,我需要创建一个业务对象验证层,它将接受我的对象并根据一组规则运行它,并返回pass或fail以及它的失败原因列表.我知道有很多选择可以实现这一目标.
来自微软:
开源:
有没有人对这些技术(或任何我没有列出的技术)或任何他们认为最适合业务规则验证的意见有任何特别大的成功或失败.
编辑:我不只是询问通用验证字符串长度<200,邮政编码是5位数或5 + 4但是假设规则引擎实际上会被利用.
有没有人在标准C#ASP.NET环境中完成Compass for CSS/SASS的任何开发?
有没有一个我可以下载的发行版已准备好用于Windows,或者我是否需要安装每个方程式并自己构建指南针?
是否有任何插件可以使Compass与VS2008更友好地进行开发,例如在构建中自动处理Compass/SASS,语法突出显示和/或智能感知支持?
如果没有任何VS IDE插件,那么在Compass中处理编码的独立文本编辑器的最佳选项是什么?
设计电子邮件的正确做法是什么,并且合理地期望它将在Outlook 2003,2007和Webmail客户端中正确显示?我订阅了各种电子邮件新手,并查看了它们的来源,并看到其中一些有2000行HTML和CSS以及我以前从未见过的IF语句(我假设与确定outlook的版本相关).
是否有可用于创建标记的免费或商业工具?关于如何应用我见过的这些巨大样式表,是否有标准模式?
我有一个C#Web表单ASP.NET 4.0 Web应用程序使用Routing for URL由于某种原因我的web.config的system.web部分中定义的自定义错误被完全忽略,它将回退IIS错误.
这完全被忽略了
<system.web>
<customErrors mode="On">
<error statusCode="500" redirect="~/Error" />
<error statusCode="404" redirect="~/404" />
<error statusCode="403" redirect="~/Error" />
</customErrors>
</system.web>
Run Code Online (Sandbox Code Playgroud)
这部分接管了
<system.webServer>
<httpErrors>
<!--<clear />-->
<remove statusCode="500" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" subStatusCode="-1" path="/App1/404" responseMode="Redirect" />
<error statusCode="500" prefixLanguageFilePath="" path="/App1/Error" responseMode="Redirect" />
</httpErrors>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
这将是一个小小的不便,除了它回退到IIS本机而不是我的应用程序它完全绕过Elmah正确记录我的404异常.
编辑:只是为了避免任何这样的建议我只在customErrors停止工作后添加了httpErrors配置,所以我会有任何东西.
好的问题是有两个文件:自述文件和自述文件
如何删除存储库中的自述文件?
当我做更新我得到这个错误中止:自述文件和自述文件之间的案例折叠冲突
我在浏览器中查看我的ASP.NET页面时在运行时收到错误.我没有得到任何构建错误但是我在运行时遇到以下编译器错误:
编译错误
描述:编译服务此请求所需的资源时发生错误.请查看以下特定错误详细信息并相应地修改源代码.
Compiler Error Message: CS1513: } expected
Source Error:
Line 329: #line hidden
Line 330: __output.Write("\r\n\t\t\t</div>\r\n\t\t");
Line 331: }
Line 332:
Line 333: private System.Web.UI.Control __BuildControl__control7() {
Source File: c:\Windows\Microsoft.NET\Framework\v1.1.4322\
Temporary ASP.NET Files\xxxxxxxx\450ffa78\d46d847d\
k1gsz9dj.0.cs Line: 331
Run Code Online (Sandbox Code Playgroud)
我在源代码中找不到任何遗漏},并且在Temporary ASP.NET Files目录中存在的生成的代码文件中发生此错误.如何将此跟踪到我的页面中实际格式错误的代码行或页面上的用户控件?
使用DataContractSerializer序列化我的对象,我得到类似的输出
<?xml version="1.0" encoding="utf-8" ?>
<AgentNotification xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/The.name.space.Notifications">
<_x003C_Created_x003E_k__BackingField i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/The.name.space" />
<_x003C_Id_x003E_k__BackingField i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/The.name.space" />
<_x003C_Email_x003E_k__BackingField>some@email.com</_x003C_Email_x003E_k__BackingField>
<_x003C_Name_x003E_k__BackingField>Random Person</_x003C_Name_x003E_k__BackingField>
<_x003C_Policies_x003E_k__BackingField>
<PolicyNotification>
<_x003C_Created_x003E_k__BackingField i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/The.name.space" />
<_x003C_Id_x003E_k__BackingField i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/The.name.space" />
<_x003C_ConfirmationNumber_x003E_k__BackingField>Some number</_x003C_ConfirmationNumber_x003E_k__BackingField>
</PolicyNotification>
<PolicyNotification>
</_x003C_Policies_x003E_k__BackingField>
</AgentNotification>
Run Code Online (Sandbox Code Playgroud)
有没有办法输出正好的标签
<Id>
<Name>
Run Code Online (Sandbox Code Playgroud)
等,不需要用属性覆盖我的类?
如果没有办法,每次正确的输出保证是相同的?因此,如果我使用它来渲染我的对象图是XML与文件生成的X*文档混搭,我将永远不会遇到我的节点更改名称并且文档空白正确的问题?
为什么有些网站(如facebook)会在iframe中加载脚本?
这是否允许网站一次加载2个以上的资源,因为iframe的资源位于不同的URL?
我想知道是否有可能防止对象(类或结构)的内存被交换到磁盘?
编辑:至于为什么我被告知我将要使用的一些数据无法写入磁盘.
我不希望它留下足够长的时间来换掉数据但是认为值得检查.
出于某种原因,我在尝试返回时遇到错误
new HttpStatusCodeResult(500, statusDescription);
在我的MVC3应用程序中.它因错误而爆炸
Specified argument was out of the range of valid values.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value
Source Error:
An unhandled exception was generated during the execution of the current web request. …
Run Code Online (Sandbox Code Playgroud) asp.net ×4
c# ×4
html ×2
.net ×1
bitbucket ×1
compass-sass ×1
css ×1
email ×1
iframe ×1
iis-7 ×1
javascript ×1
memory ×1
mercurial ×1
nxbre ×1
routing ×1
validation ×1
viewengine ×1
windows ×1
xml ×1