"WebClient Does Not Support Concurrent I/O Operations."
Mar 23, 2010
I have some code that downloads a list of files from an array or URLs. It downloads fine, but I keep getting the following error between each download.
"WebClient does not support concurrent I/O operations."
To me that means I can't download more that one file at a time. If so how can I get the code to continue only when the download is complete.
View 2 Replies
ADVERTISEMENT
Jun 9, 2010
I am suppose to recode a notepad assignment that i have done so that it is able to support multiple concurrent open files, that is MDI files i my note pad i had use a textbox instead of richtextbox can any one tell me if i have to use back the textbox in my recoding or not.
View 1 Replies
Jun 8, 2010
How do i amend my Notepad assignment to support MDI interface multiple concurrent files
View 1 Replies
Apr 22, 2010
I need to download a bunch of pages from a web server, ie. spidering. I know that servers are typically configured to only allow a couple of concurrent connections from a given IP, but that would already halve the total time to run the script instead of downloading one page at a time.
View 4 Replies
Apr 24, 2010
I want to use System.Net.Mail.SendAync in an ASP.NET MVC2 application. I see that it throws an InvalidOperationException if there is already a SendAsync call in progress. Does this mean only one SendAsync is allowed per host, or per thread? For example, if I simultaneously have 2 web users from 2 different remote hosts, can each use SendAsync at the same time?
View 1 Replies
Mar 23, 2009
can anyone guide me to a simple example of reading a serial port and doing other things concurrently eg graphics. I am trying to graph ouput from a datalogger real time. I am new to vb and having been a programmer since 1964 I dont need to be impressed by arcane code.
As you can see I am a grumpy old man (70)Cheers
View 1 Replies
Dec 10, 2009
I am writing an audit file that is writing the username, time, and the old/changed values of several variables in the application for each user when they use my application. It is using a FileStream and StreamWriter to access the audit file. All audits for each user will be written to the same file. The issue is that when two users are updating this audit file at the same time, the "old value" of each of the variable is mixing up between the users.
Dim fs As FileStream
Dim w As StreamWriter
Public Sub WriteAudit(ByVal filename As String, ByVal username As String, ByVal oldAddress As String, ByVal newAddress As String, ByVal oldCity As String, ByVal newCity As String)
[code]....
This lives in an AuditLogger class, which is referenced via an instance variable (re-allocated each time the function is accessed).
View 3 Replies
Apr 28, 2011
I compiled some VB6 code on my Win7 x64 machine and the result .exe will not run correctly on any other machine. VB6 code is just a new template .exe file with one button, a reference to "Microsoft ActiveX Data Objects 2.6 Library" and the following code in the button press event: Dim db Set db = New ADODB.Connection It runs correctly on my machine, but no others (even other Win7 x64 machines) (Update: I found TWO other users where it runs and one of them is Jeff Atwood!, but most machines have the same problem)
[Code]...
View 2 Replies
Mar 29, 2012
I'm trying to write a simple load tester for one of our web services, which is served through IIS7. I'm launching a load of threads (as Tasks) that call the web service as a Web Reference.Despite the threads all starting, only 2 concurrent connections from the app can be handled by the web service. I'm aware that by specification simultaneous connections are limited to 2 per user. For the sake of this load tester, which I guess is one user, I would like to open many simultaneous connections.I have tried to add the following to the web.config of the web service.
<system.net>
<connectionManagement>
<add address="*" maxconnection="40"/>
</connectionManagement>
</system.net>
My setup is as follows:
The web service is located at [URL], where MyWebServiceApp is configured as an application.The webmethod can be viewed as something trivial that simply waits for, say, 20 seconds before returning a response (making it easy to see that only 2 connections are open at any one time).The simplest form of the load tester code is ass follows:
Imports System.Threading.Tasks
Module SuperBasicLoadTester
Sub Main()
[code]....
I've tried pointing other load testing software (e.g. soapUI) at the web service and have observed the same issue.
Edits: I should add that the web service box is running Windows 2008 R2.Also I have run SoapUI and my loadtester simultaneously and each is only able to request 2 connections each (i.e. 4 in total).
View 2 Replies
Feb 10, 2012
my update script in VB.NET, i'm making some stuff, and I want, while all funcs are executed, a progressbar to be displayed? How to do that? Here is my execution sub:
[Code]...
View 1 Replies
Dec 19, 2011
I'm new in VB.net but I'm trying to make application (planning-game). The game is about showing students the planning 'complexity' of a operation room in a hospital. I created a listbox which randomly shows 5 operations. But now I would like a function which makes it possible to add a selected operation to a timetable. The timetable has blocks of 30 mins (example 08:00 - 08:30, 08:30 - 09:00 etc..). This because 1 type operation takes 1 hours and 1 takes 1:30 hours. Now I have given the operations a value by using a label. [code]
View 1 Replies
Dec 10, 2009
I have an idea about improving the assigning operations of VB.NET (maybe other .NET languages too.) It is similar with "With ... End With" block:
[Code]...
So we don't type "Some Text" every time. Do you think does this idea work? Maybe in the future we can see something like that?
View 3 Replies
Jan 6, 2012
Ime1 = ListView1.SelectedItems(0).Text
ListView2.Items.Add(Ime1)
If MkCal1 < 0 Then
ListView2.Items(0).SubItems.Add("Nepoznato")
Else
[Code]...
The problem is when I click the next time to button, listview2 add only first rows from listview1
View 3 Replies
Sep 13, 2009
I have an application in which I am running a separate thread.
Dim thread As New System.Threading.Thread(AddressOf Main)
thread.Start()
However, the thread makes reference to an textbox named Output, and it generates this error upon execution:
System.InvalidOperationException was unhandled
Message="Cross-thread operation not valid: Control 'Output' accessed from a thread other than the thread it was created on."
Source="System.Windows.Forms"
(message shortened for space)
How can I make the operations run on another thread, but still use the Output object? I cannot call a subroutine to do that for me, as it generates the exact same error.
The method called is AppendText, by the way.
View 3 Replies
May 23, 2010
I have 2 child nodes under a particular node. I want to do operations on the second child node. The code goes like:
Dim pChain As XmlNodeList = pChainDoc.ChildNodes
Dim processName As String = ""
For Each pNode As XmlNode In pChain
processName = pNode.SelectSingleNode("//Name").InnerText
[Code]...
View 1 Replies
Dec 22, 2011
The following commands I used them in VB6 for database operations MsAccess which are, kindly DataBaseDataSet corresponding commands in VB10?
- Data1.Recordset.FindFirst query
- Data1.Recordset.NoMatch
- Data1.Recordset.MoveLast
- Data1.Recordset.AddNew
- Data1.Recordset.Edit
- Data1.Recordset.Delete
- Data1.Recordset.Fields("nome campo") = dato
- Data1.Recordset.Update
View 7 Replies
Aug 19, 2010
I have a few syncing routines that I'd like to use for FTP uploads. However they all use the functions in the IO namespace, and I was wondering whether I could use it to access distant files stored on an FTP server.
View 1 Replies
Aug 19, 2010
I want to create a dll in VB.NET. The functionality of the dll is that it should include all the xml operations. Any application that uses this dll will just pass the node that has to be selected. The dll will accept the node name and search for the node in the xml file and return the details of the node. For example:if the xml file is like
<Node1>
<Node2>
<Node21 Attribute1 = "Value1" Attribute2 = "Value2" />
<Node22 Attribute1 = "Value11" Attribute2 = "Value22" />
[code]....
If the application which uses the dll calls a function named readNode(Node3) which is defined in the dll, then the dll should be able to retrieve all the details of Node3 including subnodes and theire attribute values and return it to the calling application. All the XML operations are to be done in the dll. The calling application will just call the method in the dll by passing the node name and it should be able to get all the node or attribute values.
View 1 Replies
Apr 1, 2011
In my API class I encountered a lot of times I had to Get/Set low/high order <something> of <something>. For example, get the low order integer from a long. I made a few functions for this: [code] Before I start using these functions permanently, I come to ask if it contains any bugs, especially because of the Unsigned/Signed issue.
View 15 Replies
Jul 22, 2011
I have a basic calculator that Multiplies A and B to give a result of C.I want to be able to once multiplication occurs then to add the data to 3 column listview where in Colum 0 the value of A will be entered, Column 1 the Value of B and Column 2 C.For every operation done then to follow on the next row and so on until Memory Result button is pressed, which would mean the end of transfering the data.
View 1 Replies
Jul 19, 2010
I'm re-writing some old application in VB.NET to C# and ASP.NET 3.5. Everything is going OK but I have this problem - and, as the database will not be changed, I must find a solution to it.The old app saves the list o desired days (from Sunday to Saturday) in a byte. This is the way it do it:
If chkDaily.Checked Then
daysBitmask = 127 ' This is for a full week
Else
[code]....
View 1 Replies
Jul 22, 2010
In my projects (WPF) I use System.Windows.MessageBox to show the user a confirmation dialog for operations that are critical, such as a delete-operation.
My problem is that if I specify as button value MessageBoxButton.YesNo, the user cannot use the escape-key to cancel the operation. IMO this is one of the most annoying things, a program can do, showing a dialog without the possibility to cancel/close the dialog through the escape-key.
Other possibilities are MessageBoxButton.YesNoCancel, but IMO this is confusing because it shows three buttons for only two operations . Or one can use MessageBox.OKCancel, but this is IMO not clear enough. In my dialogs I want to ask the user if her really wants to execute the operation. And for this, a simple ok is not appropriate. A yes (I want) is much better than an ok (go on).
How do you handle this? Is it a non-topic or do you think as I do and have an own MessageBox-implementation or do you know a possibility to extend the System.Windows.MessageBox-class?
View 1 Replies
Jun 10, 2011
On compiling a visual basic assembly, int32 variables are cast as int64 for calls to adodb methods that require int32. This results in a method not found exceptions at run time. The unnecessary cast operation can be seen when using reflector to inspect the site of the method call and is not present in the source code.To further muddy the waters when the code is compiled on my 64bit windows 7 machine all is well, but on a 64bit windows 2008 r2 the unnecessary cast is added.
View 1 Replies
Oct 27, 2010
I'm using Visual Basic 2010I've created a ListBox and a BackgroundWorker using designerI want to change the location of listbox using backgroundworker but I get the error as follows:"InvalidOperationException was Handled by user code:"Cross-thread operation not valid: Control 'ListBox1' accessed from a thread other than the thread it was created on
View 10 Replies
Jul 15, 2009
Whats the best way to include the Currency Symbol, without affecting arithmetic operations for example. Lets say I have a Listview which has one column named "Cost" where ill be a Currency Value which needs to carry the symbol for example "BsF. 22,34" or "$. 22,34". Lets say I need to apply aritmetics with those values after whats the best way to store em or at least ignore the symbol when using arithmetic on them?
View 3 Replies
Jun 5, 2011
The file operation calls are returning before they are actually complete, or the disk is being cached somehow. What is happening here is that a zipped file containing a number of files to be updated on the users machine has been unzipped and the filenames are returned in an array called 'newfiles'. Each actual file unzipped is temporarily preceded by a '~' character. We rename each existing file to <filename>.old, then delete all the old files. However, sometimes when the code runs, the old files are not deleted. The only explanation for this I can think of is that the second 'Fileexists' is not seeing the files because the filesystem has not caught up at that point. I've never seen this behaviour documented anywhere, though. It works fine when single-stepped.
For Each fn As String In newfiles
If .FileExists(fn) Then
'rename existing file to .old
delpath = Path.ChangeExtension(fn, "old")
.RenameFile(fn, delpath)
End If
'rename the new file to correct name i.e. remove "~"
[Code] .....
View 9 Replies
Feb 7, 2011
How do you use money in visual basic I know that I have to set nickels and divide by 5 and I am suppose to have another expression to the number. Then i am suppose to determine what change i would have left so that way i can determine how many pennies I have.[code]
View 1 Replies
Apr 6, 2011
I have two listboxes one is the source listbox and the other is the destination. When I try to drag an item from the source listbox to the destination listbox it does not select the item that the mouse if over. I have implemented the mouseover event selection. It only works when I am not dragging also the mouseover events do not fire when dragging an item from one listbox over.
Private Sub DtlBox3_MouseMove(sender As Object, e As System.Windows.Input.MouseEventArgs) Handles DtlBox3.MouseMove
Try
' Get the current mouse position
Dim mousePos As Windows.Point = e.GetPosition(Nothing)
[code]....
View 3 Replies
Jun 18, 2012
I have some task regarding do operations on database using ADODB in Vb.NET.regarding using the same record set multiple times?
I have tried on this topic just by closing the recordset after performing First operation and doing second operation e.t.c.
In ADO.NET we have "MultipleActiveResultSets=True" in ConnectionString for SqlDataReader.Do we have any property like this in ADODB?
View 1 Replies
Jul 31, 2011
I've got the bulk of a calculator up and working, however it doesn't like multiple operations. For example 3x5+2= brings up 10 (i.e. 3+5+2) and even doing it in two parts doesn't help, if I enter 3x5= I get 15 then +2= gives me 32 (i.e. 3x5=15 15x2=30 30+2=32). Also I am getting trialing zeros in my command line I can't debug.Note that lblcommandline displays the whole function and lbldisplay just displays the current imputted number.
Public Class frmSimpleCalc
'This code is run when the program starts. Here we 'declare' or basically, define which variables we want, what they are and such.
'So, for this example, we need two variables. The number we are CALCULATING and the one which we will CALCULATE FROM.
Dim lCalcNumberMaster As Long 'The master number is the solution, the number stored and displayed when we click equals.
[code]....
View 3 Replies