作者NewWuman (不攻击奇用谋兵诈)
看板C_Sharp
标题[问题] Remote CodeBase
时间Tue Aug 9 10:01:18 2011
大家好
我有一个dll。该dll被上传到我的google site网路空间。
我想在每次启用程式时从此网路空间得到dll,
所以我的App.config包含下列代码。
想请问问什麽不能工作?
-----------------------------------------------------------------------------
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CarLibrary"
publicKeyToken="5039e5527e57af41">
</assemblyIdentity>
<codeBase version="2.0.0.0"
href ="
https://sites.google.com/site/u901833/CarLibrary.dll">
</codeBase>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
------------------------------------------------------------------------------
程式码以及相关执行档
https://sites.google.com/site/u901833/MyCSharpCodeRemote.zip
麻烦下载後直接解压缩置於C:
补充:
此CarLibrary.dll已经被强命名(strong name)
1.
当此dll其deploy在GAC时
点击CodeBaseClient.exe可以正常工作
(跑出console视窗并且显示"***** Fun with CodeBases ****",
并且跳出一个MessageBox显示"CarLibrary Version 2.0!")
2.
把此dll从GAC里反安装,并把CodeBaseClient.exe.config里的href改为以下
file:///C:\MyCSharpCode\MyAsm\CarLibrary.dll
点击CodeBaseClient.exe可以正常工作
3.
把CodeBaseClient.exe.config里的href改为以下
https://sites.google.com/site/u901833/CarLibrary.dll
点击CodeBaseClient.exe却不能运作
照理说应该此dll应该会被下载至GAC然後程式会运作
不过看来没有
想请问各位前辈是哪理出错
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 60.251.193.123
1F:→ pico2k:你的做法达不到你想要的目的... 08/09 11:58
2F:→ pico2k:请改用Reflection 08/09 13:23
3F:→ NewWuman:谢楼上回应 我知道可以用later-binding来作 08/09 15:36
4F:→ NewWuman:但我在书上看到范例说这样可以work 08/09 15:37
5F:→ pico2k:书上的范例里的网址是http or https? 08/09 16:10
6F:→ NewWuman:是http 但这我检查过 把上述的https改为http放到href仍然 08/09 19:04
7F:→ NewWuman:不能work 08/09 19:05