我一直在使用WIF来验证我们的新网站,STS基于starter-sts实现.
为了使其在负载均衡环境中正常工作,我在global.asax中使用了以下内容来覆盖默认的证书行为.
void onServiceConfigurationCreated(object sender, ServiceConfigurationCreatedEventArgs e)
{
List<CookieTransform> sessionTransforms = new List<CookieTransform>(new CookieTransform[]
{
new DeflateCookieTransform(),
new RsaEncryptionCookieTransform(e.ServiceConfiguration.ServiceCertificate),
new RsaSignatureCookieTransform(e.ServiceConfiguration.ServiceCertificate)
});
SessionSecurityTokenHandler sessionHandler = new SessionSecurityTokenHandler(sessionTransforms.AsReadOnly());
e.ServiceConfiguration.SecurityTokenHandlers.AddOrReplace(sessionHandler);
}
Run Code Online (Sandbox Code Playgroud)
这一切都正常工作,人们已成功使用该系统,但不时我们得到一个爆炸:
ID1014:签名无效.数据可能已被篡改.
在事件日志中,所以我打开了WIF跟踪,并在日志中看到了以下提到的内容.
ID1074:尝试使用ProtectedData API加密cookie时发生CryptographicException(有关详细信息,请参阅内部异常).如果您使用的是IIS 7.5,则可能是由于应用程序池上的loadUserProfile设置被设置为false.
我有一种感觉,正如我想的那样,这导致我走入一条黑暗的小巷,因为我改变了使用RSA的实现,这不应该影响我.
有什么想法可以帮到我吗?
我在VS2017 RC中创建了一个全新的解决方案和项目,由于某种原因我不能使用最新版本的NETStandard.Library包.
项目中没有代码,它是解决方案中的第一个项目.
在NuGet包管理器中,它在下拉列表中列出,但标记为项目阻止.
有任何想法吗?
我有以下requireJS配置.当试图引用包/ ImagingX模块时,我总是得到未定义,即使我可以看到脚本已经加载到firebug中.如果我将有问题的js文件移动到baseUrl目录并删除package /它按预期工作.
我究竟做错了什么?
window.requirejs.config(
{
baseUrl: '/Scripts',
paths: {
"jquery": "./jquery-1.7.1.min",
"jqx": "/Content/Plugins/jqWidgets",
"package" : "/Scripts/packages"
},
urlArgs: "bust=" + (new Date()).getTime(),
shim : {
'jqx/jqxcore': ['jquery'],
'jqx/jqxsplitter': ['jquery','jqx/jqxcore']
}
}
);
window.require(['jquery', 'layoutManager', 'container', 'package/ImagingX'],
function ($,lm,container,px) {
px.Focus();
$(document).ready(function () {
lm.Init(); // Sets up panes
container.Init(); //Set up the containers
});
});
Run Code Online (Sandbox Code Playgroud)
更新15/10/2012
我现在急需解决这个问题,我已经把所有内容都删回了基础,所以这里是新的主文件:
(function () {
requirejs.config({
paths: {
"packages": "packages"
}
});
require([
'packages/testmodule'
],
function (tm) {
alert(tm);
});
})();
Run Code Online (Sandbox Code Playgroud)
以及名为packages的子文件夹中的模块.
define('testmodule',
function …Run Code Online (Sandbox Code Playgroud) $('#tags option').each(function(index, item) {
// var i = this;
//if (jQuery.inArray(i.value, idArray)) {
// i.attr('disabled', 'true');
// }
item.attr('disabled', 'true');
});
Run Code Online (Sandbox Code Playgroud)
如何将item参数转换为Jquery对象,以便我可以使用像.attr这样的所有精确的东西?
谢谢
我已经实现了块UI,因为这个请求可能需要一点时间,当ajax请求启动时,一切按预期工作.
但是当ajax请求完成并显示msgbox时,UI不会解除阻塞!
有任何想法吗?
我正在使用IE8.
$().ajaxStart($.blockUI);
$().ajaxStop($.unblockUI);
function ChangeCompanyState(companyId, state) {
var parameters = "{companyId:" + companyId + ",state:\"" + state + "\"}";
$.ajax({
type: "POST",
url: "Ajax/AjaxFragments.aspx/ChangeCompanyState",
data: parameters,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
if (msg.d.length > 1) {
alert(msg.d);
$.unblockUI();
}
else {
//Theres no message to process success.
window.location.reload();
}
}
});
}
Run Code Online (Sandbox Code Playgroud) 我有一个非常基本的应用程序,正确地重定向到我的STS,并在成功验证后再次返回.
有几个方面我目前不确定它们是如何工作的,并且希望能有一些亮点.
1)你如何使令牌中的声明失效,例如你需要修改某人的声明,但因为令牌仍然有效,重发不会发生10分钟.
2)如何从身份验证服务注销,也退出发布站点.您在应用程序中单击注销,然后再调用
WSFederationAuthenticationModule.FederatedSignOut(new Uri(s), null);
但是,当用户单击指向受保护资源的链接时,它会自动重定向到STS并将用户重新登录.
我确信这些都是简单的问题而且我在某个地方错过了这一点,但任何帮助都会非常感激.
我想将一些图像复制到Windows Phone 8模拟器,但似乎无法找到这样做的方法.
我希望当模拟器运行时,我将能够通过Windows按照真实设备访问某些directorys.
任何想法,我都不禁想到我错过了什么.
干杯
我一直试图通过visualstudio.com上的构建服务器来构建typescript,我已经完成了将typescript引入源代码控制的正常做法.但我得到以下问题:
VSTSC:错误TS5007:构建:无法重新引用文件:'COMPUTE_PATHS_ONLY'.[C:\一个\ SRC \主\ RecruitCloud\RecruitCloud.csproj]
我知道编码问题,但在我看到的所有示例中,错误消息中都指出了罪魁祸首文件.
我开始认为这可能是我正在项目中编译的打字稿文件的数量.
有任何想法吗?
我有一个itemscollection我希望有替代行着色,我看了怎么做但却找不到任何东西,我认为这应该很简单,但也许我错过了一些东西.
这是WPF btw.
<Grid>
<ItemsControl Name="itemsControl">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Path=name}" VerticalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="{Binding Path=something}" VerticalAlignment="Center"/>
<Button Grid.Column="2" Content="Launch" Tag="{Binding}" Height="25" VerticalAlignment="Center" Click="Button_Click"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemContainerStyle>
<Style>
<Setter Property="Control.Margin" Value="5"/>
</Style>
</ItemsControl.ItemContainerStyle>
</ItemsControl>
<Button Height="23" HorizontalAlignment="Right" Margin="0,0,12,12" Name="button1" VerticalAlignment="Bottom" Width="75" Click="button1_Click">Button</Button>
</Grid>
Run Code Online (Sandbox Code Playgroud) 我在文件元数据中存储了一些额外的细节.我正试图弄清楚如何使用c#官方驱动程序查询它.
任何帮助将不胜感激.