小编Alb*_*ert的帖子

SMTP错误554

我使用MDaemon作为邮件服务器,最后几天我收到错误"554邮件不符合标准"从其中一台机器发送的电子邮件.知道可能导致它的原因吗?其他机器工作正常.

更多信息....这是日志文件:

Mon 2008-10-20 16:11:37: Session 7831; child 1; thread 3908
Mon 2008-10-20 16:11:36: Accepting SMTP connection from [80.78.72.135 : 43579]
Mon 2008-10-20 16:11:36: Performing PTR lookup (135.72.78.80.IN-ADDR.ARPA)
Mon 2008-10-20 16:11:36: *  Error: Name server reports domain name unknown
Mon 2008-10-20 16:11:36: *  No PTR records found
Mon 2008-10-20 16:11:36: ---- End PTR results
Mon 2008-10-20 16:11:36: --> 220 ikubinfo.com ESMTP MDaemon 9.5.2; Mon, 20 Oct 2008 16:11:36 +0200
Mon 2008-10-20 16:11:36:  250 ikubinfo.com Hello RS, pleased to meet you …

email outlook smtp

15
推荐指数
2
解决办法
14万
查看次数

LINQ to SQL多个DataContext-s

我正在尝试制定有关如何组织DataContexts的最佳策略.我们工作的典型数据库有50到100个表,通常采用第三范式,并且它们之间有很多关系.我想我们有两个选择:

  1. 将所有表放在一个上下文中.这将确保我们所做的任何事情都将以正确的顺序提交到数据库中.问题是LINQ设计师将会有50多个表格,我担心性能可能会受到影响.
  2. 根据表的逻辑分组创建多个数据上下文.问题在于,将存在关系的一侧将在一个上下文中而另一侧在另一个上下文中的位置.我们必须手动处理以正确的顺序提交两个上下文.

有没有推荐的做法来处理这个问题?

更多细节:

我想在LINQ to SQL之上创建自己的实体和工作单元.实体将在xml模型文件中定义,其中还将指定到LINQ实体的映射.自定义工具将根据模型生成我的实体(POCO).客户端代码只与我的实体和我的工作单元进行交互; 从不直接使用DataContext或LINQ实体.但是我不想复制LINQ to SQL提供的开箱即用,所以我想使用底层的LINQ DataContext.这意味着我不能在不同的数据上下文中有两个订单,因为无法将我的POCO订单映射到它们.

sql linq datacontext linq-to-sql

11
推荐指数
1
解决办法
7510
查看次数

动态更改GridView项目模板

我有一个相当大的asp.net网站,使用GridView绑定到很多地方的同一个对象.我正在使用项目模板来自定义每一行.但是,要在所有页面中使用相同的模板,我必须将项目模板复制并粘贴到每个页面.显然这不是最好的解决方案.除此之外,我希望能够通过更改某些配置文件来更改GridView使用的模板.一种选择是使用DataGrid创建用户控件,并公开要在每个页面中使用的必要属性.但是,这不能满足能够动态更改模板的第二个要求.基本上我正在寻找一种方法来告诉GridView使用模板并能够动态地执行此操作.任何想法都会有所帮助.

asp.net templates gridview dynamic

8
推荐指数
2
解决办法
3万
查看次数

NHibernate架构?

我打算使用nhibernate作为ORM来实现我的下一个项目(asp.net MVC).由于我没有使用nhibernate的经验,我想知道如何组织不同项目之间的依赖关系.我已经看到这样的东西作为推荐的方法:

  • UI取决于Model,Repositories和NHibernate
  • 存储库依赖于Model和Nhibernate

    ----- UI-----------------------------
   |                |                    |
   |                |                    |
    Model  NHibernate

问题是我不希望UI代码直接与nhibernate交互,所以我想到这样的事情:

  • UI取决于Model和Facade
  • Facade依赖于Model和Nhibernate
----- UI -------- | | | | 模型

Facade,实际上将拥有存储库以及封装nhibernate对象.

这听起来合理吗?首选架构是否有任何指导方针?

感谢名单

nhibernate persistence hibernate

7
推荐指数
1
解决办法
1589
查看次数

IdentityServer和ADFS

我正在尝试将IdentityServer设置为使用ADFS进行身份验证.流程将是:

用户 - >自定义应用程序 - > IS - > ADFS

我已经设置了几乎所有东西,但我仍然坚持IS和ADFS之间的通信.用户似乎在ADFS中成功登录,但是我收到错误:

ID4037:无法从以下安全密钥标识符'SecurityKeyIdentifier解析验证签名所需的密钥

当我回到IS.

显而易见,令牌签名证书在一方或另一方存在问题.我试图找到一些解释不同证书之间关系的文档,但没有成功.

现在我在IS中有自签名证书,签署令牌(使用IdentityServerOptions的SigningCertificate属性设置),我在ADFS中配置了AD证书来签署令牌.

有关如何正确地做到这一点的指导或建议吗?两者应该是相同的,还是应该配置其他东西以使其工作?

编辑 使用Fiddler我可以看到ADFS中的所有内容都运行良好,错误是将结果发布到IdentityServer时.在wresult param中发布的XML是:

<t:RequestSecurityTokenResponse xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">
  <t:Lifetime>
    <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-06-20T12:25:31.148Z</wsu:Created>
    <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2017-06-20T13:25:31.148Z</wsu:Expires>
  </t:Lifetime>
  <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
    <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsa:Address>urn:identityServer</wsa:Address>
    </wsa:EndpointReference>
  </wsp:AppliesTo>
  <t:RequestedSecurityToken>
    <saml:Assertion MajorVersion="1" MinorVersion="1" AssertionID="_fd1a14cd-4d18-407b-97d4-9f9dfcacd29a" Issuer="http://ssosrv.mydomain.com/adfs/services/trust" IssueInstant="2017-06-20T12:25:31.148Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
      <saml:Conditions NotBefore="2017-06-20T12:25:31.148Z" NotOnOrAfter="2017-06-20T13:25:31.148Z">
        <saml:AudienceRestrictionCondition>
          <saml:Audience>urn:identityServer</saml:Audience>
        </saml:AudienceRestrictionCondition>
      </saml:Conditions>
      <saml:AttributeStatement>
        <saml:Subject>
          <saml:NameIdentifier>user@mydomain.com</saml:NameIdentifier>
          <saml:SubjectConfirmation>
            <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod>
          </saml:SubjectConfirmation>
        </saml:Subject>
        <saml:Attribute AttributeName="emailaddress" AttributeNamespace="http://schemas.xmlsoap.org/ws/2005/05/identity/claims">
          <saml:AttributeValue>name.surname@mydomain.tv</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute AttributeName="name" AttributeNamespace="http://schemas.xmlsoap.org/ws/2005/05/identity/claims">
          <saml:AttributeValue>Name Surname</saml:AttributeValue>
        </saml:Attribute>
        <saml:Attribute AttributeName="upn" AttributeNamespace="http://schemas.xmlsoap.org/ws/2005/05/identity/claims">
          <saml:AttributeValue>user@mydomain.com</saml:AttributeValue>
        </saml:Attribute>
      </saml:AttributeStatement>
      <saml:AuthenticationStatement AuthenticationMethod="urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport" AuthenticationInstant="2017-06-20T12:25:31.039Z">
        <saml:Subject>
          <saml:NameIdentifier>user@mydomain.com</saml:NameIdentifier>
          <saml:SubjectConfirmation>
            <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod> …
Run Code Online (Sandbox Code Playgroud)

adfs active-directory single-sign-on identityserver3

3
推荐指数
1
解决办法
909
查看次数