FluentFTP throws timout exceptions on friends pc - c#

I have C# app with FluentFTP in it. I sent it to couple of my friends and for all of them it works fine, but for one guy it throws the timeout exception. Any idea how could I fix it?
I'm using .net Framework 4.7.2. The code just logins to my web and uploads some files using ftp.
FtpClient client = new FtpClient("ftpupload.net", "name", "pass");
client.AutoConnect();
The error is:
System.TimeoutException: Timed out trying to connect!
at FluentFTP.FtpSocketStream.Connect(String host, Int32 port, FtpIpVersion ipVersions)
at FluentFTP.FtpClient.Connect(FtpSocketStream stream)
at FluentFTP.FtpClient.Connect()
at FluentFTP.FtpClient.AutoDetect(Boolean firstOnly, Boolean cloneConnection)
at FluentFTP.FtpClient.AutoConnect()
at PĂ­smenka.Registrace.btnRegistrace_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.B
I have already tried to run as admin, turn off Windows Defender and firewall and install .NET Framework for him.

Related

IIS error with every launch of an ASP.NET Core MVC app

I have a problem with using the new ASP.NET Core MVC. I make an empty project or use a web application template. Every time I save changes to any file in Visual Studio 2015 file browser or every time I launch the app with or without debugging, an IIS error pops up:
"Unhandled exception has occurred in your application: The directory
name C:\Users\COMPUTERNAME=ZENBOOK is invalid".
What could this path be? Never changed anything in any settings that could trigger such a thing.
The rest of the error:
************** Exception Text **************
System.ArgumentException: The directory name C:\Users\vouCOMPUTERNAME=ZENBOOK\ is invalid.
at System.IO.FileSystemWatcher.set_Path(String value)
at Microsoft.IisExpress.SysTray.TrayAppHiddenForm.TrayAppHiddenForm_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The site is rendered just fine with any refresh. But this error keeps appearing - on two different machines. It never happens with an MVC 4 project, though... My friend, however, does not have any similar problems with ASP.NET Core MVC.
I feel it may have to do with Environment variables, but I checked, they seem to be fine. Any ideas are appreciated.
Does the "Zenbook" username make sense to you? Is that you?
Also, your stack trace describes a problem when executing Windows Forms code. Is there any reason for you to be using any of that?
Check your design as that does not make sense, at least to a person not aware of what your application does.

Error loading data from a C# database application

I have created a C# database application, the database file is of type .mdf . The app works fine on my PC and in other PCs that have MS SQL Server already installed. In other machines that do not have SQL server installed, the installation process shows me an unhandled exception, after that, the app opens but no data are loaded .
The exception says:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 52 - unable to locate a Local Database
Runtime installation. Verify that SQL Server Express is properly
installed and that the Local Database Runtime feature is enabled.).
This is the full exception in detail:
*System.Data.SqlClient.SqlException (0x80131904): System.ComponentModel.Win32Exception (0x80004005): The system cannot
find the file specified at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection, Action`1 wrapCloseInAction) at
...
... at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
ClientConnectionId:00000000-0000-0000-0000-000000000000 Error
Number:2,State:0,Class:20*
The app can run successfully but no data from database are loaded.
Do I have to install SQL server express in all machines,so the app can load its required data, or just some components of SQL server are enough. Other PCs have Windows update disabled.
For more information here are application files:
Data177k.mdf.deploy
Data177k_log.ldf.deploy
deatach.application
deatach.exe.config.deploy
deatach.exe.deploy
deatach.exe.manifest
setup.exe
What can I do in order that the app to load its database even in PCs that dont have SQL server express installed on.
I recommend you read up on SQL Server LocalDB, which allows you to publish the necessary plumbing for using an .MDF file on a client computer, without installing SQL Server/Express on it.
MSDN SQL 2014 Download and information page

Crystal Report logon failed in IIS 7

I have used crystal report with VS2010 with IIS 7. I can connect the DB from WEB application. However, it throws "Logon Failed", if the application run with IIS 7.
I tried with following VB.NET code
Dim boConnectionInfo As New ConnectionInfo()
boConnectionInfo.ServerName = ConfigurationManager.AppSettings("CRServerName").ToString
boConnectionInfo.DatabaseName = ConfigurationManager.AppSettings("CRDatabaseName").ToString
boConnectionInfo.UserID = ConfigurationManager.AppSettings("CRUserID").ToString
boConnectionInfo.Password = ConfigurationManager.AppSettings("CRPassword").ToString
boReportDocument.VerifyDatabase()
boReportDocument.Refresh()
it throws following exceptions
Log on failed.
at
CrystalDecisions.CrystalReports.Engine.ReportDocument.VerifyDatabase()
at IPSReport.btnViewPort_Click(Object sender, EventArgs e) in
C:\inetpub\wwwroot\IPS_CrysRpt_VS2010\Report.aspx.vb:line 383 at
System.Web.UI.WebControls.Button.OnClick(EventArgs e) at
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Could you please help me out to find the cause of error and solutions for it?
Thanks
VG
You haven't ascertained whether the values being read from the Web.Config file via the AppSettings static class are the values you expect them to be.
If by saying "I can connect the DB from WEB application." you mean "I can connect to the database inside Visual Studio but my application won't connect when deployed and running under IIS" then the answer is that the connection settings being read by the application when you deploy it under IIS are not the same as the credentials you are using when you connect in Visual Studio. Typically this is because you haven't deployed the Web.Config containing the credentials correctly.
To determine whether this is true; (1) look at the contents of the Web.Config you have deployed on IIS, (2) output the credentials you are reading during your connection attempt using some logging framework (or just write them as the HTML output). You will probably find they are not the credentials you think they are.

SEHException while running azure project

I have just moved my azure project from sdk version 1.4 to 2.1.
After this move, I am having trouble starting the azure roles on my local machine. I get the following error:
[SEHException (0x80004005): External component has thrown an exception.]
RdGetApplicationConfigurationSetting(UInt16* , UInt16** ) +0
RoleEnvironmentGetConfigurationSettingValueW(UInt16* pszName, UInt16* pszDest, UInt32 cchDest, UInt32* pcchRequiredDestSize) +82
Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropRoleManager.GetConfigurationSetting(String name, String& ret) +232
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName) +67
Surfmark.MVC.WebRole.FirstRequestInitialization.ApplicationStartUponFirstRequest(HttpContext context) in C:\Dev\code\www\Surfmark.CloudService\Surfmark.MVC.WebRole\Global.asax.cs:232
Surfmark.MVC.WebRole.FirstRequestInitialization.Initialize(HttpContext context) in C:\Dev\code\www\Surfmark.CloudService\Surfmark.MVC.WebRole\Global.asax.cs:223
Surfmark.MVC.WebRole.MvcApplication.Application_BeginRequest(Object sender, EventArgs e) in C:\Dev\code\www\Surfmark.CloudService\Surfmark.MVC.WebRole\Global.asax.cs:202
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Please note that I am making a call to RoleEnvironment.GetConfigurationSettingValue() in the Application_BeginRequest() method in Global.asax. While using v1.4 of Azure SDK, I used to call CloudStorageAccount.SetConfigurationSettingPublisher() in the Application_Start() so that getting the configsetting doesnt error out. I notice that in v2.1 this method is no more there, so I am assuming I can access RoleEnvironment.GetConfigurationSettingValue() without error.
Please let me know what am I doing wrong here?
Thanks
Kapil
I think I figured this out. Actually I was upgrading my proj from 1.4 to 2.1 version od azure SDK. Now, I noticed that my proj was using full IIS to start the compute emulator on dev machine. I moved that to IIS-express (seems like thats the default for dev emulator in the new SDKs) and things seem to work well.
Thanks
Kapil

Error in Silverlight app with RadSpreadsheet control

I am writing a Silverlight app with Telerik Radspreadsheet Control. It runs correctly on Windows 7 and 8 in Firefox, Google Chrome, Opera and IE 9, but some of my clients can not load it on Windows XP in IE 8, and receive this error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Thu, 16 May 2013 13:21:38 UTC
Message: Unhandled Error in Silverlight Application [Parser_CreateInstance_ConstructorInvocation]
Arguments: Telerik.Windows.Controls.RadSpreadsheet
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/? linkid=106663&Version=5.1.20125.0&File=System.Windows.dll&Key=Parser_CreateInstance_Constru ctorInvocation [Line: 47 Position: 40] at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at ECOBox2012WebPanel.DataPage.InitializeComponent()
at ECOBox2012WebPanel.DataPage..ctor()
at ECOBox2012WebPanel.MainPage..ctor()
at ECOBox2012WebPanel.App.Application_Startup(Object sender, StartupEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Line: 1
Char: 1
Code: 0
URI: http://ecobox2012web.say-co.com/default.html
Indeed there was an issue that RadSpreadsheet control does not load under Windows XP.
As a member of the team responsible for developing the component, I can confirm that it has already been fixed, so upgrading to the latest official version should solve the problem.

Categories

Resources