编译时遇到的简单问题 项目-〉填加引用system.runtime.remoting.dll 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 还需请教,我以将system.runtime.remoting.dll加入了引用,问题依旧存在我将问题的详细清单列出来,请大家帮忙。其他信息:远程处理配置失败,异常为 System.IO.FileNotFoundException: 找不到文件或程序集名称“System.Runtime.Remoting”,或找不到它的一个依赖项。文件名:“System.Runtime.Remoting” at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark) at System.Reflection.Assembly.Load(String assemblyString) at System.Runtime.Remoting.RemotingConfigInfo.LoadType(String typeName, String assemblyName) at System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry(ChannelEntry entry) at System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData configData) at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData)Fusion log follows: === Pre-bind state information ===LOG: DisplayName = System.Runtime.Remoting (Partial)LOG: Appbase = C:\npb\example\Hosted\Hosted\RemoteHost\bin\Debug\LOG: Initial PrivatePath = NULLCalling assembly : (Unknown).===LOG: Found application configuration file (C:\npb\example\Hosted\Hosted\RemoteHost\bin\Debug\RemoteHost.exe.config).LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).LOG: Post-policy reference: System.Runtime.RemotingLOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting.DLL.LOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting/System.Runtime.Remoting.DLL.LOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting.EXE.LOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting/System.Runtime.Remoting.EXE.。 我看了下日志,系统试图“download of new URL”其中就包含我的程序路径,如果这样的话,我将动态库拷过来肯定可以,但为什么 declude(Visual C#) 说的方法不行呢?我也觉得就应该是增加项目的引用就可以了。可是还是不行,还有哪里出错了呢? 是吗?好吧我把代码粘出来主机服务器代码:using System;namespace Host{ /// <summary> /// Class1 的摘要说明。 /// </summary> public class HostedServer:MarshalByRefObject { public string GetServerResponse() { return "Come on baby"; } }} 主机服务器配置文件:<configuration> <system.runtime.remoting> <application> <service> <wellknown mode="SingleCall" type="Host.HostedServer,HostedServer" objectUri = "HostedServer.soap" /> </service> </application> </system.runtime.remoting> </configuration> 主机实用程序:using System;using System.Runtime.Remoting;public class RemoteHost{ public static void Main() { RemotingConfiguration.Configure("RemoteHost.exe.config"); Console.WriteLine("press key to exit"); Console.ReadLine(); }}主机实用程序配置文件:RemoteHost.exe.config<configuration> <system.runtime.remoting> <application name ="HostedServer"> <service> <wellknown mode="SingleCall" type="Host.HostedServer,HostedServer" objectUri="HostedServer.soap" /> </service> <channels> <channel port="8000" type="System.Runtime.Remoting.Channels.Http.HttpChannel,System.Runtime.Remoting" /> </channels> </application> </system.runtime.remoting> </configuration> 以上代码编译没有问题,运行时报错。 可是我已经在项目管理其中填加引用system.runtime.remoting.dll 现在又有运行了一下.net提供的关于remote 的例子,出的问题好像还是这个问题。这会不会时windows环境的配置问题呢? C#文件加密 怎样修改在VS中添加本地数据库的默认位置 动态显示问题 ASP.NET 未被授权访问??? Hashtable与Arrylist有什么区别?????????????---------在线等待 关于水晶报表分页的问题,高手快来帮忙 windowsformscomponenteditor怎么用啊,思归大侠请进? 请教高手,在线等,急着用!!! c# 做个修改exe的ico xml的读写问题,本人很鸟的。马上结帐 请问C#能不能像C++那样可以开发出高效的游戏? 如何屏蔽用户可能输入的转义字符?
我将问题的详细清单列出来,请大家帮忙。
其他信息:远程处理配置失败,异常为 System.IO.FileNotFoundException: 找不到文件或程序集名称“System.Runtime.Remoting”,或找不到它的一个依赖项。
文件名:“System.Runtime.Remoting”
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(String assemblyString)
at System.Runtime.Remoting.RemotingConfigInfo.LoadType(String typeName, String assemblyName)
at System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry(ChannelEntry entry)
at System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData configData)
at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData)Fusion log follows:
=== Pre-bind state information ===
LOG: DisplayName = System.Runtime.Remoting
(Partial)
LOG: Appbase = C:\npb\example\Hosted\Hosted\RemoteHost\bin\Debug\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===LOG: Found application configuration file (C:\npb\example\Hosted\Hosted\RemoteHost\bin\Debug\RemoteHost.exe.config).
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: System.Runtime.Remoting
LOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting.DLL.
LOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting/System.Runtime.Remoting.DLL.
LOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting.EXE.
LOG: Attempting download of new URL file:///C:/npb/example/Hosted/Hosted/RemoteHost/bin/Debug/System.Runtime.Remoting/System.Runtime.Remoting.EXE.。
主机服务器代码:
using System;namespace Host
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
public class HostedServer:MarshalByRefObject
{
public string GetServerResponse()
{
return "Come on baby";
}
}
}
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="SingleCall" type="Host.HostedServer,HostedServer" objectUri = "HostedServer.soap" />
</service>
</application>
</system.runtime.remoting>
</configuration>
using System;
using System.Runtime.Remoting;public class RemoteHost
{
public static void Main()
{
RemotingConfiguration.Configure("RemoteHost.exe.config");
Console.WriteLine("press key to exit");
Console.ReadLine(); }
}
主机实用程序配置文件:RemoteHost.exe.config
<configuration>
<system.runtime.remoting>
<application name ="HostedServer">
<service>
<wellknown mode="SingleCall" type="Host.HostedServer,HostedServer" objectUri="HostedServer.soap" />
</service>
<channels>
<channel port="8000" type="System.Runtime.Remoting.Channels.Http.HttpChannel,System.Runtime.Remoting" />
</channels>
</application>
</system.runtime.remoting>
</configuration> 以上代码编译没有问题,运行时报错。