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”文件;

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

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

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

writen by Bob Pan@20140615

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值