草庐IT

connect_xxx

全部标签

c# - 从 ftp 服务器下载文件时为 "The underlying connection was closed"

我想从ftp服务器下载文件。我写了下面的代码来从ftp下载文件publicvoiddownloadFile(stringFTPAddress,stringfilename,stringusername,stringpassword,stringdestFile){try{FtpWebRequestrequest=FtpWebRequest.Create(FTPAddress+filename)asFtpWebRequest;request.Method=WebRequestMethods.Ftp.DownloadFile;request.Credentials=newNetworkCr

c# - TCP 错误代码 10061 : No connection could be made because the target machine actively refused it

很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visitthehelpcenter.关闭9年前。Couldnotconnecttonet.tcp://localhost:5051/user.Theconnectionattemptlastedforatimespanof00:00:02.0600206.TCPerrorcode10061:Noconnectioncouldbemadebecausethetargetmachineactivelyrefusedit127.0.0.1:5051.

c# - Facebook Connect 与使用 ASP.NET Membership Provider 的站点集成

是否有任何最佳实践或示例说明如何使用成员资格提供程序(或类似的东西)将Facebook连接与现有ASP.NET应用程序最佳集成。我确信我可以做一些事情,但是,如果有一些关于此的信息和最佳实践来减轻任何安全问题,那就太好了。目前我可以让用户“连接”并获取他们的信息,但是,我希望尽可能安全地处理它们,并尽可能与现有用户类似。特别是,我希望他们在“用户”表中有一个条目。对于与ASP.NETMVC相关的任何信息,这将非常有用。我迄今为止发现的一些有用的链接:http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=45825Fa

c# - xxx 实例的标识符从 y 更改为 z

尝试更新数据库中的对象时出现以下错误。有谁知道会发生什么?我已经检查了我所有的数据类型,它们与数据库中的内容相对应。感谢您的任何想法-NHibernate.HibernateExceptionwasunhandledbyusercodeMessage="identifierofaninstanceofDataTransfer.statuswasalteredfrom3to4"Source="NHibernate"StackTrace:atNHibernate.Event.Default.DefaultFlushEntityEventListener.CheckId(Objectobj,

c# - SignalR 2.1.0 : The connection has not been established

我有一个ASP.NETWeb应用程序,其中包含一个简单的HTML页面和一些通过SignalR进行通信的JavaScript。那很好用。现在,我正在尝试从另一个项目(在同一解决方案中)调用Hub上的方法并使用.NETSignalrClientApi:varconnection=newHubConnection("http://localhost:32986/");varhub=connection.CreateHubProxy("MessageHub");connection.Start();hub.Invoke("SendMessage","","");最后一行导致InvalidOpe

c# - 这是错误 ORA-12154 : TNS:could not resolve the connect identifier specified?

我有这段代码:OracleConnectioncon=newOracleConnection("datasource=localhost;userid=fastecit;password=fastecit");con.Open();stringsql="SelectuserIdfromtblusers";OracleCommandcmd=newOracleCommand(sql,con);OracleDataReaderdr=cmd.ExecuteReader();while(dr.Read()){messageBox.Show(dr[0].Tostring());}两个项目中的代码相

c# - NHibernate 异常 : Transaction not connected, 或已断开连接

在我们的开发环境中,所有ASP.NET应用程序都运行良好。但是,当我在测试机器上部署站点时,在某些页面上出现此异常:NHibernate.TransactionException:Transactionnotconnected,orwasdisconnectedatNHibernate.Transaction.AdoTransaction.CheckNotZombied()ind:\CSharp\NH\NH\nhibernate\src\NHibernate\Transaction\AdoTransaction.cs:line406atNHibernate.Transaction.Ad

c# - 编辑记录时 RadGrid 中的 "Cannot unregister UpdatePanel with ID ' xxx ' since it was not registered with the ScriptManager... "

让我切入正题。我的场景如下:我有自定义添加的字段来过滤RadGrid并且过滤效果很好。当我想在RadGrid中使用EditForm编辑记录时,问题就来了。它过去工作正常,但后来我在选择正确的行时遇到了一些问题(我总是选择错误的行)所以这就是我修复它的方法。所以,我的带过滤器的RadGrid看起来像这样:我所做的是使用session,这将帮助我们稍后确定过滤的RadGrid数据源是已启动还是默认的。protectedvoidbtnSearch_Click(objectsender,EventArgse){Session["SearchKontakti"]="1";}之后,我必须使用if循

c# - 执行非查询 : Connection property has not been initialized.

下午,所以我已经在这个问题上研究了几个小时,但无法真正克服最后一个障碍。下面是我正在编写的这个程序的代码:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Diagnostics;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Configuration;namespaceTest{classProgram{staticvoidMain(){EventLogalog=newEventLog();

c# - Connection.open 无限期挂起,不抛出异常

当我尝试执行以下代码时,程序无限期挂起。我不知道为什么,似乎还有其他Unresolved话题。不过,如果无法访问IP\网站,则它会按预期工作。privatevoidDoStuff(){stringconnectionString="DataSource=www.google.com;ConnectionTimeout=5";using(SqlConnectionconnection=newSqlConnection(connectionString)){connection.Open();//HangshereindefinitelyConsole.WriteLine("Test");