|
I'd guess they don't support binding to a completion port, or something like that. In the first instance complain to McAfee since their stack is at fault. It's possible that the kernel simply has a specific list of things that can bind to completion ports.
For some uses of the asynchronous pattern, .NET queues a work item to the thread pool and simply runs the synchronous version on the thread pool thread. For sockets, it's different: asynchronous I/Os are used. If the OS supports it - NT, 2000, XP, 2003 and successors - the socket is bound to a completion port which is a highly scalable way of receiving I/O completion notifications; otherwise it uses overlapped I/Os. In any case, the notification that the I/O is complete ends up on the thread pool, which then calls your callback function.
.NET 2.0 adds a new property to the Socket class which can be used to force the overlapped I/O mechanism and turn off the completion port feature: UseOnlyOverlappedIO . Set to true to stop it using the completion port. This may work around the problem, but McAfee really should fix it - .NET 1.x will always use the completion port if it's available.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks for your help, I tried enabling the UseOnlyOverlappedIO property on the Socket but it did not seem to have any impact. When the BeginConnect is executed I still receive the error "The attempted operation is not supported for the type of object referenced". If I remove McAfee this line works fine. Below is a code snippet in case I am missing something. I have raised this with McAfee and Microsoft but I suspect it's going to be a case of bug ping pong for a while.
ipendRemote = new IPEndPoint(Dns.GetHostEntry(m_sHost).AddressList[0], m_iPort);<br />
m_sockDestination = new Socket(ipendRemote.AddressFamily, SocketType.Stream, ProtocolType.Tcp);<br />
<br />
m_sockDestination.UseOnlyOverlappedIO = true;<br />
<br />
m_sockDestination.BeginConnect(ipendRemote, new AsyncCallback(this.OnConnected), m_sockDestination);
|
|
|
|
|
I've just seen a blog post[^] by the Windows Networking development team talking about how Layered Service Providers behave with a mix of different sockets. This might have some impact on your problem, I'm not sure.
If you're still having the problem, you could try posting a comment to that blog entry.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi to all,
How to run an exe of a code written in .Net Framework, on an PC without having installed .Net on it?
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
Basically, you can't. Without the .NET Framework, none of the classes that you are using in your code exist and, therefore, the code won't run. You have to install the framework.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Create a deployment project by selecting: File/New/Project/Other project types/Setup and Deployment
From here you can use the wizard or just select the setup type. You can make a requirement that the target have the framework installed. If it does not, then it you can select it to go out the internet and download or you can provide the file in your deployment. You can download the dotnetfx.exe (.Net Framework 2.0 Redist) from the Microsoft downloads site.
Tim Heney
Tim Heney
Meridian ID
theney@cableone.net
|
|
|
|
|
I have one vb.net windows application with one form; this is a small utility program. This Zip the content of the specific folder in a certain interval and copy the content in to some other place & keep the folder empty always. While running the application this sits in System tray as icon. This runs in the server always (24 X 7). This application I want to run as a windows service, because when ever server gets restarted, I have to run this application manually.
I tried to put this in windows service, it's running, but my problem is, I don't know how to launch the system try icon while running the service. I want once the service starts; my utility exe icon should come in system tray. Help me out in this.
Thanks,
Rajasekaran.
Rajasekarn Shan
|
|
|
|
|
Add a Notify Icon control to your service or VB form. This Notify Icon with sit on System Tray. Handle certain click events with this control.
If necessary, and a Context Menu control in association with the Notify Icon. Add as many Menu Items as you wish. Handle a click event with each Menu Item.
Best,
Jun
|
|
|
|
|
I have an auctionsite in the netherlands and wants to list my auction on my googlemap, but really don't know how to use this with sql.
I can use my rss feed to list the auctions, but the need zip see my rss feed: http://allestekoop.com/rss.php
this is a quiry from my sql in xml
<probid_users>
<id>1
<name>kees van sante
<email>keesvansante@zeelandnet.nl
<birthdate>1961-01-04
grote maagdenstraat 51
<city>sluis
<state>zeeland
<country>Nederland
<zip>4524er
anybody knows how to convert this into a google map displaying the auctions with locations {marked}
since my site is free for all, I am not able to pay for it.
kees van sante http://allestekoop.com
|
|
|
|
|
hi,
i think i may be help u but let me know one onething u want to use Google map property.
if it is like that then reply me
can u tell me How to use Rss Feed for webpage.
i have to check it and i will send u the link for that.
byeee
|
|
|
|
|
Give me your url adres,
I want google maps where the auction are located.
It can be done , so a user clicks on adres it shows adres and listed auctions on the map.
|
|
|
|
|
The constructor of ObjectDisposedException take a mandatory string argument.
I never know what string to use and I tend to use the following:
"this"
GetType().Name
"Handle"
What is it supposed to be?
|
|
|
|
|
Well just include something the receiver can use to evaluate what exactly happend. When using Controls for example it should most probably be the Name of the Control. 'This' and 'handle' are in my opinion rather bad. The receiver of the exception will immdiately aks himself: What handle?!?
So just take something descriptive. Instead of using some non saying constant you could better make the parameter Null (which is allowed in this case - ObjectDisposedException will create a slightly different message).
|
|
|
|
|
I did a test and Control, for example, return the Class name (that is: "Control", I think I will do that...)
it's obvious with the stack trace anyway!
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
hi!!
I am trying to build an application using .net and C# which will allow me to push objects from my desktop to all nearby devices. Its like a program to alert all nearby devices.
I have been trying to find ways to access the bluetooth stack on my desktop using .net but havent been able to do so.
Can any one tell me how can i achieve this?
thanks
p.s :I am eagerly waiting a reply ..its kinda urgent!!
|
|
|
|
|
Hi to all,
How to use WinSocket Library (MSWinsockLib) in C# (along with it's events)? I am using .NET framework.
Best Regards & Thanks,
Aniket Salunkhe
|
|
|
|
|
Use the following namespaces:
System.Net
System.Net.Sockets
WinSock 2 is wrapped in these .NET aseemblies.
Best,
Jun
|
|
|
|
|
Hi,
Do u hv any ex. to send & rcv data ( simple text) between 2 PCs using Winsock Library.
Best Regards & thanks,
Aniket Salunkhe
|
|
|
|
|
Search CP for "socket" or "tcp". You'll get tons of artcile/code snippets.
Best,
Jun
|
|
|
|
|
|
The following question can, of course, apply to other types (Boolean, DateTime, Double, etc), but for the puruposes of my question, let's just talk about the Integer type.
In my programming travels, the situation frequently arises where I have a nullable integer field in a database that I need to be able to work with in my code. As you know, there is no equivalent null value for the Integer type in .Net, so as far as I can tell my options are to use one of the following types instead of Integer:
Object
SqlInt32
Nullable(Of Integer)
As I see it, each comes with drawbacks:
Object - isn't strongly typed and (I assume) is less efficient.
SqlInt32 - I have to use SqlDataReader.GetSqlInt32(), which requires specifying the column index, not the name. I don't like this because it makes maintenance just a little harder by having to keep up with column orders.
Nullable(Of Integer) - When a null value is encountered, an InvalidCastException occurs because there is no way to cast a System.DBNull to a Nullable(Of Integer). My only way around this is to test the column with IsDbNull(), before attempting to assign the value. It just really seems wrong to have to do this extra step to get a null to equal a null. One friend made a suggestion to write a helper class to keep the IsDbNull() tests hidden away, but this only helps to keep the code cleaner.
Does anybody have any good suggestions or ideas or resources to point me towards? Thanks for your time and help.
Anthony
|
|
|
|
|
Use the SqlInt32 or nullable int, which ever you like.
The extra step of checking for the null value that you are concerned about, has to be performed either way. If it's done in the code that creates the SqlInt32 structure or in your code doesn't matter.
---
b { font-weight: normal; }
|
|
|
|
|
Hallo,
Can anyone help me. I have a treeview with several nodes in it.
On update I remove nodes that should not be in the tree anymore and add new ones.
I delete with '_TreeView.Nodes.RemoveAt(nodeToRemove);'
When I do this the bounds of an other node which is still in the list are changed
to negative values, so it is not displayed anymore. The treeview seems to be "empty" even
if there are still elements in the nodes list.
Is there anything I do wrong or a way I can make the node visible again?
(a thing that most times work is several expands and collapses on this invisible node,
but this costs on one hand a lot of time and on the other hand does not work always)
Any suggestions?
Thank U very much!
Desertstar
|
|
|
|
|
Hi everyone,
I have a WinXP test system with MSMQ running in Workgroup mode and with the IIS component installed for HTTP messages. I'm writing a .NETCF2.0 app for PocketPC 2003 devices which needs to send messages to a queue on the XP system. This has to be done via HTTP, since our GPRS wireless connection filters other ports. I've put MSMQ into Workgroup mode because the PPC2003 units aren't logging in to the AD.
I have a private queue set up on the XP machine. I have a .NET desktop app running monitoring the queue. As I understand things, HTTP queues cannot be read from (only sent to). So, when the test app is reading from the queue, it uses a standard MACHINENAME\private$\queueName path. When it sends a test message, it switches this to a FORMATNAME:DIRECT=HTTP://MACHINENAME/msmq/private$/queueName path.
It looks like messages are sent OK from this test app via the HTTP path, as they appear next time the grid refreshes.
However, no matter what I've tried, the PocketPC app (using the same DIRECT=HTTP....etc. path) cannot send a message. The error is: "The queue does not exist or you do not have sufficient permissions to perform the operation."
A few things I've tried:
- Ensured that binary and srmp are enabled using visadm.exe on the
device
- Verified that the device can see the XP machine's IIS instance and
access pages via Pocket IE
- Used both hostname and IP address in the queue path URL.
Cheers,
Chris
|
|
|
|