Visual Studio 2010 Web 部署项目错误
我在 Visual Studio 2010 中有一个 Web 部署项目,无法在 Windows Server 2008 R2 机器上安装,并出现错误 1603。打开 msi 日志记录后,我看到:
ERROR : [06/13/2011 10:54:15:722] [RegisterAspNet]:
The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.
这确实是一个 64 位机器和我正在尝试的应用程序池安装确实是 64 位(启用 32 位应用程序是错误的,应该是这样)....但我的所有 dll 都是使用任何 CPU 构建的,并且 vdproj 本身已设置目标平台到 x64...所以我不知道为什么会失败。
我还尝试为服务器启用 IIS 6 兼容性选项,因为我读到其他人也遇到过类似的问题,这些问题已通过这样做得到解决...但这样做没有什么区别。
有人遇到过这种情况或者有什么建议吗?
更新:有趣的是安装失败并出现两个完全冲突的错误:
Running process 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn "W3SVC/1/Root/ISV\xxx"' silently...
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Process Call Result Code: '0' Process Exit Code: '1'.
ERROR : [06/13/2011 12:21:16:329] [RegisterAspNet ]: The error indicates that IIS is in 32 bit mode, while this application is a 64 bit application and thus not compatible.
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Trying 32 bit version of 'aspnet_regiis.exe'...
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Reading registry value Path from key 'HKLM\Software\Microsoft\ASP.NET\4.0.30319.0'...
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: RESULT Path =
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Running process 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn "W3SVC/1/Root/ISV\xxx"' silently...
INFO : [06/13/2011 12:21:16:438] [RegisterAspNet ]: Process Call Result Code: '0' Process Exit Code: '1'.
ERROR : [06/13/2011 12:21:16:438] [RegisterAspNet ]: The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.
ERROR : [06/13/2011 12:21:16:438] [RegisterAspNet ]: FAILED: -2147024895
ERROR : [06/13/2011 12:21:16:438] [RegisterAspNet ]: Custom Action failed with code: '0'
INFO : [06/13/2011 12:21:16:438] [RegisterAspNet ]: Custom Action completed with return code: '1'
在上面,它说 IIS 处于 32 位模式...然后它说它处于 64 位模式...不知道这里发生了什么.. 。
I have a web deployment project in Visual Studio 2010 that is failing to install on a Windows Server 2008 R2 box with error 1603. After turning on msi logging, I see:
ERROR : [06/13/2011 10:54:15:722] [RegisterAspNet]:
The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.
This is indeed a 64 bit box and the app pool I'm trying to install to is indeed 64 bit (Enable 32 bit applications is false, and should be this way)....but all of my dlls are built with Any CPU and the vdproj itself has target platform set to x64...so I don't know why this is failing.
I've also tried enabling IIS 6 Compatibility options for the server, as I've read about others who have had similar problems that have been fixed by doing this...but do so makes no difference.
Anyone encountered this or have any suggestions?
UPDATE: Sort of interesting is that the install fails with two completely conflicting errors:
Running process 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn "W3SVC/1/Root/ISV\xxx"' silently...
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Process Call Result Code: '0' Process Exit Code: '1'.
ERROR : [06/13/2011 12:21:16:329] [RegisterAspNet ]: The error indicates that IIS is in 32 bit mode, while this application is a 64 bit application and thus not compatible.
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Trying 32 bit version of 'aspnet_regiis.exe'...
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Reading registry value Path from key 'HKLM\Software\Microsoft\ASP.NET\4.0.30319.0'...
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: RESULT Path =
INFO : [06/13/2011 12:21:16:329] [RegisterAspNet ]: Running process 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe' with parameters ' -norestart -sn "W3SVC/1/Root/ISV\xxx"' silently...
INFO : [06/13/2011 12:21:16:438] [RegisterAspNet ]: Process Call Result Code: '0' Process Exit Code: '1'.
ERROR : [06/13/2011 12:21:16:438] [RegisterAspNet ]: The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.
ERROR : [06/13/2011 12:21:16:438] [RegisterAspNet ]: FAILED: -2147024895
ERROR : [06/13/2011 12:21:16:438] [RegisterAspNet ]: Custom Action failed with code: '0'
INFO : [06/13/2011 12:21:16:438] [RegisterAspNet ]: Custom Action completed with return code: '1'
In the above, it says IIS is in 32 bit mode...then it says it's in 64 bit mode...not sure what's going on here...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在类似的 VS2010 Web 应用程序部署项目(多年来一直完美运行)中对自定义操作进行更改时,我突然开始在测试服务器上收到完全相同的错误序列。 Google 将我带到这里和许多类似的页面,例如 应用程序安装错误 IIS 处于 32 位模式并且 IIS处于 64 位模式。但我的 URL 路径中没有
/
、\
或任何其他非字母字符!...注释了所有新代码更改,重新构建,重试..没有喜悦-同样的错误。嗯?
以前构建的 .msi 包显示了完全相同的行为(几天前工作正常!),所以我认为问题一定是特定于机器的。
嗯,是的,我也在玩一些应用程序池设置,微调所需的模组。但这把 IIS 搞得一团糟,现有网站可以工作,但新网站却无法安装?!被迫重新安装的视角{ ASP.NET |互联网信息服务 |上面的其他网络应用程序}并没有让我微笑..
最后我注意到
默认网站
下的列表中有一个网络应用程序 - 我正在对其进行更改..嗯?!但所有最近的安装都在出现“自定义操作失败:1603”错误后回滚,那么它在这里做什么?好吧,事实证明我的第一次尝试失败了,但新代码中出现了异常。据报道,但 MSI 并未回滚安装。随后的每一次尝试都只是偶然发现已经存在的文件和文件夹。
因此,在重试之前必须手动清理中断安装会话的剩余内容。符合逻辑。
一旦我删除了这些,所有
.msi
(旧的和新的)都开始像以前一样完美地工作。闪亮的! :)但想象一下,如果错误消息显示“文件已存在..”之类的内容,修复起来会有多容易?
引用链接页面中的答案:
微软的某人必须为此而死。 :)
While making changes to Custom Actions in a similar VS2010 Web App Deployment project (which worked perfectly for years), i suddenly started receiving the same exact error sequence on my test server. Google brought me here and to many similar pages, e.g. Application installation error IIS is in 32 bit mode AND IIS is in 64 bit mode. But there are no
/
,\
or any other non-letter characters in my URL paths!..Commented all the new code changes, rebuilt, retried .. no joy - same errors. Hm?
Previously built
.msi
packages showed exactly the same behavior (working fine just a few days ago!), so i figured that the problem must be machine specific.Well, yes i was also playing with some AppPool settings, fine-tuning the desired mods. But this messing up IIS so badly, that while existing sites work, new ones cannot be installed?! A perspective of being forced to reinstall { ASP.NET | IIS | other web-apps on top of it } did not make me smile..
Then finally i noticed a webapp in the list under
Default Web Site
- the one i'm making changes to.. Hm?! But all recent installations rolled back after "Custom Action failed: 1603" error, so what is it doing here??Well, it turns out my very first try failed with exception in new code. It was reported, but MSI did not roll back the installation. Every subsequent attempt was simply stumbling on files and folders that already existed.
So, leftovers from borked install session must be cleaned up manually before retries. Logical.
Once i deleted those, all
.msi
s (old and new) started working again perfectly as before. Shiny! :)But imagine how easy would it be to fix, if the error message said smth like "File already exists.."?
To quote an answer from linked page:
Somebody at Microsoft has to die for this. :)