|
Your problem is multifaceted and will require at least two solutions - or more. For example, in designing a server like you describe you are really creating a message broker or gateway. If Chat I/O is not critical you might consider going connectionless and use UDP. You can still build your own application protocol to handle sequence and drops, and this would let you get around the network stream issue. At the same time with UDP you can use multicast addressing so that one peer can effectively send to a collective group of IP addresses. An example is if you need to bring the server down it would make for decent but not perfect way of letting the bulk of the users know the system is immenently going down. I say decent because trying to reach every single last chat client is prone to all sorts of network issues. But for the most part such a broadcast or multicast mechnism is still useful.
Now the other problem is in a word: security. If you are planning on communicating thru firewalls then you will have to take VPNs and possibly SSL into account. At the same time, if your company has a VPN that end users dial into or access through the Internet, then they would be able to access your server across the enterprise. Indeed the network people at your company can tell you what to expect and you will need to make sure your app meets their requirements.
To start off, concentrate of getting the message brokering piece to be very efficient and work 100% inside your intranet. Make sure you run lost of stress tests. I recommedn writing a couple of test harnesses that pound your broker from both sides with hundreds of connections (use threads). Once you are certain that your broker is working, any remote user with VPN access should be able to see you broker if allowed by network ops. Thus challenge is get the chat client and broker working BEFORE you stroll into the network ops depertment and ask them to open up a firewall port. Chances are that is a non-trivial question that needs executive sponsorship.
Good luck!;)
Mike
|
|
|
|
|
iam sorry i didn't understand anything from what did you said?
But what is a broker ?
and how can i make mulitcasting mechanism.
but is it effective
Mess With The Best And Die Like The Rest
|
|
|
|
|
Hey everyone. I was wondering is there a way to know if the user clicked the Back button in their browser in the page load or anything?
Sincerely,
The Major Rager
|
|
|
|
|
I used Crystal Report 10 for created my report and then i added the report to my project.
I opened the report in V.S.2003 and change it, then i saved it in V.S.2003 too.
V.S.2003 told me that it's Crystal Report version is older than my Crystal Report version, but i saved the changed report in it.
Now when i install the project in a client machine , my report don't work.
My language is V.C#.NET & my project is a windows base.
what can i do ,to solve this problem?
|
|
|
|
|
Hello!
I am trying to create simple window form, and I have
a problem... When I write "using System." at the
beginning of the code, I don't see the namespace
Windows...
Maybe I need to use some DLL's... I just don't
know...
Maybe someone could help me with it?
Thanks in advance!
|
|
|
|
|
Hi there,
You have to ensure that the dll System.Windows.Form.dll is included into ur project.
<< >>
|
|
|
|
|
Where can I check it?
And maybe it is a stupid question, but it is also a .NET Framework dll, right?
Thanks a lot!
|
|
|
|
|
You can check this in the Add Reference dialog....
No stupid question, only stupid answer...
<< >>
|
|
|
|
|
Hi all,
I have datetime field in database. When I am getting records older than
specific date that I passed in parameter I can not get records that
differs only in Time part of the datetime value.
Looks like comparison of Time portion in query failed.
I am using ACCESS database and ADO OleDbCommand. When in debug in Visual Studio QuickWatch clearly can see that the record that am going to get is older than datetime in TimestampParam by 10 sec (for example). If I substract 1 day from the
database field value I am getting the record. It is definetly time
portion comparison failed.
These are some lines from my code to show how I am reading database
OleDbDataAdapter adapter = new OleDbDataAdapter();
myCommand.CommantText = "SELECT [NetLog].* FROM [NetLog] WHERE
Timestamp < TimestampParam"
adapter.SelectCommand = myCommand;
System.Data.DataSet dataSet = new System.Data.DataSet();
int iNumRows = adapter.Fill( dataSet );
I would appreciate any advice
Thanks,
Roman
|
|
|
|
|
Hi,
As you say, it sounds like the time part of DateTime is getting lost somewhere. I am unclear how you are passing this DateTime to your query code; your code snippet uses 'TimestampParam' hardcoded into the query string - what is this? Can you clarify this as I'm trying to reproduce the behaviour.
Regards,
Rob Philpott.
|
|
|
|
|
String myConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Data Source=""./data/abel.mdb"";Jet OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";
OleDbConnection myConnection = new OleDbConnection(myConnectionString);
OleDbParameter parameter = new OleDbParameter();
parameter.ParameterName = "@TimestampParam";
parameter.Value = DateTime.Now;
OleDbCommand myCommand = new OleDbCommand();
myCommand.Connection = myConnection;
myCommand.CommandText = "SELECT [NetLog].* FROM [NetLog] WHERE Timestamp < @TimestampParam";
myCommand.CommandType = CommandType.Text;
myCommand.Parameters.Add(parameter);
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = myCommand;
DataSet dataSet = new DataSet();
int iNumRows = adapter.Fill( dataSet );
Get zero rows when records differ only in time portion,
Thanks
|
|
|
|
|
Hi,
I've boshed together a similiar set up - an access mdb with a DateTime column and a text column with test strings in it, and used similiar code to yours (I have used OleDbDataReader rather than OldDbDataAdapter /DataSet ), and for me the time is working correctly. My time part of DateTime is reaching the query.
I notice that your code is missing a line telling the parameter its type:
parameter.OleDbType = OleDbType.Date;
I'm surprised your not getting type mismatch exceptions thrown without this. I'd certainly include that and try again.
If still no luck drop me a line and I'll send you my code through for comparison.
Regards,
Rob Philpott.
|
|
|
|
|
Thank you, Rob
Eventually I fixed that using your clue about types.
|
|
|
|
|
Hi,
I have a textbox and when the text entered is longer than the length of the box, only the end portion that fits within the textbox is shown. How can I make it so that when someone enters a long string and presses Enter, that the beginning portion shows?
Thanks so much!!!
Mel
|
|
|
|
|
Hi,
You can move the displayed text in a text box so that the beginning is visible by setting the SelectionStart property to zero. I'd suggest attaching this code to the LostFocus (Leave) event so that the textbox displays correctly when you tab out of it. Hitting enter is usually reserved the default button.
Regards,
Rob Philpott.
|
|
|
|
|
Perfect. Thanks so much!
Mel
|
|
|
|
|
When i call the AsinSearch Amazon web service, i get the following error
"An unhandled exception of type 'System.NullReferenceException' occurred in SellerSearch.exe
Additional information: Object reference not set to an instance of an object."
I've narrowed it down to the following piece of code:
ProdInfo = Doc.ChildNodes[1]
["ProductInfo"]
["ThirdPartyProductInfo"];
dsInventory.Tables["tblSellerData"].Rows.Clear();
for (Counter = 0; Counter < ProdInfo.ChildNodes.Count; Counter ++)
{
Details = ProdInfo.ChildNodes[Counter];
DR = dsInventory.Tables["tblSellerData"].NewRow();
DR["Asin"] = Details["BrowseName"].InnerText;
//DR["Asin"] = Details["Asin"].InnerText;
//DR["Price"] = Details["ExchangePrice"].InnerText;
//DR["ListingID"] = Details["ExchangeId"];
//DR["ProductName"] = Details["
dsInventory.Tables["tblSellerData"].Rows.Add(DR);
}
}
ProdInfo is an xmlNode.
The XML is coming through just fine. You can see it by putting the following uri in a browser:
http://xml.amazon.com/onca/xml2?t=webservices-20&dev-t=099CQN95JW6909V9T8R2&AsinSearch=B00005JKDR&type=heavy&offer=Used&offerpage=1&f=xml
I'm stuck and can't figure out what the problem is.
any ideas?
Thomas Barker
|
|
|
|
|
Hi Thomas,
Without looking at it too closely, can you not narrow down where the exception occurs by stepping through the code in the debugger. Presumably the error arises from either parsing the xml document or populating the table row.
Regards,
Rob Philpott.
|
|
|
|
|
when the code breaks, it highlights exactly the following line:
ProdInfo = Doc.ChildNodes[1]
["ProductInfo"]
["ThirdPartyProductInfo"];
the problem is that i'm not sure how to fix the problem because it compiles fine. Perhaps it is my incomplete knowledge of how to manipulate xml or even the amazon wsdl correctly. (I started learning C# on monday)
As far as i can tell i've got the xml field names correct and the datagrid field names correct. I also think my nodes are named right. I'm just not experienced enough to figure this one out.
thanks for your help!
Thomas Barker
|
|
|
|
|
Hi Thomas,
It's getting close to my bedtime (beauty sleep and that) but I'll have a look at this in the morning and get back to you. I take it you are loading the whole content into an XmlDocument?
Regards,
Rob Philpott.
|
|
|
|
|
yes. you can see the xml document by just plugging the url i mentioned in the original post into a browser.
thanks for your help.
Thomas Barker
|
|
|
|
|
Hi Thomas,
I meant were you loading the xml content into an object of class System.Xml.XmlDocument? My guess is that you are. (an alternate is to use a class hierarchy built automatically from the wsdl/schema). How are you making the Http request?
I think the problem possibly lies in the way you are navigating the document. This line:
ProdInfo = Doc.ChildNodes[1]["ProductInfo"]["ThirdPartyProductInfo"];
is going to fail because ThirdPartyProductInfo is not a child node of ProductInfo (just looking at the xml in the browser) - it is a child node of Details which is a child node of ProductInfo.
I'd argue that this isn't a good way to go about navigating around an xml document. By chaining indexers together like this, if you get the path wrong in one of them is going to return null, and when you call the next indexer on a null reference you're going to get a NullReferenceException - what I believe is happening presently. It's not clear what part failed.
Instead, you could use XmlDocument.SelectSingleNode passing it an XPath expression for the node you are seeking.
Hope that helps!
Regards,
Rob Philpott.
|
|
|
|
|
I noticed a problem with this program I made. It basically just opens database files using the OleDbDataAdapter, and for some odd reason, it cannot open database files that are outside of its own directory. For example, if the project is in D:\project, and the database file is in D:\project\database.csv. It will work, but on the other hand if the database file is in C:\database.csv, it will not open it. I was wondering if anyone could help me with this.
Here is my code:
<br />
oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dir + @";Extended Properties=""text;HDR=Yes;FMT=Delimited""";<br />
oleDbConnection1.Open();<br />
<br />
|
|
|
|
|
The way to make this work is as follows
string dir = @"C:\database.csv"
or
string dir = @"\\myremotepc\sharefolder\database.csv"
oleDbConnection1.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dir";Extended Properties=""text;HDR=Yes;FMT=Delimited""";
|
|
|
|
|
Thanks for your reply, it turned out it was whitespace. I had whitespace in my connection string. That is why it was crashing.
Sincerely,
The Major Rager
|
|
|
|