Win7下VS2010使用“ASP.Net 3.5 Claims-aware Template”创建ClaimsAwareWebSite报"HRESULT: 0x80041FEB"错误的解决办法

问题描述:

使用VS2010的WIF开发模板创建“Claims-aware ASP.NET Site”、“Claims-aware WCF Service”,下载安装后,创建网站时,报错"HRESULT: 0x80041FEB",其他模板“ASP.NET Security Token Service Web Site”、“WCF Security Token Service”的STS时无此问题;

问题分析:

插件发布地址http://visualstudiogallery.msdn.microsoft.com/34783f43-91b0-42ee-90f4-b82bdb4ac91f?SRC=VSIDE有就此问题的解决方案,此问题由插件自身的Bug导致。

The Template has a bug which can result in the error "HRESULT: 0x80041FEB" after trying to create a new project out of it. To resolve the problem follow these instructions:

After you have installed the template, open the file "%AppData%\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\ASP.Net 3.5 Claims-aware Template\1.0\~PC\ProjectTemplates\csClaimsAwareASPNETSite.zip\ClaimsAwareASPNETSite.webproj" with Notepad++ or any similar advanced text-editor (it should be possible to display special characters/bytes). The content of the file is simply (without the "---" lines which mark beginning and end of the file content):

---

C#

$targetframeworkversion$

---

However, at the end of the second line (and therefor at the end of the file) there's a NUL byte/character (of the byte value 0x00) which will be displayed as such only in an advanced text-editor like Notepad++, in the standard Notepad editor it will be displayed as a space character. No matter in what editor you are and how it's displayed to you, delete this last character, so that the file will end with the $ sign, and save the file. Now you can use the template in Visual Studio without any more errors.

但在“"%AppData%\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\”目录下未能找到文件夹“ASP.Net 3.5 Claims-aware Template”,故暂时无法采用去掉空格的办法。

问题解决:

以创建“Claims-aware ASP.NET Site”时遇到问题的解决方法为例:

一、本机搜索关键字“ClaimsAwareASPNETSite.webproj”,在如下目录找到模板安装文件夹,

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\Web\CSharp\0

二、复制该文件夹创建到,“%AppData%\Local\Microsoft\VisualStudio\10.0\Extensions\Microsoft\”下,路径规则同其他模板;

三、再次安装VS插件,新插件会覆盖第二步手动创建的文件,从而可以修改的“ClaimsAwareASPNETSite.webproj”文件;

四、打开该文件,按英文描述,去除第二行末尾的空格;

Win7下VS2010使用“ASP.Net 3.5 Claims-aware Template”创建ClaimsAwareWebSite报"HRESULT: 0x80041FEB"错误的解决办法

五、重启VS2010,再次使用此模板,问题解决,模板ClaimsAware网站可创建成功。

PS:创建Claims-aware WCF Service时也会遇到同样问题,解决办法类似。

writen by Bob Pan@20140615

 

你可能感兴趣的:(template)