问题列表 - 第14615页

如何通过WSHttpBinding安全性和GZip压缩来构建自定义绑定?

我在这里面临一个问题.我正在做一个客户端/服务器项目,这是WCF Web服务调用来获取数据.由于传输的大量数据,我必须以编程方式(而不是通过配置文件)将我的绑定更改为自定义绑定.

我正在创建一个新的用户定义绑定,也就是自定义绑定.该类的例子是:

public class MyCustomBinding : CustomBinding    
Run Code Online (Sandbox Code Playgroud)

并覆盖函数BindingElementCollection:

public override BindingElementCollection CreateBindingElements()
{
   WSHttpBinding wSHttpBinding = new WSHttpBinding("RMSKeberosBinding"); //this is to load the configuration from app.config. because i want to copy the setting of wsHttpConfig to my custom binding.

   BindingElementCollection wSHttpBindingElementCollection = wSHttpBinding.CreateBindingElements();

   TransactionFlowBindingElement transactionFlowBindingElement = wSHttpBindingElementCollection.Remove<TransactionFlowBindingElement>();
   SymmetricSecurityBindingElement securityElement = wSHttpBindingElementCollection.Remove<SymmetricSecurityBindingElement>();
   MessageEncodingBindingElement textElement = wSHttpBindingElementCollection.Remove<MessageEncodingBindingElement>();
   HttpTransportBindingElement transportElement = wSHttpBindingElementCollection.Remove<HttpTransportBindingElement>();

   GZipMessageEncodingBindingElement gzipElement = new GZipMessageEncodingBindingElement(); // this is from microsoft sample. i want to add gzip as a compress to …
Run Code Online (Sandbox Code Playgroud)

c# wcf gzip custom-binding

5
推荐指数
1
解决办法
2989
查看次数

在数据库中存储OpenID信息

这是一个数据库问题.我已经安装并运行了一个openid库.

我想在我正在使用的网站上使用OpenID.有三种类型的用户.

  1. 使用电子邮件/密码进行身份验证的命名帐户
  2. 使用OpenID进行身份验证的命名帐户
  3. 使用OpenID进行身份验证的匿名帐户

所有这些用户都存储在同一个表中,只是注释表.已命名的帐户会链接到该帐户可以管理的博客.匿名用户可以对博客上的文章发表评论,但他们无法做任何其他事情.如果匿名用户注册了某个帐户,我想自动将该用户的旧评论转移到指定帐户.我目前通过让用户填写具有唯一名称和有效电子邮件的表单来实现此目的.

目前,使用以下架构将两组帐户存储在同一个表中.(是的,它是铁路迁移)

create_table :users do |t|
  t.string :name #unique because it maps to a subdomain
  t.string :openid_url #unique
  t.string :email #unique 
  t.string :password_hash
  t.string :password_salt
  t.boolean :guest #Anonymous user flag

  t.timestamps
end
Run Code Online (Sandbox Code Playgroud)

(openid_url唯一的做法是防止多个帐户被连接到同一个openid.这email是唯一的,因为用户使用电子邮件/密码登录)

我正在使用此设置我遇到了Google的OpenID实施问题.使用Google for OpenID的每个用户都具有相同的网址:https://www.google.com/accounts/o8/ud.

我如何支持使用谷歌作为openid提供商,因为它的网址并不是每个用户都是唯一的?(请记住存在的约束)

注意:Google帐户可以使用互联网上的任何有效电子邮件地址,因此我不能将person@google.com存储在openid_url字段中,因为该电子邮件可能是person@example.com或更糟的是person@yahoo.com!雅虎也使用这种单一的网址方法,所以我也必须支持它们.

openid database-design

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

通过MySQL和SQL Server上的查询生成表DDL

有没有一种简单的方法可以使用Ms或My SQL服务器通过查询提取表DDL信息?(最好是两个?)

例如,使用MySQL Administrator/Navicat for MySql,有一个"DDL"函数,它生成"create table foo(....)"脚本.

有没有办法从查询本身获取此信息,例如:

Select DDL from foo where table_name='bar';
Run Code Online (Sandbox Code Playgroud)

有没有"创建表栏(.....)"还给我?

如果没有 - 任何建议?

mysql database ddl

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

Bash:限制并发作业的数量?

是否有一种简单的方法来限制bash中的并发作业数量?我的意思是当在后台运行多于n个并发作业时进行&阻止.

我知道我可以用ps实现这个 grep-style技巧,但有更简单的方法吗?

bash shell concurrency

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

对象不支持使用jQuery在IE6中执行此操作

出于某种原因,以下javascript行在object doesn't support this actionIE6中给我一个错误:

item = ui.item.get(0);
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?我完全迷失了.

jquery user-interface internet-explorer-6

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

Visual C++相当于GCC的__attribute __((__ package___))

对于某些编译器,有一个结构的打包说明符,例如::

RealView ARM compiler has "__packed"
Gnu C Compiler has "__attribute__ ((__packed__))"
Visual C++ has no equivalent, it only has the "#pragma pack(1)"

我需要一些我可以放入结构定义的东西.

任何信息/黑客/建议?TIA ...

c c++ gcc visual-c++ data-structures

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

Internet Explorer 8如何支持CSS outline属性?

网站表示支持,但以下样式无法呈现.


    <style type="text/css">
        a[href="#"]{outline:#f00 dotted 2px !important}
    </style>
Run Code Online (Sandbox Code Playgroud)

但是,以下内容将呈现


    <style type="text/css">
        a[href="#"]{border:#f00 dotted 2px !important}
    </style>
Run Code Online (Sandbox Code Playgroud)

这是我的文件


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>...</title>
   <link type="text/css" rel="stylesheet" href="../content/style.css" />

</head>
<body>...</body>
</html>
Run Code Online (Sandbox Code Playgroud)

css internet-explorer-8

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

Subclipse冲突解决方案

我和我的朋友使用flex builder(基于eclipse)和subclipse进行项目.

在提交之前我总是更新,但有时我因为冲突而无法提交.然后我使用Team-> Synchronize with Repository,它在右侧显示最新的存储库,在左侧显示我当前的工作副本.它有一个按钮可以从右到左(从最新的存储库到我的工作副本)从所有非冲突中复制.但仍有相互矛盾的路线.

有时我只想从左到右复制,但没有按钮(我的意思是用我的行覆盖存储库文件行).从右到左复制非冲突部分后,我只想提交左侧(我想覆盖并将我的最终文件提交到存储库).由于这些冲突问题我无法承诺.然后我的朋友可以使用Replace With-> Latest from Repository命令获取最新的覆盖版本.

Subclipse文档很薄我在互联网上找不到任何好的指南.你可以像我一样逐步解释subclipse冲突解决吗?显示步骤的视频或快速修复它的外来技术将很好.是否有更好的(更简单的)eclipse源代码控制解决方案?

(我使用subclipse 1.4)

eclipse subclipse svn version-control

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

16
推荐指数
3
解决办法
5万
查看次数

在建立与集成安全性的连接时,SSPI握手失败,错误代码为0x8009030c

尝试使用JDBC连接连接到SQL Server 2005时出现以下错误.

 Error: 17806, Severity: 20, State: 2.
 Logon       SSPI handshake failed with error code 0x8009030c while establishing 
             a connection with integrated security; the connection has been 
             closed. [CLIENT: 127.0.0.1]
 Logon       Error: 18452, Severity: 14, State: 1.
 Logon       Login failed for user ''. The user is not associated with a trusted 
             SQL Server connection. [CLIENT: 127.0.0.1]
Run Code Online (Sandbox Code Playgroud)

我的连接网址:

jdbc:sqlserver://LOCALHOST:1433;DatabaseName=master;integratedSecurity=true
Run Code Online (Sandbox Code Playgroud)

sql-server sql-server-2005

13
推荐指数
3
解决办法
9万
查看次数