線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1454
推到 Plurk!
推到 Facebook!

发布delphi做的asp.net要注意什么?

缺席
pcplayer99
尊榮會員


發表:146
回覆:790
積分:632
註冊:2003-01-21

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-05-16 17:38:20 IP:218.17.xxx.xxx 未訂閱
为测试 delphi 做 asp.net,随便New了一个工程,用Access的MDB做DataBase. 编译好后,本机跑正常。放到没有装Delphi的VMWare虚拟机的干净系统里,再把所有的DLL都拷贝到Web目录下的Bin目录下,也包括了这几个File: Borland.Data.Common.dll Borland.Data.Provider.dll Borland.Data.Msacc.dll 访问这个asp.net的页面,结果提示这样的错误: The located assembly's manifest definition with name 'Borland.Data.Msacc' does not match the assembly reference 请教各位大大,这是什么问题?
pcplayer99
尊榮會員


發表:146
回覆:790
積分:632
註冊:2003-01-21

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-05-16 19:32:30 IP:218.17.xxx.xxx 未訂閱
错误提示: The located assembly's manifest definition with name 'Borland.Data.Msacc' does not match the assembly reference. 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.IO.FileLoadException: The located assembly's manifest definition with name 'Borland.Data.Msacc' does not match the assembly reference. 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 'Borland.Data.Msacc' could not be loaded. === Pre-bind state information === LOG: DisplayName = Borland.Data.Msacc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b (Fully-specified) LOG: Appbase = file:///C:/GSite LOG: Initial PrivatePath = bin Calling assembly : (Unknown). === LOG: Publisher policy file is not found. LOG: No redirect found in host configuration file (C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet.config). LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\machine.config. LOG: Post-policy reference: Borland.Data.Msacc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=91d62ebb5b0d1b1b LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/gsite/cf6e40b8/3f28e5e7/Borland.Data.Msacc.DLL. LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/gsite/cf6e40b8/3f28e5e7/Borland.Data.Msacc/Borland.Data.Msacc.DLL. LOG: Attempting download of new URL file:///C:/GSite/bin/Borland.Data.Msacc.DLL. WRN: Comparing the assembly name resulted in the mismatch: Minor Version 根据delphi的 help.我也把 bdpmsa20.dll 这个用户Access的dll复制到winnt/system32这个文件夹下了。 但还是出这个错误提示。我该怎么办?
pcplayer99
尊榮會員


發表:146
回覆:790
積分:632
註冊:2003-01-21

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-05-17 15:29:40 IP:218.17.xxx.xxx 未訂閱
忙了2天,终于找到问题所在。 我猜,多半是版本的问题。我查开发的机器的GAC里,Borland.Data.Msacc 有很多个版本。从1.5, 2.0.0.0, 2.2.0.0, 等等。 我一开始复制到干净没装Delphi的机器上的是2.2.0.0 于是,我找到 2.0.0.0复制过去。这下,错误还是有,但提示不一样的。提示是数据类型转换出错。 到处google,读了无数篇中文/英文的文章,没有人提到这个问题是怎么回事。查Borland的新闻组关于asp.net的组,也没有人提到这个问题。 最后,我在用到数据库的地方,把以前的try .. excpet..end里,以前是不想让页面显示错误信息,因此except里写了其它代码,我加上 raise,让错误直接暴露出来。结果,看到的错误信息,大概是和连接字符串有点关系。 我立即查连接字符串,呵呵,这个由Delphi2005的IDE自动生成的连接字符串里关于msacc.dll的版本号的声明是2.0.0.0,而我用2.0.0.0的msacc.dll却有出数据类型转换错误。于是,我还是换回2.2.0.0的msacc.dll,然后把连接字符串里的版本号改为2.2.0.0。 于是,在干净机器里本来一直出错的asp.net,正常跑起来了。 这里,实际上是 Delphi2005 的一个Bug导致我找不到错误所在。因为在开发的机器上,连接字符串里的版本号的确是2.0.0.0,却运行正常。而且我把开发机器的GAC里的2.0.0.0的Borland.Data.msacc删除掉,只剩2.2.0.0版本的,它也运行正常,因此,没法猜想到连接字符串里的版本描述上去。 而且,这个连接字符串还是Delphi2005自己的IDE生成的。 如果连接字符串里关于Msacc.dll的版本描述是2.0.0.0,而我开发的机器上又只有2.2.0.0的msacc.dll,那么,应该会出现和干净机器上的错误同样的错误啊。但它又没出错。因此很难让人想到是连接字符串里的版本号的错误。我想,这应该算是Delphi2005的一个小BUG
系統時間:2024-05-17 11:41:17
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!