问大家一个问题呢
我写了一个简单的聊天工具
客户用的是.aspx 服务端用的是winf
在win7 和xp都可以正常运行
但是在2003就报 由于目标机器积极拒绝,无法连接。 127.0.0.1:1520 }
我关闭了防火墙端口
我第一次编写这个
但是我不明白的是在win7和XP都不报错
为什么在2003就要报错呢报错原文
未处理 System.Net.WebException
Message="无法连接到远程服务器"
Source="System"
StackTrace:
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
在 PowerTalkClient.PowerTalkService.FetionInterFace.GetChatInfos(String MyUserName) 位置 D:\Powertalk3\Powertalk\PowerTalkClient\Web References\PowerTalkService\Reference.cs:行号 181
在 PowerTalkClient.FrmMain.timer1_Tick(Object sender, EventArgs e) 位置 D:\Powertalk3\Powertalk\PowerTalkClient\FrmMain.cs:行号 191
在 System.Windows.Forms.Timer.OnTick(EventArgs e)
在 System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 PowerTalkClient.Program.Main() 位置 D:\Powertalk3\Powertalk\PowerTalkClient\Program.cs:行号 19
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Net.Sockets.SocketException
Message="由于目标机器积极拒绝,无法连接。 127.0.0.1:1520"
Source="System"
ErrorCode=10061
NativeErrorCode=10061
StackTrace:
在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
InnerException:
我写了一个简单的聊天工具
客户用的是.aspx 服务端用的是winf
在win7 和xp都可以正常运行
但是在2003就报 由于目标机器积极拒绝,无法连接。 127.0.0.1:1520 }
我关闭了防火墙端口
我第一次编写这个
但是我不明白的是在win7和XP都不报错
为什么在2003就要报错呢报错原文
未处理 System.Net.WebException
Message="无法连接到远程服务器"
Source="System"
StackTrace:
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
在 PowerTalkClient.PowerTalkService.FetionInterFace.GetChatInfos(String MyUserName) 位置 D:\Powertalk3\Powertalk\PowerTalkClient\Web References\PowerTalkService\Reference.cs:行号 181
在 PowerTalkClient.FrmMain.timer1_Tick(Object sender, EventArgs e) 位置 D:\Powertalk3\Powertalk\PowerTalkClient\FrmMain.cs:行号 191
在 System.Windows.Forms.Timer.OnTick(EventArgs e)
在 System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 PowerTalkClient.Program.Main() 位置 D:\Powertalk3\Powertalk\PowerTalkClient\Program.cs:行号 19
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Net.Sockets.SocketException
Message="由于目标机器积极拒绝,无法连接。 127.0.0.1:1520"
Source="System"
ErrorCode=10061
NativeErrorCode=10061
StackTrace:
在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
InnerException:
解决方案 »
- 软件发布.内附c# 写的sql server,压缩,DSHOW和u盘备份的源
- 填充DataTable
- 救命:一个关于DATAGRIDVIEW的问题
- 求助,我用VC写了一个Dll,用C#生成的成在本机可以,在其他机器却无法加载这个dll
- uml学习--高手推荐下学习uml的好书或者视频
- 学习c#同步知识,有哪些好书啊?
- c#.winform中DataGrid的双击或单击事件
- winform 图片问题
- 能否介绍几个不错的C#方面文章的网站?
- 如何在VS2010中通过一个select按钮选择显示数据库中数据
- 为什么WPF工程选择了ICO文件图标后,编译出来的exe程序,依然没有ICO效果?
- c#中创建类和变量,如果不指定访问权限,默认的都是protect还是private?
在“SQL Server 2005 外围应用配置器”页上,单击“服务和连接的外围应用配置器”。
在“服务和连接的外围应用配置器”页上,展开“数据库引擎”,依次单击“远程连接”和“本地连接和远程连接”,单击适用于您的环境的相应协议,然后单击“应用”。注意:请在接收到以下消息时单击“确定”:
直到重新启动数据库引擎服务后,对连接设置所做的更改才会生效。
在“服务和连接的外围应用配置器”页上,展开“数据库引擎”,依次单击“服务”和“停止”,等待 MSSQLSERVER 服务停止,然后单击“启动”以重新启动 MSSQLSERVER 服务。