当前位置: 代码迷 >> PB >> pb11.2的.net web service可以发布到64位 windows2003上吗?如果可以需要如何做
  详细解决方案

pb11.2的.net web service可以发布到64位 windows2003上吗?如果可以需要如何做

热度:134   发布时间:2016-04-29 09:40:12.0
pb11.2的.net web service可以发布到64位 windows2003上吗?如果可以需要怎么做?
pb11.2做的一个web service应用,打包成msi安装程序后,在本地的windowsxp上可以发布并运行,
但是在64位的windows2003服务器上(英文版)上能发布但无法通过其自身的测试。
测试方法为pb提供的,访问http://localhost/webservice/TestWebService.htm

结果出错:
在google上搜索所是64位系统的原因。
Server Error in '/webservice' Application.
--------------------------------------------

Could not load file or assembly 'webservice' or one of its dependencies. An attempt was made to load a program with an incorrect format. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: Could not load file or assembly 'webservice' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Assembly Load Trace: The following information can be helpful to determine why the assembly 'webservice' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Stack Trace: 


[BadImageFormatException: Could not load file or assembly 'webservice' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
  System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
  System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +1848
  System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +456
  System.Reflection.Assembly.Load(String assemblyString) +88
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +328

[ConfigurationErrorsException: Could not load file or assembly 'webservice' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
  System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +4616
  System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +888
  System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +328
  System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +104
  System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +1336
  System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +168
  System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +728
  System.Web.Compilation.BuildManager.CompileGlobalAsax() +120
  System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +2920

[HttpException (0x80004005): Could not load file or assembly 'webservice' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
  System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +200
  相关解决方案