FTP Upload Works But Hangs
Jan 12, 2011
I have this code to upload to a ftp server. It works but the problem is it freezes the program and sometimes you can end up waiting for long time and not even know its working.
Code:
Dim clsRequest As System.Net.FtpWebRequest = _
DirectCast(System.Net.WebRequest.Create("ftp://" + txt_ftp_username.Text + ":" + txt_ftp_password.Text + "@" + txt_ftp_server.Text + ":" + txt_ftp_port.Value.ToString + "/" + txt_ftp_dir.Text + "/" + txt_ftp_name.Text), System.Net.FtpWebRequest)
[Code] .....
Can this code be modified so that it will run without freezing the program and then just add a button labelled "STOP" to stop the ftp connection/upload?
View 1 Replies
ADVERTISEMENT
Jun 19, 2009
This code was working consistently, but now...This code works on the first pass.Then second pass it just hangs on Code:Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient() for about 2 minutesThen the code will fork for another pass, then fail.....
Code:Imports SystemImports System.TextImports System.Collections.GenericImports System.XmlImports System.Xml.LinqImports System.Net.Sockets
[CODE]....
View 2 Replies
May 11, 2012
i have this code, how do i incorporate a progress bar into it? Private Sub btn_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_upload.Click
[code]...
View 1 Replies
Oct 24, 2011
Rather than using a Handler(.ashx), is it possible to use a web service(.asmx) to upload?
View 2 Replies
Jan 5, 2012
I have a spreadsheet with this code:
'insert link
sheet1.Hyperlinks.Add(sheet1.Range("P1"), "http://http://www.vbforums.com", "")
the code of the button (ribbon)
[CODE]...
When I press the button, it connects to the web site. when the sheet1 is selected, it works, but when the sheet2 is selected, not works, why? the path is sheet1,What's wrong?
View 2 Replies
Jun 26, 2010
this is my code:
Dim WB As WebBrowser
WB = GetPage("http://speed.travian.ir/a2b.php?z=" + VillageID.ToString + "&c=" + Type.ToString + "&" + AttackParams)
[code].....
View 9 Replies
Mar 21, 2011
I have limited experience in VB.net and have become stuck. I have tried to search for answers on other threads without success.I have an application that displays real time data.Queries are made to a MySQL database on another PC over the internet every 10 seconds to gather the most recent data.I have done the query within a BackgroundWorker so that the GUI is still responsive while the query is answered.What I've done works great for several hours or maybe for a couple of days but then the DoWork task appears to hang.
The code I'm using is to run the background worker is:
vb
If Not(backgroundWorker1.IsBusy) Then Me.backgroundWorker1.RunWorkerAsync() End If
The backgroundWorker runs just once and there's very little code in the DoWork routine:
vb
Private Sub backgroundWorker1_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles backgroundWorker1.DoWork rs = New
[code].....
Is there anyway I can set up a timeout on the maximum allowed time that the DoWork task can be active for? And if so how would I then go on to stop the backgroundWorker?I understand that CancelAsync isn't going to help as my DoWork task is not repeating as it runs once only, then stops and 10 secs later I run it again.
View 1 Replies
Dec 6, 2011
When i try to build a project, vb hangs and displays this message in the notification area Microsoft Visual Basic Express 2010 is Busy. i have to end up using Task Manager to end the process i have been using VB Express for about a year and have never had this problem. i have tried to re-install VB 2010 express, no joy.
View 1 Replies
May 26, 2012
ApplicationName has stopped workingA problem caused the program to stop working correctly.Windows will close the program and notify you if a solution is available.
Here is my code:
Private Sub OpenFile()
Dim OpenFileDialog As New OpenFileDialog
[code].....
View 10 Replies
Dec 28, 2010
Its been running in production for over a year and this is the first time I saw this behaviour. The application is a VB.NET Console Application which is triggered by MQ server. This application uses a class library which is part of the same project(Say 'abc.dll'). In production around 40+ instances of this exe are running and all of them use the some of the functions from 'abc.dll'.
Last week, we noticed that all the 40 instances were shown to be running in the task manager but they were not doing any activity. There was no exception thrown or error logged in Application logs or System logs. To frantically debug the problem, I tried isolating the problem.
With all these 40+ exes hung up, I wrote a small aplication which would use a reference to this 'a.dll', create an object of one of the classes in that dll and execute a method in there. I was printing console.writelines in between to see to which point it gets to before erroring out.
To my surprise, I found that at the point where I was creating an object of a class in 'a.dll' this sample test application would also hang just like the others. No exceptions thrown. So I killed all those applications as a last resort and then when I restarted all of them, everything worked fine.
I couldn't find any explanation for this behaviour. Since it was a critical error affecting a production system(blanking out the application for 3+ hours), I have to give a very good explanation as to why this would occur. how it can be prevented in future.
(Side note: the servers running these appilcation do not have a maintenance schedule and are supposed to be up for couple of months together.
View 11 Replies
Nov 10, 2010
When using the Dataset Designer in VS 2010 I add a new query.It adds with no issue.Add another,starts to hang. Add another and now it can hang for hours.I use task manager to kill VS 2010 after 30 minutes.Go back into the same table adapter query, modify it, save it.Works in seconds.Add another query, hangs, hangs, hangs.I have seen posts about this going back to VS 2008.I have No Add-Ons loaded, what is causing this issue??
View 2 Replies
Aug 21, 2009
I have downloaded SP1 and installed it,I have an applciation with 10 form and numerous classes and dialogs. When I right click a form in the soultion Explorer window and choose view Designer VS hangs for anything upto 10 mins. Is there anything that I can disable/ enable to stop this hapening. The only Language that I will be developing in is vb.net.
View 10 Replies
Oct 3, 2011
Im developing several applications under Visual Studio, and now have a real nightmare in hands. When i start to debug, VS hangs completely. Windows allows me to start task admin, and close the "devenv" process.I have serious problems here. I need to deliver my projects before the deadline!
Win 7 Pro 32 bits, VS 2010 SP1, running on HP computer based on Intel i5, 4gb ram. everything works as intended, except VS. When debug crashes, the devenv process uses about 25% of CPU and 250~400Mb of ram.
View 12 Replies
Mar 30, 2009
The messagebox shows properly but will not respond to mouse click and every is halted.. Comment out the messagebox event everything proceeds. No error is generated, things jest stop at themessagebox and willnot proceed. Code as follows:
[code]...
View 2 Replies
Jul 31, 2010
Using VB2005 I am trying to display several sites to my user. One of them being[url]... Ive laid down the very basic code just to navigate to the page but every time it tries to reach the site it just hangs. Strange is that Ive downloaded other examples of web browsers with very similar code and Im able to reach the site with no problems. Could the site be banning my specific app from reaching it and if so what mechanism would they use?
View 20 Replies
Jul 25, 2011
my program seems to just freeze whenever I press this button. I need to be able to use this because I'm reading values from a joystick as i'm making a human interface device.
Why is this freezing?[CODE...]
View 3 Replies
Jun 7, 2011
I am using VB in VS 2008. I am tring to call an external process and redirect the input, and pars the output back to my code.I started with the useal
Dim myProcess As New Process()
Dim StringFromProcess As String
myProcess.StartInfo.WorkingDirectory = (path & "in")
[code]....
but I will need 4 of them to get to the data and it seem to me its messy coding. Is there a way to get ReadToEnd to work when reading data over TCPIP? Or perhaps a different/better way to read back from my process?
View 3 Replies
Mar 6, 2011
I am writing my first application in Visual Basic Express 2008 and the program conistently hangs (Not responding in the Task Manager) midway through execution. The operating system is Windows XP Professional SP3 running on a 1.20 GHz Intel Core Duo CPU with 2 GB of RAM.
The application has very deep layers of subroutines and functions, all of which are using lots of math routines. There are no recursive routines anywhere in the program. The program creates and destroys quite a few class elements, and I have written dispose methods for all of them using IDisposable, setting all the properties to Nothing. I also use GC.Collect() to force garbide collection, and GC.WaitForPendingFinalizers(). As a result, I don't think there are any memory leaks.
I think the depth of sub and function calls are causing a stack overflow, but I'm not certain. I have tried without success to increase the stack allocation to 2 Mb using Editbin.exe after reading some forums, but nothing changed. I then searched my machine and did not find EDITBIN.EXE.When the program hangs up, the background of the forms on the screen turn to solid white and the controls are no longer visible.It looks like a window pops up but it disappears too quickly to read anything. If I view the task manager while the application is running it hangs immediately. I have not published it, I am still developing and running it out of the VB environment.The more complexity (sub and function calls) I add, the earlier the program hangs.
View 6 Replies
Mar 11, 2010
I am writing a fairly simple web site monitoring app. It uses a timer to call a class that requests a web page and measures the response. Problem is that the third time the class is called the app hangs. looking at the locals box I see that the properties of the httpURL object are 'Property Evaluation Failed' .
Imports System.Net
Imports System.Net.Sockets
Public Class Form1
[Code]......
View 2 Replies
Nov 15, 2011
When ever i execute this code it hangs ..how to troubleshoot
Imports System.Net
Imports System.IO
Partial Class vbIPNexample
[CODE]...
View 1 Replies
Sep 15, 2011
Code to launch a wmi query on remote computers. This code runs in several threads at the same time.
[Code]...
For Each objMgmt In oquery.Get 'on some pesky windows XP machines this line hangs forever regardless of the timeout and the thread can never be used to get info from another computer. the only way to "release" this is to reboot the target computer.
[Code]...
View 1 Replies
Jun 21, 2010
I have a weired problem. I developed a multithreaded WinForm application using VB.Net, and SQL Server 2008. The application works perfectly fine if I am using Visual Studio IDE to run the same. But, if I run the exe file created by VS the application hangs in case I lock my system and again relogin. The memory usage is same as it was before locking the system. CPU usage is also 0% or by max 2%. All threads are also exited after finishing there designated tasks.The application also uses threading but all threads are exited after there designated tasks. I confirmed this using various tools.[code]
View 5 Replies
May 5, 2011
I have created a small multithreaded application using VB.NET. There is no problem when the user manually runs this application. A problem exists when I added this application on startup. It hangs after I rebooted the system. The application is still running its thread but I can't see its GUI because its frozen. If I kill it on task manager and started again, the application works fine. What could be the possible reason/s why this application hangs when added on startup?
Imports System.Threading
Public Class USBLock
Public Event Lock()
[Code]....
or just a thought on this subject: the reason why the program hangs on startup is because the application is loaded while the .net framework service has not yet started.
View 1 Replies
Aug 13, 2009
I have a problem with a large application that consists of windows forms mainly, but some WPF windows and controls (we also use DevExpress controls v9.1). The problem is that the application sometimes hangs when it runs in a remote desktop session, and that session gets locked due to inactivity, and the user comes back and unlocks the session. The hang seems very similar to the hangs you get when accessing GUI controls from a none GUI thread, but I'm pretty sure that's not what causes the problem. (We had a lot of those problems earlier, and have fixed all multithreading problems we were able to find. And the hangs now never occures when the application runs outside the remote desktop environment.)
I've done a lot of research on the problem but I've still not found a clear point to what causes the problem. However, I think there might be a problem related to some combination of remote desktop and .NET framework. The reason for this is posts like this:
[Code]...
View 9 Replies
Apr 21, 2011
I have win7 pro, on my win form is a traffic light icon(when it starts it is red, when finished it is green), so that I know when job is finished. But when I run application icon isn't changing and form hangs it self, can not do nothing until job is finished. Only in the end, I see that icon is quickly changes to red and then back to green.
View 1 Replies
Dec 22, 2010
I am re-posing this question because the prior post has gotten really full of side issues so I fear the main problems has been lost.I have a windows forms application written in VB.NET which scrapes information from serveral web pages? I am having problem with one particular site where partway through the page navigation my application hangs. When I press pause (or break) in the debugger, it stops on a call to System.Windows.Forms.Application.DoEvents.
View 7 Replies
Aug 21, 2010
How to solve a form hangs problem during on inserting data to the database?
[Code]....
View 2 Replies
Mar 17, 2010
I'm encountering a hang when the program tries to access the fruit database. I've already enabled network access MSDTC on both my development computer and the SQL Server server.
[Code]...
View 1 Replies
Jan 14, 2011
I am trying to loop through an array and perform an httpwebrequest in each iteration. The code seems to work, however it pauses for a while (eg alot longer than the set timeout. Tried setting that to 100 to check and it still pauses) after every 10 or so iterations, then carries on working.
Here is what I have so far:
For i As Integer = 0 To numberOfProxies - 1
Try
'create request to a proxyJudge php page using proxy
Dim request As HttpWebRequest = HttpWebRequest.Create("[URL]")
request.Proxy = New Net.WebProxy(proxies(i)) 'select the current proxie from the proxies array
request.Timeout = 10000 'set timeout
[Code] .....
I have tried a using block, eg:
Using response As HttpWebResponse = request.GetResponse()
Using sr As StreamReader = New StreamReader(response.GetResponseStream())
Dim pageSourceCode As String = sr.ReadToEnd()
'check the downloaded source for certain phrases, each identifies a type of proxy
[Code] .....
Does the try catch statement automatically close the response, or do I need to put something in Finally? If so, what? i cant use response.close() because its declared in the try block.
View 2 Replies
Mar 23, 2010
When I close my compiled application, it will always hang for a few seconds before closing. It isn't something to do with my PC, I've got a quad core with 4GB of RAM -[code]...
View 4 Replies