|
If you use the TCP channel, then you have your own server code which is handling the reciept of the requests and issuing the responses.
The HTTP channel places your remoting objects in IIS and it handles all of the server functions with only your remoting objects needed. This lets you focus only on the functions the remote objects perform and not the server functions you need to expose.
Channels are the first part of it. Then there are formatters.
There are binary formatters and SOAP formatters. Generally, SOAP is horrendously slow. So you should stick to binary even over HTTP. (IIS establishes the binary formatter by default at the server side.)
______________________________
The Tao gave birth to machine language. Machine language gave birth to the assembler.
The assembler gave birth to the compiler. Now there are ten thousand languages.
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
But do not program in COBOL if you can avoid it.
|
|
|
|
|
what about other (custom) channels like MSMQ, Pipes, Sockets?
@!$h@
|
|
|
|
|
Dear @!$h@,
With any custom channel it is not as simple as just defining a channel...and anyone who even thinks of deploying remoting over Named Pipes should be taken outside and shot. Named Pipes is really an ancient technology that deserves a quiet death.
You may need to provide your own sink providers, incorporate sink formatters and sink serializers/deserializers. Most writings on remoting only discuss TCP or HTTP with no other form considered.
______________________________
The Tao gave birth to machine language. Machine language gave birth to the assembler.
The assembler gave birth to the compiler. Now there are ten thousand languages.
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
But do not program in COBOL if you can avoid it.
|
|
|
|
|
IIRC, someone did define a custom channel using MSMQ here on CodeProject. You could try a search to learn more (perhaps "MSMQ channel" for keywords). I believe it was by Roman Kiss.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
yes i referred to that but Roman Kiss only mentioned how to make MSMQ based Channel and not the advantages/disadvantages of using MSMQ channel over the other channels.
@!$h@
|
|
|
|
|
The advantages and disadvantages are whatever advantages and disadvantages of using MSMQ for anything, really. I don't have a lot of experience with MSMQ (just never had a good enough reason or opportunity as of yet). One advantage I can think of is a distributed system were you could have multiple remoting objects handling requests. I don't know if this would really be necessary, but it may be one way to do load balancing with massive clients connected if you devised a way that whichever remoting object answered first would cause the others not to handle the request. This can be achieved - and probably better - by implementing your own RealProxy derivative, for which the book, "Microsoft .NET Remoting" from MS Press[^], has an example.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Actually, I thought using the HttpChannel defaults to SOAP? In any case, though, the BinaryFormatter is much faster (even just for serialization, not to mention over the transport channel).
The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath Stewart wrote:
The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)!
nice piece of information. But this is about formatters and not channels. what i have conceived as yet is that there are only two available formatters SOAP and Binary and about Channels TCP and HTTP. You can write ur custom channels but the formatter you will associate with ur channel could be either SOAP or Binary. My question is about channels and not formatters.
@!$h@
|
|
|
|
|
Yes, I know. I was posting this in reference to what theRealCondor said - call it an aside. It was not intended to be a direct response to your question.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi, I've got a dll that performs some operation on file, I would like to know how to implement a progress bar, and if it's possible, not having access to osuce code dll, I can set minumum and maximum and step properties but odn't know how to set it for doing the step, since I don't have access to source.......thanks
Ciko2000
|
|
|
|
|
If I understand it correctly, you've got a black box that you want to change. Without the source, this really isn't possible. What you're asking to do is get notification of the progress of the operation that the DLL performs on the file. Unless that DLL exposes some events or a callback, you're sunk.
If it exposes a progress callback or events, then you can simply initialize your ProgressBar with the information and with every notification of another unit of progress, just use ProgressBar.PerformStep() (which increments the Value by the Step amount).
The problem you'll run into, though, is threading. You should - if possible - invoke that DLL function/method in a separate thread and be sure to use ProgressBar.InvokeRequired and ProgressBar.Invoke (both inherited from the Control class). If you try to change the control from a separate thread other than the one on which the control was created, you'll run into "undefined" problems (i.e., the control not displaying, methods not doing anything, and other oddities).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Oh, if that other DLL to which you don't have the source is a .NET assembly, you could always disassemble it, insert the IL necessary for such callbacks or events, then reassemble it.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
How can i load values into a listview from a event that is on another form than the listview. The listview is on a control on my main form, but I open a new form to change some values and when i click on save it should change the listview on the Main form.
It will also be fine to load the values when the child form closes, but i can't get that to work either.
I tried to run a function from the child form but nothing happens.
thnxs.
|
|
|
|
|
Probably not the best way to do this, but you could always make your parent listview "public static", and directly assign the values from your child. A major problem with this is, your main form would probably need to be static as well.
You could also store all the data in a class object, and return the object back to the main form, and extract all the data from the object.
Just a few suggestions.
I might be totally wrong.
|
|
|
|
|
A better way than making it static (you'll run into all kinds of problems with this approach, especially if you want to use the designer after making those suggested changes) is to either pass a reference to the ListView to the form you open, or make a public property that gets the ListView on the first form and pass a reference to the first form into the second form (probably better if you ever want to do similar things in the future), or - finally - provide a way to get the data from the second form inside the first form and then have your first form add the data to your ListView .
The latter method is probably best. This allows you to use that form in different places and different ways. Once ShowDialog returns, you can grab that data (in a collection, list, array, a single property or properties, or whatever) and use it however you want.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello ,
I'm programming in C# in the SmartSolution for pocket PC environment .
I've defined a CAutoRestetEvent and noticed that there is only WaitOne() function
Which does not allow Time out .
I'm looking for something that will support waiting on a specific handle with timeout like - WaitOne(5000) .
Thanks in advance …
|
|
|
|
|
One of the more odious omissions from the Compact Framework.
You'll have to P/Invoke CreateEvent to create an event, and WaitForSingleObject to wait on it.
You may find the OpenNETCF Smart Device Framework[^] useful. This already contains appropriate P/Invokes in the OpenNETCF.Win32.Core class.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I created an installer package which has been installed by several clients. Now I want to create a new version. I increased the version number and changed the upgrade code of the installer package and set the RemovePreviousVersion property to True and set the DetectNewerInstallerVersion to True as well. I have several registry setting setup in the registry editor. However if the client has a previous version of the application installed I want the system to remember those settings and not override them. Because the RemovePrevioiusVersion property is set to True the system removes all settings after which they are lost. However if I dont set this property to true the system willl install 2 version of the application on the target machine.
How can I create a package that overrides (or removes) the old version but doesn't override the registr values so that previous configuration settings will be maintained? I spend many days trying to find a solution but haven't had much luck. Also it must be possible to use this package as the first installer meaning that if the client never had the application installed before, he can run the setup to install the application. In other words it is not just a patch for older versions.
|
|
|
|
|
Never change the UpgradeCode! The UpgradeCode should remain constant throughout an application's installer's lifetime. It is the PackageCode and ProductCode that you must change. When you change the Version, you opt to leave the UpgradeCode alone. This is what associates the newer product with the older product. Read about the Upgrade table in the Windows Installer SDK on MSDN[^] for more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I got this nice little piece of code, that is meant to get a selected folder from a FolderBrowseDialog.
folderdlg.RootFolder = Environment.SpecialFolder.Desktop;<br />
<br />
if(folderdlg.ShowDialog(this.FindForm()) == DialogResult.OK)<br />
{<br />
textBox1.Text = folderdlg.SelectedPath;<br />
}<br />
But I get an empty BrowseFolderDialog, with no folders displayed. Anyone else having this problem? And if so, you found the solution?
If you need a screenshot, I can send some over the e-mail
Greetings....
|
|
|
|
|
hi
folderdlg.SelectedPath = Environment.SpecialFolder.Desktop;
|
|
|
|
|
does not work at all
Greetings....
|
|
|
|
|
hi
folderdlg.SelectedPath = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
|
|
|
|
Hi there!
I had the same strange problem. Make sure that the default threading model for your application is single-threaded apartment. When the default threading model is multithreaded apartment, the FolderBrowserDialog doesn't display the filetree for selecting a folder.
<br />
[System.STAThread]<br />
static void Main() <br />
{<br />
System.Windows.Forms.Application.Run(new MainForm());<br />
}<br />
Hope this helps? Otherwise there may be some more difficulties for displaying the FolderBrowserDialog.
|
|
|
|
|
Thank you very much, that was the solution
Greetings....
|
|
|
|