|
It usually works like this:
Firewalls block connections that are being made from the "outside" world. In order to allow easy configuration, you can specify a set of ports on which clients may connect to an outside server. As this usually means "TCP/IP" connection, a second "channel" is necessary, which ends on some random port (>1024) at the client.
(eg. client(192.168.0.1) connects to server(192.168.0.250) on port 80-> client sends to 192.168.0.250:80 and received on 192.168.0.1:1234)
The firewall "knows" that the outgoing connection is OK, so the incoming connection has to be accepted as well, since its necessary for the TCP Connection.
There are quite a few other tipps and tricks (one involving automatic changes to your firewall software), but this is whats commonly done.
For more information, see "PASV" FTP-command.
Cheers
Sebs
|
|
|
|
|
Good day all,
I am trying to gather some information about the Caching Application Block and finding it a bit hard to find documentation on it. I have read some nice write ups of its use on different sites, but I am really looking for people's opinions on whether this App Block is worth the time to implement or if you are better off with a custom solution? Especially after diving into the UIP app block recently and hearing discussions of its bloat and problems.
Our project consists of a web client and a smart client and there has been discussion amongst our team of putting parts in multiple app domains. If I am understanding it right, we would need a seperate instance of the block for each app domain? Has this proved to be transparent or a problem for people on larger scale applications? We are also going to be moving at a pretty rapid pace during development so we need to keep speedbumps down to a minimum.
I would appreciate hearing people's thoughts and experience with this application block!
Thanks in Advance,
Jeremy Dean
|
|
|
|
|
Hi,
I read an article on your web site "Five reasons for using an O/R mapping tool". Ya that person is right, I also dont know about O/R mapping. But when I download and try TierDeveloper I am impress, because it generate code for me in C# and VB.Net both. I also suggest all of you to try it atleast once.
http://www.alachisoft.com/download.htm
|
|
|
|
|
I have made a small windows service and I want a system tray icon I can use to interact with the service. I Suspect I'll need to create a separate application that controls the icon and monitors the service. My question is, how do I only have the application running when the service is running? Obviously the application would only run when a user is logged in, but can someone point me in the right direction, or possibly to an article that can help me solve this problem?
NATHAN RIDLEY
Web Application Developer
email: nathan @ netlab.com.au
[remove the spaces before and after the @ symbol]
|
|
|
|
|
Are you just looking to start and stop the service form your system tray app or do you want to interract at a higher level (config parms, etc)?
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Hi
I have a problem, in my application I have a window with a lot of labels(50-100) in it. So far so good but the performance is horrible when the labels has to redraw. What do I need to do? Suppress the redraw some how, bypass the normal OnPaint or what? Also I would like to know why this happens, is this a common problems with labels or is there something I might have done wrong in the data binding maybe?
/Regards Johan Hertz
|
|
|
|
|
It depends on what you are trying to achieve with your app.
If its a representation of a plant or installation, you will have to update only the labels which have changed (by comparison).
If you are resizing your form often, you should only draw the labels when the resizing is done (on completion).
If you just want to change labels time-dependant, you should use a timer which ticks every so often and updates one set of labels. (by timer)
If you have other windows which are drawn on top of your app, you should only redraw the changed region (by screen-region)
The problem is, that Windows is responsible for telling applications to redraw. Windows passes along some information, including the exact screen area which needs to be redrawn. If you dont take this into consideration, you will end up redrawing the whole windows every time a message-box pops up.
Updating controls has a HUGE overhead associated with it. You should try to update the labels rarely. Say, you are doing some computations and are updating the label continously. Bad idea. Instead, you should use a seperate thread to compute the results and update the label afterwards. That way, your form will still respond to size- and position-changes - and, since the labels have not been updated, Windows can simply move the graphic representation of your window without having to redraw every time.
Cheers
Sid
|
|
|
|
|
Ok
Thanks for the reply, I don't need to update my labels often at all, what I would like to do is to redraw them when the resizing is done, what I have done so far is to completely remove all labels while resizing and then draw them back on onces the redraw have finished. This is poor for feed back but works. Is there a way in which I can keep the labels on the form but not update them? Any way thanks for the help so far.
/Regards Johan
|
|
|
|
|
Hello, can anybody help me?
I've got this strange problem. In my desktop application, I have a picturebox. Normally this picturebox has the border set to 'none'. When the user comes close to a border (marging 2 px), I change the cursor to any of the resize options available. No problem so far, but... I want to resize the picture box when the mouse is moved. Again, not really a problem except for the following... When the user clicks the box (while the cursor is in a resize mode), I set the border.FixedSingle... The resizing is not the issue, but somehow when the mouse pointer is exactly over the border (that one little pixel), the cursor changes to 'default'. I'm not doing it with coding... As soon as the user moves of the border, the cursor is correct again.
Although this is purely a 'visible' problem, and it terribly ugly... The real problem is deeper. When the cursor is any of the resize cursors, my programming works fine. When the mouse button is released, the picturebox is resized and everything is okay, but... During that one moment when the cursor is set to default (aka, when the mouse is precisely on the border), the mouse up function I've created isn't fired.
I really have no clue what's going on... Can't seem to detect the 'sender' either...
Anybody? Were can I look??
Thanks in advance.
Masaia
|
|
|
|
|
Maybe u can set the cursor of the closer 2 pixs of the image to the resize cursor?
|
|
|
|
|
i think that when you hover over the border the cursor changes because thats a so-called non-client area, which means its painted by the operating system
so you cant paint there, and there are also no mouse events fired
this sucks big time, believe me!
|
|
|
|
|
BinaryWriter/Reader documentation indicates it
"writes in little-endian".
My question: Is the documentation correct? Did it mean to say
"BinaryWriter/Reader is (guaranteed for all time) to write/read in little-endian".
OR
"If System.BitConverter.IsLittleEndian is TRUE,
THEN BinaryWriter/Reader will write/read in little-endian".
ELSE BinaryWriter/Reader will write/read in big-endian
|
|
|
|
|
"BinaryWriter/Reader is (At this time) to write/read in little-endian".
|
|
|
|
|
I have two separate Forms executables that interact and behave visually to the user as one application. When my second app starts I set it's form to TopMost to ensure the user can see it above the first app so it appears like a child of the first. Of course this is not really what I want because now it is above all windows.
Is there a way to establish a parent-child Form relationship between Forms in separate applications?
Thanks.
|
|
|
|
|
bherman69 wrote:
Is there a way to establish a parent-child Form relationship between Forms in separate applications?
No, there isn't.
Why are they seperate app's? If they are so interrelated, why not combine them into one application? If they were in the same application, then you could use ShowDialog to show the second form as an Application Modal Dialog, instead of the mess you created.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Believe me, I wish they could be in the same application. But they can't so I am left with trying to solve the issue of Form relationships between applications.
Thanks.
|
|
|
|
|
is there is bulid in support in windowsXP for the .netframework.
ddd
|
|
|
|
|
No, you have to install it. I think Windows Server 2003 may have .NET pre-installed though.
Kevin
|
|
|
|
|
Hello,
It would be so great if somebody can tell me how to test if a port on my PC is free or not.
My client PC, that I am building, has to inform the server on which port this last can send a RTP video streaming through a udp connexion. And so, I want that my client PC find an unused port, to be sure that the transmission will succeed every time.
Many thanks for all kind of help and have a nice day,
alain
There is no way to happiness, happiness is the way !
There is no way to happiness, happiness is the way !
|
|
|
|
|
The simplest way is to simply try and bind to the specific port, if the bind succeeds, the port is free, otherwise it is not. For example,
TcpListener listener = new TcpListener(1234);
listener.Start();
If you don't want to check manually, you can pass 0 to TcpListener's constructor, it will automatically find a free port to bind to. You can then get that using the LocalEndPoint property.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hei, thank you for your answer. I have finally coded like following (with MFC) :
// Adresse ip local du pc
CString CSipAddLocal = CTool::GetLocalIP();
CAsyncSocket *ClassMySocket = new CAsyncSocket;
//ClassMySocket->Create(atof(portUnicast));
ClassMySocket->Socket();
int i = 0;
while (ClassMySocket->Bind(atof(portUnicast),CSipAddLocal)==0)
{...try another port...}
..................................................................
I think this method is working well !
I wish you a nice week-end, bye !
alain costanza
There is no way to happiness, happiness is the way !
|
|
|
|
|
My datagrid has a big problem, it happens only in columns that are read only.
Please see the datagrid image.
The gost that I show it’s like a new readonly textbox.
If the selected cell it’s not readonly there’s no problem.
I think that the problem it’s ralated with lose of focus of the datagrid.
After pressing a button, I fill again the datagrid with new datasource but this thing remains, hiding the new value!
Only with scrool I can see that the new value it’s really there but the old is hiding it.
I tried datagrid Refresh() and so many things but nothing works.
Need help please.
Paulo Gonçalves
pfrg@mega.ist.utl.pt
|
|
|
|
|
Hi
I'm doing a bit of research with .NET's TCP IP classes - downloaded some samples from MSDN and off here.
However, whenever I run a client program that creates a TcpClient, I get the following popup message.
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll
Additional information: No connection could be made because the target machine actively refused it
A bit frustrating as that stops everything from running.
I'm on XP and running service pack 2
Is there any way around this?
Cheers
|
|
|
|
|
That error message means that you were trying to connect to a server and the server didn't exists. You must first run the server (code that creates TcpListener and calls appropriate methods to accept TcpClients) before running the client.
In case you've already started the server and you're still getting the error, it might be because of SP2 Firewall settings..
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Seems to have done the trick
completely new to .NET so struggling along! Cheers for the help
|
|
|
|