小编Ale*_*gas的帖子

计时器作业功能的范围

我是第一次写计时器工作.我正在关注可以通过谷歌搜索获得的示例作为我的参考.

在许多此类文章中,我遇到了计时器作业功能被激活到网站集级别或站点级别.

我觉得这很奇怪,因为特定的Web应用程序只能有一个计时器作业实例.

是不是所有计时器作业功能都应限定为Web应用程序?

我在这里错过了什么吗?

sharepoint moss sharepoint-2007 timer-jobs

8
推荐指数
1
解决办法
9428
查看次数

lex/yacc和fslex/fsyacc有什么区别?

我正在学习F#,因为我想写一个词法分析器和解析器.我对这种处理有一点经验,但确实需要正确地学习它和F#.

在学习F#的lexing/parsing功能时,学习lex和yacc是否足够?

或者是否存在一些差异,这意味着lex/yacc的代码将无法与fslex和fsyacc一起使用?

f# yacc lex fsyacc fslex

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

如何编写调用WCF服务的代码并在需要时从Kerberos回退到NTLM?

我需要以编程方式调用WCF服务.该服务可以使用NTLM或Kerberos身份验证托管,并且需要在两者之间工作.也就是说,如果通过Kerberos连接到服务失败,那么它应该回退到NTLM.

这是我用于Kerberos身份验证的代码(如果相关,该服务托管在SharePoint 2010中,并且是从Web部件调用的):

public static SiteMembershipSvc.SiteMembershipServiceClient InitialiseSiteMembershipService(string url)
{
    var binding = new BasicHttpBinding();
    binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
    url = url.EndsWith("/") ? url + SiteMembershipAddress : url + "/" + SiteMembershipAddress;
    var endpoint = new EndpointAddress(url);
    var proxy = new SiteMembershipSvc.SiteMembershipServiceClient(binding, endpoint);
    proxy.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
    return proxy;
}
Run Code Online (Sandbox Code Playgroud)

在NTLM环境中运行时在代理上调用方法会产生错误:

HTTP请求未经授权使用客户端身份验证方案"Negotiate".从服务器收到的身份验证标头是"NTLM".

Note: The URL may be in another web application on another server. I can't check what authentication the web part's web app runs under and assume …

authentication sharepoint wcf ntlm kerberos

8
推荐指数
1
解决办法
2963
查看次数

将文档存储在SharePoint文档库中的文件系统而不是数据库中

在SharePoint文档库中,有没有办法将文档存储在文件系统而不是数据库中?

sharepoint persistence document-library

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

在CSS中使用HTML标记名称,类或ID?

在为页面设计HTML和CSS时,我应该何时使用

img.className

.className

#idName

还是其他一些变种?

有指导方针或建议吗?

答案摘要

谢谢所有的回答者 - 这里有一些很棒的东西!

css

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

我可以通过将其与会话ID相关联来使我的ASP.NET FormsAuthentication cookie更安全吗?

我们注意到可以在另一台机器上重新创建ASP.NET FormsAuthentication cookie的副本,允许第二台机器进行身份验证而无需登录.

一个建议的解决方案是将会话ID存储在内部FormsAuthenticationTicket.UserData并检查两个值是否在内部匹配Application_AuthenticateRequest().

我们正在使用:

FormsAuthenticationTicket.IsPersistent = false;
Run Code Online (Sandbox Code Playgroud)

这种将FormsAuthentication cookie与会话ID相关联的方法是一个好主意吗?

asp.net security cookies forms-authentication

6
推荐指数
1
解决办法
3850
查看次数

任何人都可以劫持(通过js)asp.net表单cookie并更改过期日期吗?

任何人都可以劫持(通过js)asp.net表单cookie并更改过期日期吗?

什么能阻止他们抓住它并改变过期日期?即有效地让用户保持登录状态?

更新

.net框架是否构成身份验证.cookie是否依赖于cookie的到期日期还是它已经过时了?

asp.net forms-authentication

6
推荐指数
2
解决办法
785
查看次数

SharePoint的数据绑定语法是否有一个很好的参考?

我正在使用SharePoint Designer将asp服务器控件放入我的SharePoint XSLT中.我发现将值预先填充到表单中,或提供与SharePoint定义的布局(隐藏字段等)不同的体验非常方便.

例如,如果我这样定义它,我可以使用asp:TextBox控件而不是SharePoint:FormField控件:

<xsl:stylesheet ... xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">
   <xsl:param name="Name" />

   <xsl:template match="/">
       <!-- omitted for clarity -->

       <asp:TextBox id="txtName" runat="server" Text="{$Name}"
         __designer:bind="{ddwrt:DataBind('i','txtName','Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@MySharePointField')}"

   </xsl:template>
</xsl:stylesheet>
Run Code Online (Sandbox Code Playgroud)

我用谷歌搜索但似乎无法找到ddwrt:DataBind方法的参数的良好参考.

有人知道吗?

xslt sharepoint sharepoint-designer sharepoint-2007

6
推荐指数
1
解决办法
6340
查看次数

6
推荐指数
1
解决办法
1万
查看次数

Azure SQL 故障转移组,宽限期是什么意思?

我目前正在阅读:https://docs.microsoft.com/en-us/azure/sql-database/sql-database-auto-failover-group,我很难理解自动故障转移策略:

默认情况下,故障转移组配置有自动故障转移策略。SQL 数据库服务在检测到故障并且宽限期已过后触发故障转移。由于影响的规模,系统必须验证 SQL 数据库服务的内置高可用性基础结构无法缓解中断。如果要从应用程序控制故障转移工作流,可以关闭自动故障转移。

在 ARM 模板中定义故障转移组时:

{
  "condition": "[equals(parameters('redundancyId'), 'pri')]",
  "type": "Microsoft.Sql/servers",
  "kind": "v12.0",
  "name": "[variables('sqlServerPrimaryName')]",
  "apiVersion": "2014-04-01-preview",
  "location": "[parameters('location')]",
  "properties": {
    "administratorLogin": "[parameters('sqlServerPrimaryAdminUsername')]",
    "administratorLoginPassword": "[parameters('sqlServerPrimaryAdminPassword')]",
    "version": "12.0"
  },
  "resources": [
    {
      "condition": "[equals(parameters('redundancyId'), 'pri')]",
      "apiVersion": "2015-05-01-preview",
      "type": "failoverGroups",
      "name": "[variables('sqlFailoverGroupName')]",
      "properties": {
        "serverName": "[variables('sqlServerPrimaryName')]",
        "partnerServers": [
          {
            "id": "[resourceId('Microsoft.Sql/servers/', variables('sqlServerSecondaryName'))]"
          }
        ],
        "readWriteEndpoint": {
          "failoverPolicy": "Automatic",
          "failoverWithDataLossGracePeriodMinutes": 60
        },
        "readOnlyEndpoint": {
          "failoverPolicy": "Disabled"
        },
        "databases": [
          "[resourceId('Microsoft.Sql/servers/databases', variables('sqlServerPrimaryName'), variables('sqlDatabaseName'))]"
        ]
      },
      "dependsOn": [
        "[variables('sqlServerPrimaryName')]",
        "[resourceId('Microsoft.Sql/servers/databases', …
Run Code Online (Sandbox Code Playgroud)

azure azure-sql-database automatic-failover

6
推荐指数
1
解决办法
1922
查看次数