如何利用WebDev.WebServer.exe(VS Web服务器)的64位? [英] How to utilize WebDev.WebServer.exe (VS Web Server) in x64?

查看:1430
本文介绍了如何利用WebDev.WebServer.exe(VS Web服务器)的64位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio是86至至少2010版本恶有恶报 更新:这仍然是在VS2010一个问题,有没有原生64位卡西尼支持。我的问题是任何人都可以想办法或知道一个独立的ASP.NET调试服务器的64位2008年度或2010?

Visual Studio is x86 until at least the 2010 release comes around update: this is still an issue in VS2010, there is no native 64bit Cassini support. My question is can anyone think of a way or know of an independent ASP.NET debug server that's x64 for 2008 or 2010?

背景:我们的ASP.NET应用程序运行在Oracle的数据库。由于我们在64位服务器内存的关注以后,我们需要使用Oracle的64位驱动程序(即时客户端)。

Background: Our ASP.NET application runs against Oracle as the DB. Since we're on 64-bit servers for memory concerns later, we need to use Oracle's 64-bit drivers (Instant Client).

设置:

  • 在x64操作系统(XP或Windows 7)
  • 在IIS(6或7中,64位的应用程序池)
  • <一个href="http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winx64soft.html">Oracle 64位的即时客户端(单独的目录,在PATH)
  • 的Visual Studio 2008 SP1 的Visual Studio 2010
  • x64 OS (XP or Windows 7)
  • IIS (6 or 7, both x64 App Pools)
  • Oracle 64-bit Instant Client (Separate Directory, in the PATH)
  • Visual Studio 2008 SP1 Visual Studio 2010

在IIS应用程序池但是运行64位,使用Oracle驱动程序如预期,因为 WebDev.WebServer.exe 是32位的,你会得到一个 BadImageFormatException ,因为它试图加载64位驱动程序的DLL在32位环境。我们所有的开发人员希望能够通过Visual Studio 2008中使用快速调试服务器,但由于它是32位的运行,我们无法给。有些我们遇到的问题是在应用程序启动,所以虽然我们在附加到IIS进程有时这是不够的,追查问题。

In IIS the application pool runs as 64-bit, uses the Oracle drivers as intended, however since WebDev.WebServer.exe is 32-bit you'll get a BadImageFormatException because it's trying to load 64-bit driver DLLs in a 32-bit environment. All of our developers would like to be able to use the quick debug server via Visual Studio 2008, but since it runs as 32-bit we're unable to. Some problems we run into are during application startup, so although we're attaching to the IIS process sometimes that isn't enough to track an issue down.

是否有替代品,或者变通?我们想尽可能地符合我们的开发/缬氨酸/生产层,所以一切都在64位运行将是理想的。

Are there any alternatives, or work-arounds? We would like to match our Dev/Val/Prod tiers as much as possible, so everything running in x64 would be ideal.

有一个很大的变化这个问题,因为这是首次公布,首先VS2010是出于现在,它仍然有此相同的问题,但这个项目我就不会。我们通过2的变化去解决这个问题,所以我希望在发布这些节省了别人的悲伤:

A lot of changes to this question since it was first posted, first VS2010 is out now, it still has the same issues here, however the project I'm on does not. We went through 2 changes to solve this, so I'll post these in hope it saves someone else grief:

第一个解决方案是装载到Oracle的x86 32位以上,64在64位模式下,我们经由web.config中在64位上运行时更换组件的参考,像这样做:

The first solution was to load Oracle x86 in 32-bit more, x64 in 64-bit mode, we did this by replacing the assembly reference when running under 64-bit via the web.config, like this:

<configuration>
  <runtime>
    <assemblyBinding>
      <dependentAssembly>
        <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" processorArchitecture="amd64" />
          <bindingRedirect oldVersion="2.0.0.0-10.9.9.9" newVersion="2.102.3.2" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

这里的关键是的ProcessorArchitecture =AMD64,这意味着更换只能在64位上运行时发生的情况。

The key here is the processorArchitecture="amd64", this means the replacement only happens when running under 64-bit.

请注意,这些版本可能会过时,现在(如果你正在读这篇关怀有关甲骨文公司的具体),这是一个而回。除了配置,我们加载了32位和64位版本的 Oracle.DataAccess 到GAC 。 32位版本的 10.xxx 为Oracle 10g中,64位版本的 2.1xxx ,所以只交换的结合使用&LT; assemblyBinding&GT; 工作

Note these versions may be out of date now (if you're reading this caring about Oracle specifically), this was a while back. In addition to the config, we loaded the 32-bit and 64-bit versions of Oracle.DataAccess into the GAC. The 32-bit versions are 10.xxx for Oracle 10g, the 64-bit versions are 2.1xxx, so just swapping the binding using <assemblyBinding> works.

第二,更长期的解决方案完全动过Oracle客户端,我们现在使用的是的dotConnect为Oracle 我们的LINQ到SQL供应商,因为它使用直接的TCP连接完全管理code,我们没有更多的六十四分之三十二位特定code中的应用,这是更易于维护。

The second, more long-term solution was moving off the Oracle client completely, we're now using dotConnect for Oracle for our Linq-to-SQL provider, and since it's completely managed code using a direct TCP connection, we have no more 32/64-bit specific code in the application, which is much easier to maintain.

我希望任何人认为这还认为后续有用的。如果您对任何一种解决方案问题,我结束了使用,请评论,我会尽力,并详细讲解。

I hope whoever finds this also finds the follow-up useful as well. If you have questions about either solution I ended up using, please comment and I'll try and explain in more detail.

推荐答案

两个思路:

  1. 在卵石的东西连同XSP从项目。
  2. 在一个完全32位环境中测试,部署到64位环境。
  1. Cobble something together with XSP from the Mono project.
  2. Test in a totally 32bit environment, deploy to a 64bit environment.

这篇关于如何利用WebDev.WebServer.exe(VS Web服务器)的64位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆