IsolateApps导致指定的解密密钥具有无效的十六进制字符

编程入门 行业动态 更新时间:2024-10-23 14:29:08
本文介绍了IsolateApps导致指定的解密密钥具有无效的十六进制字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在其中有一个MVC 4现场工作使用身份验证。该网站要求我指定的计算机密钥值。我这样做是通过IIS接口已经取消了在运行时自动生成,生成的密钥值,并在选择为每个应用程序的唯一钥匙

I working on a MVC 4 site which has uses Authentication. The site requires that I specify the Machine Key values. I did this via the IIS interface having deselected the "automatically generate at runtime", generated the key values and having selected "generate a unique key for each application"

在web.config条目看起来是这样的:

The web.config entry looks something like this:

<machineKey decryption="DES" decryptionKey="{hex-key value},IsolateApps" validationKey="{hex-key value},IsolateApps" />;

虽然这似乎是另一个Web项目它会导致指定的解密密钥具有无效的十六进制字符的开发机我现在工作(无论是在IIS-Ex的preSS和IIS 7.5)上的错误做工精细。

While this seems to work fine on another web project it causes the "Decryption key specified has invalid hex characters" error on the dev machine I am working on now (both in IIS-Express and IIS 7.5).

删除,IsolateApps从键值解决了这个问题,但因为我需要在生产中我不此选项,现在要被删除它只是有这个问题当部署。

Removing ",IsolateApps" from the key values solves the issue but since I need this option on in production I dont want to be removing it now only to have this issue when deploying.

怎么办? dev的框是一个SQL 2008 R2盒.NET 2.0和.NET 4.0。

What gives? The dev box is a SQL 2008 R2 box with 2.0 and 4.0.

推荐答案

的 IsolateApps 修改使ASP.NET为您的服务器上的每个应用程序的唯一关键。在运行时,如果你正在为ASP.NET此方法仅适用自动生成密钥。

The IsolateApps modifier causes ASP.NET to generate a unique key for each application on your server. This is only applicable if you are getting ASP.NET to auto-generate keys at runtime.

如果您没有收到ASP.NET自动生成密钥,并用正在而不是指定键 decryptionKey ={十六进制键值},那么办法让每个应用程序就是指定在每个应用程序的Web.config不同的密钥ASP.NET使用不同的密钥。

If you are not getting ASP.NET to auto-generate keys, and are instead specifying the keys using decryptionKey="{hex-key value}", then the way to get ASP.NET to use a different key for each application is to simply specify a different key in each application's Web.config.

在IIS配置界面允许您创建与 IsolateApps 修改,这是无效的明确键一起Web.config文件,在我看来是一个错误在配置GUI。

The IIS config GUI allows you to create a Web.config with an explicit key together with the IsolateApps modifier, which is invalid, and in my opinion is a bug in the config GUI.

更多推荐

IsolateApps导致指定的解密密钥具有无效的十六进制字符

本文发布于:2023-11-13 01:49:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583083.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密钥   字符   IsolateApps   十六进制

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!