|
Hi, I m working on remoting to develop trading application to accept bid/ask value from user and broadcast to every connected user.
Process is working smoothly on localhost as well as on LAN.
But it is not working when i host app on static IP based server.Client send bid/ask value to server but does not get updates except client running on server.
Currently i m running server app manually by clicking on server.exe.
I did not get any change if I replace http channel with tcp
Any comment/suggestions r invited. Thanks all.
Client and Server Configuration file are given below.
Server Config File
-----------------------
<configuration>
<system.runtime.remoting>
<application name="Trading">
<service>
<wellknown mode="Singleton" type="Server.Broadcaster, Server" objectUri="Broadcaster.soap"/>
</service>
<channels>
<channel ref="http" port="16784">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
Client Config file
-----------------------
<configuration>
<system.runtime.remoting>
<application name="EventClient.exe">
<client>
<wellknown type="Common.IBroadcaster, Common" url="http://203.200.95.133:16784/Trading/Broadcaster.soap"/>
</client>
<channels>
<channel ref="http" port="0">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full"/>
</serverProviders>
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
|
|
|
|
|
webSpider wrote: <channel ref="http" port="16784">
If you are going through a firewall that will block that port that's not going to work.
led mike
|
|
|
|
|
Hi Led,
Thanks for reply,
well, firewall is off on server.
Is it should be off on both side?
how can i open port on client/server side.
ant other clue?
thanks
|
|
|
|
|
Also you will need to enable port forwarding in the router/modem if one is used.
|
|
|
|
|
I have been looking for a while now and cannot seem to locate a reason why VB sizes a Boolean as either a 32bit or 64bit value instead of just a single byte.
I am making the assumption that it has something to do with alignment in memory and speed in access but I would love to locate a real resource to verify it for me.
|
|
|
|
|
I think bools just default on .NET to the default pointer size. I could be wrong.
|
|
|
|
|
leppie wrote: I think bools just default on .NET to the default pointer size. I could be wrong.
Do you mean default int size? (not yanking chain,just asking )
Learn to write self marginalizing code!
Call 1-888-BAD-CODE
------------------
Silver member by constant and unflinching longevity.
|
|
|
|
|
This is the disassembly of Boolean, not sure if it will help.
public struct Boolean : ...
{
internal const int True = 1;
internal const int False = 0;
...
|
|
|
|
|
My VB is very rusty, but the following code outputs a '2', indicating a 16 bit value. This is very likely due to memory alignment.
Dim b As Boolean
Debug.Print(Len(b).ToString)
Semicolons: The number one seller of ostomy bags world wide. - dan neely
|
|
|
|
|
In C# System.Console.WriteLine ( "{0}" , sizeof(bool) ) ; yields 1, indicating one byte.
Both C# and VB.net are CTS languages so they should be the same.
|
|
|
|
|
Interesting... The following code for me in VB:
Dim var As Boolean = True
Console.WriteLine(Len(var).ToString)
Console.WriteLine(System.Runtime.InteropServices.Marshal.SizeOf(var).ToString) Renders:
2
4
|
|
|
|
|
See my response here[^] for why Marshal.SizeOf returns a different size.
As to using Len, I have a feeling you get different sizes due to this (from http://msdn.microsoft.com/en-us/library/dxsw58z6.aspx[^]: With user-defined types and Object variables, the Len function returns the size as it will be written to the file by the FilePut function. If an Object contains a String, it will return the length of the string. If an Object contains any other type, it will return the size of the object as it will be written to the file by the FilePut function.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
This is from sizeof (C# Reference)[^], but it should apply to VB as well.
sizeof(bool) returns 1. However, the following statements are also made:
Although you can use the SizeOf[^] method, the value returned by this method is not always the same as the value returned by sizeof. Marshal.SizeOf returns the size after the type has been marshaled whereas sizeof returns the size as it has been allocated by the Common Language Runtime, including any padding.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Hi all,
is there anyone here that have try to store VS.2003 source code to TFS using MSSCCI?
I have trouble when I try to store layering (3 tiers) application from VS 2003, steps that i've try:
1. Install Visual Studio Team Foundation Server MSSCCI Provider
2. Open ASP.Net Solution using VS 2003
3. Go to File-Source Control-Change Source Control
4. Unbind source safe connection to VSS
5. Go to File-Source Control-Add project to source control
6. Select Server, define workspace and click OK
Its work fine if the Solution is not in 3 tiers structure (UI Layer only)
But, there's an error message without any clue how to fix it when I try to do the same thing with 3 tiers application.
Please share the information how to do it correctly...
|
|
|
|
|
Hi,
I'm trying to upgrade my web project in 2002 to visual studio 2008. Using the Visual Studio Express edition file menu I browse the solution file of my project. This solution has 2 projects included. When I browse the solution file Upgrade Wizard is displayed. But when I say convert only the solution file is converted and the projects included to that solution is not getting upgraded. The conversion report says that the Web project component is not installed and could not convert the project. Can you please tell me what should be done to successfully convert all the projects in the solution.
Thanks in advance!
|
|
|
|
|
hi..........did u got any reply or answer to ur query........i'm facing the similar kind of situation..........pls lemme know
Thanks
|
|
|
|
|
Hi all,
Warm greetings.
I am new to the office add-in project and I am using Visual Studio 2005 and the frame work is 2.0.
Can any one tell me what are all the prerequisites in order to create an office plug-in / add-in project through the VS 2005.
Thanks a lot in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: Can any one tell me what are all the prerequisites in order to create an office plug-in / add-in project through the VS 2005.
No. No one knows that, and if anyone did it certainly would not be Microsoft and they certainly would not create a Office Developer Center[^] web site supplying information like that to developers.
Good luck, you're going to need it
led mike
|
|
|
|
|
Hi,
I have tried and im successful in transferring a large file say 200mb to from server to client. but the problem is i get 100% CPU usage while the file is transferring.
if i have a file of 200MB, it will have 209715200 bytes; now to send this file, i first made partitions of 4000Bytes. If we take Mode of its total size with 4000, we'll get 3200Bytes remaining, and the rest of it remains 209712000 which is exactly divisible by 4000. What my program do is first it sends the 3200Byte chunk and then the remaining 209712000Bytes. If we divide 209712000 by 4000, we'll get 52428. Which means the loop will run 52428 times in order to send the whole file. And same goes on the server side when it is receiving the file. These loops make my CPU hit 100%. And if i push the whole buffer to the network it says the buffer is full and EXCEPTION. Please tell me a good solution to transfer file without using that much CPU. I'm making a file sharing server, if CPU will hit 100% on one client, i wont be able to support more than two client or even 1.
modified on Wednesday, May 28, 2008 11:05 AM
|
|
|
|
|
tamour wrote: Please tell me a good solution to transfer file without using that much CPU
Why, you didn't even bother to tell us what mechanism you used in the solution you created.
led mike
|
|
|
|
|
Hallo Everyone
I need some insight on the following please?
I got a job offering about the Document and Imaging field. From what I know the company uses Documentum and Captiva amongst others to supply clients with business needs.
These applications needs to be customized and integrated to fit the business needs.
Now the thing is that I asked a simular question to one of my friends and he suggested that I rather go for a "straight" .Net developer path.
Are anyone involved in such integration? How are the growth in terms of programming and What can i expect in the future (salary wise), lets say in 5 and/or 10 yrs time?
If anyone can help me with the above?
I will highly apprecaite it.
Thanks,
Christiaan Pieters
|
|
|
|
|
Hi
I have been reading up on the network programming in .NET, and have come to multiplexing with socket.select(). However, I have found some information that says that this method is bugged because using -1 as timeout (i.e. block forever) returns immediately. The problem is that this information is a bit old and I can not find any place saying it is fixed. Anyone know the status of this problem? If it is fixed in VS 2008/.NET 3.5?
|
|
|
|
|
invictus3 wrote: I have found some information that says that this method is bugged because using -1 as timeout (i.e. block forever) returns immediately. The problem is that this information is a bit old and I can not find any place saying it is fixed.
It seems to me to be a fairly simple problem to test. If you use the method and it returns immediately then it is not fixed. If the method waits for whatever it is waiting for then it is fixed.
Also, where did you find this information? It is a reliable source?
|
|
|
|
|
invictus3 wrote: However, I have found some information that says that this method is bugged because using -1 as timeout
You should post a link so we can see it ourselves.
led mike
|
|
|
|
|
Sorry for the long text...
I'm using a dataset for the link between my application and the MS Access database. The problem I have is with the Update function of the table adapter object. The code is really simple and it works very well except in one situation. Here's the code (generated by dragging from the data source to the windows form):
this.tblRequestBindingSource.EndEdit();
this.tblRequestTableAdapter.Update(this.forms_Work_LogDataSet.tblRequest);
The situation when it doesn't work is very specific and I've tried it on several test applications and it seems to be caused by the dataset. When I create a new record and save right away, everything is fine. Then, if I make a modification to the record and save again, an Concurrency Violation exception is thrown. It only happens on new records. I can save as many times as I wish on already existing records, but not on new records.
Usually, Concurrency violation exception is due to the fact that more than one user is modifying the record, but in that case, only one user is modifying the information. It seems as if the first update didn't "EndEdit" even though it was clearly done if you look at my code. That's not good because when I call the update method of the table adapter, it's trying to update every changes made in that table of the dataset, meaning I can never save changes in the application data unless I restart the application because it's always throwing the exception.
I read many things on bypassing concurrency violation exceptions, and for the dataset, it seemed pretty logical to just remove the "optimistic concurrency" option. It didn't work, because well, that's probably not even the reason why it's throwing that exception.
I was wondering if this problem can be solved, without switching to a disconnected mode. I want a solution or a reason as to why we cannot insert a new record and save more than once without leaving the application. This problem can easily be reproduced by dragging a data source on a form and trying exactly what I wrote that isn't working fine. If someone has a solution for that, I'd really appreciate the help.
BTW, I won't accept "Don't use datasets" as an answer unless there really isn't an other solutions...
|
|
|
|