relying party session security token lifetime

I'm using Windows Identity Foundation (WIF) for authentication in my ASP.NET MVC 3 project. I've created simple security token service (STS) using default template available in the SDK (ASP.NET site with forms authentication). Everything works fine, apart from the fact that my security session token lifetime (the one that is being generated on the relying party (RP), ie ASP.NET MVC sit

依赖方会话安全令牌生存期

我在ASP.NET MVC 3项目中使用Windows Identity Foundation(WIF)进行身份验证。 我已经使用SDK中提供的默认模板(带有表单身份验证的ASP.NET站点)创建了简单的安全令牌服务(STS)。 一切正常,除了我的安全会话令牌生命周期(在依赖方(RP)上生成的生命周期,即ASP.NET MVC网站)似乎设置为10分钟,尽管STS生成的安全令牌具有终身1小时。 我试图在SessionAuthenticationModule_SessionSecurityTokenReceived事件中更改S

How to redirect to a dynamic login URL in ASP.NET MVC

I'm creating a multi-tenancy web site which hosts pages for clients. The first segment of the URL will be a string which identifies the client, defined in Global.asax using the following URL routing scheme: "{client}/{controller}/{action}/{id}" This works fine, with URLs such as /foo/Home/Index. However, when using the [Authorize] attribute, I want to redirect to a login page which also

如何重定向到ASP.NET MVC中的动态登录URL

我正在创建一个为客户提供页面的多租户网站。 URL的第一部分将是一个字符串,标识客户端,使用以下URL路由方案在Global.asax中定义: "{client}/{controller}/{action}/{id}" 这可以正常工作,具有诸如/ foo / Home / Index之类的URL。 但是,使用[Authorize]属性时,我想重定向到也使用相同映射方案的登录页面。 因此,如果客户端是foo,登录页面将是/ foo / Account / Login,而不是web.config中定义的固定/帐户/登录重

WCF or Web Services (.asmx) for iOS application?

I am fairly new to web development & web services. I have been playing around with traditional web services (.asmx) in .NET using C#. Someone suggested that a lot of services now use WCF and I was wondering if I should learn WCF and use that to communicate with my iOS app. It looks like WCF will be a bit of a learning curve as I don't have any experience in .NET frameworks (little exp

用于iOS应用程序的WCF或Web服务(.asmx)?

我对Web开发和Web服务相当陌生。 我一直在使用C#在.NET中使用传统的Web服务(.asmx)。 有人建议现在有很多服务使用WCF,我想知道是否应该学习WCF并使用它与我的iOS应用程序进行通信。 它看起来像WCF将有点学习曲线,因为我没有任何.NET框架的经验(在C#中很少有经验)。 我不确定是否值得花时间在WCF上,还是应该使用传统的编写Web服务的方式。 有什么建议么? 我建议避开WCF,并使用Microsoft Web API或ServiceStac

Different WSDL ASMX,WCF web

I've got asmx web-service, which is succefully consumed from other clients(.NET,Delphi). I try come to wcf, and write the same logic at WCF service(basicHttpBinding for interopability). (.net client consume ok, but delphi 7 couldn't call this service). I start research differences between two services(asmx,wcf) and detect that their wsdl are diffrent: WSDL asmx: <s:element name

不同的WSDL ASMX,WCF web

我有asmx web服务,它从其他客户端(.NET,Delphi)成功地使用。 我试着来到wcf,并在WCF服务(basicHttpBinding for interopability)上编写相同的逻辑。 (.net客户端消耗正常,但德尔福7无法调用此服务)。 我开始研究两种服务(asmx,wcf)之间的差异,并检测他们的wsdl是不同的: WSDL asmx: <s:element name="Test"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1"

Kendo Grid :TypeError: $(...).saveAsExcel is not a function

saveAsExcel is not working and is throwing error.Below is my code: jquery files included: Kenod Grid Export Excel @(Html.Kendo().Grid() .Name("grid").NoRecords("No Records Found(s)").Excel(o => o.AllPages(true).FileName("xyz.xls")) .Columns(columns => { columns.Bound(c => c.FirstName). ClientTemplate("#= FirstName #") .Width(150).Title("

Kendo Grid:TypeError:$(...)。saveAsExcel不是函数

saveAsExcel不工作,并抛出error.Below是我的代码: jquery文件包括: Kenod Grid导出Excel (Html.Kendo().Grid().Name(“grid”).NoRecords(“No Records Found(s)”).Excel(o => o.AllPages(true).FileName(“xyz.xls” )).Columns(columns => {columns.Bound(c => c.FirstName)。ClientTemplate(“#= FirstName#”).Width(150).Title(“First Name”); columns.Bound(c = > c.Email).W

Is it possible to merge or use multiple code analysis dictionary files?

I have a Code Analysis Dictionary file that I use throughout all my projects, so naturally I have it reside in a shared directory and add it to my project as a link. But, I ran into a situation where one of my projects (and only one) needs additional recognized words, so I added an additional Code Analysis Dictionary file specific to the project, but it doesn't seem to get recognized. If I

是否可以合并或使用多个代码分析字典文件?

我有一个代码分析字典文件,我在我所有的项目中都使用它,所以我很自然地将它放在一个共享目录中,并将其作为链接添加到我的项目中。 但是,我遇到了一个情况,我的一个项目(只有一个)需要额外的识别字,所以我添加了一个特定于该项目的额外代码分析字典文件,但似乎没有被识别。 如果我删除了链接的公共文件,那么特定的项目文件将起作用。 我想知道是否有办法以某种方式利用多个文件进行项目? 这是我经常做的事,没有

Why would finding a type's initializer throw a NullReferenceException?

This has got me stumped. I was trying to optimize some tests for Noda Time, where we have some type initializer checking. I thought I'd find out whether a type has a type initializer (static constructor or static variables with initializers) before loading everything into a new AppDomain . To my surprise, a small test of this threw NullReferenceException - despite there being no null value

为什么会发现一个类型的初始化器抛出一个NullReferenceException?

这让我很难过。 我试图优化Noda Time的一些测试,我们有一些类型初始化程序检查。 我想在将所有内容加载到一个新的AppDomain之前,我会发现一个类型是否有一个类型初始值设定项(静态构造函数或具有初始值设定项的静态变量)。 令我惊讶的是,尽管在我的代码中没有空值,但是对此的一个小测试抛出了NullReferenceException 。 它仅在编译时没有调试信息时抛出异常。 这是一个简短但完整的程序来演示这个问题: using Syste

Portable Class Library equivalent to MethodBase.GetCurrentMethod

s there Portable Class Library equivalent to MethodBase.GetCurrentMethod? I'm new to PCLs. I'm justing looking into whether I can use a PCL to hold some client code that will definitely be used on Silverlight and may be used elsewhere. Having scanned the source, I can see plenty of calls to MethodBase.GetCurrentMethod which doesn't seem to exist in the PCL. ** EDIT ** I've

相当于MethodBase.GetCurrentMethod的可移植类库

那里的便携式类库相当于MethodBase.GetCurrentMethod? 我是PCL新手。 我正在考虑是否可以使用PCL来保存一些客户端代码,这些客户端代码一定会在Silverlight上使用,并可能在其他地方使用。 扫描了源代码后,我可以看到很多对MethodBase.GetCurrentMethod的调用,它似乎不存在于PCL中。 **编辑** 我把这个样本从图书馆里撕下来了。 IsNullOrEmpty()使用String.IsNullOrWhiteSpace(String),它似乎不可用,所以这是

ComboBox Event Triggered for the Change

Suppose I have a C# .NET windows forms application with a ComboBox that selects string values and also accepts the entry of new values. What is the most efficient way to trigger a event handling method when either a preexisting value of the combo box is selected, or a newly entered value is typed/entered into the combo box? I've tried options like the SelectedIndexChanged event, but I

组合框事件触发了更改

假设我有一个C#.NET Windows窗体应用程序,它带有一个ComboBox,用于选择字符串值并接受新值的输入。 什么时候触发事件处理方法最有效的方法是什么? 选择组合框的预先存在的值,或者 键入/输入组合框中新输入的值? 我尝试过像SelectedIndexChanged事件这样的选项,但是当有新输入的值时,我似乎无法触发事件。 我会认为这是一个相当简单的事情,但我不确定。 我可以捕捉Enter键,但这似乎是一个半破碎的假设,即这

Does .NET connection pooling affect RAND calls?

The T-SQL RAND function is documented to continue the sequence from the original seed value for the same database connection. For example, if you open a new window in SSMS and run select rand(7),rand(),rand() and then in a separate query (but the same window and therefore the same connection) run select rand(),rand(),rand() , take note of all six values. Repeat the two calls in the same order

.NET连接池是否会影响RAND调用?

记录T-SQL RAND函数以继续从相同数据库连接的原始种子值开始的序列。 例如,如果你在SSMS中打开一个新窗口并运行select rand(7),rand(),rand() ,然后在一个单独的查询中(但同一个窗口,因此连接相同)运行select rand(),rand(),rand() ,注意所有六个值。 以相同的顺序重复这两个调用,看看生成了完全相同的值,证明原始种子值7决定后3个随机结果,即使它们作为单独的语句运行,因为它们在相同的连接。 我想知道这是否会