|
Marc,
Thanks for your help, I hope you won't mind a few more questions.
I got .NET remoting to work between two .exe's, seems very nice so far. If I create the remote object as a singleton (using multiple clients), will functions in that remote object be called from one thread in some order, or just called all at once? Do I have to synchronize those calls to shared objects?
Also, this service will eventually be called from a web app (ASP.NET) instead of a exe. Will each user's instance of the website be able to create a TcpChannel at the same port number to talk to the remote object, or will each of the client's have to have some knowledge of each other to find a unused port number to create that TcpChannel?
Thanks again,
Kevin
|
|
|
|
|
Kevin Tambascio wrote:
If I create the remote object as a singleton (using multiple clients), will functions in that remote object be called from one thread in some order, or just called all at once? Do I have to synchronize those calls to shared objects?
Honestly, I don't have a positive answer for that. However, since each instance gets its own AppDomain, I think that there would be multiple instances. I can't imagine it otherwise, actually. So I think you'll have to deal with synchronization yourself.
Kevin Tambascio wrote:
Also, this service will eventually be called from a web app (ASP.NET) instead of a exe.
Hmmm. You mean, on the client side? I don't think you can do that. That's what web services / SOAP is for, I think (again, i'm fuzzy on that).
Kevin Tambascio wrote:
Will each user's instance of the website be able to create a TcpChannel at the same port number to talk to the remote object,
My understanding is yes--the same port number is used. For example, I've been able to connect to my remote object from two different computers on my local network using the same port number. I *believe* that the initial port number is just for saying "hello", and then an unused port number is negotiated. I could be totally wrong though.
Sorry these answers are full of "I'm not sure". If you find out more, It would be great if you could let me know!
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Marc,
Found an interesting article here: http://builder.com.com/5100-6389-5034970.html
Seems like I can use .NET remoting. The webserver and windows service will be on the same machine. So I can technically use either, but performance will be better with straight remoting. In the future, I could also create a .NET client app that people could run from behind firewalls and use SOAP/Web Service, but that is down the road. I think I'm going to write some code to try and access my service from a web page and see how far I can get.
Thanks for your help,
Kevin
|
|
|
|
|
Hi all,
I'm working with Shellnotifications...
(http://www.codeproject.com/csharp/shellnotifications.asp?target=Shellnotifications)
I want to read out the InternetExplorer History Notifications.
I've changed the Register Event to CSIDL_HISTORY but it didn't work correctly.
If I click on an IE link, nothing happens.
I have seen it working in a vb project.
(http://vbnet.mvps.org/index.html?code/shell/shchangenotify.htm)
Somebody got a solution?
|
|
|
|
|
Yeah, correctly translate the VB code or ask in the forum in the Shell Notications article. That's why article forums are provided.
While language syntax may be different, the InternetExplorer out-of-process server is a COM automation server and can be accessed the same by any COM-compatible framework, like the .NET Framework. It will work if you define everything correctly (such as P/Invoking any required functions, declaring constants, etc.).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
How can i animate listView items icons???
ImageAnimator has no affect on them.
|
|
|
|
|
The List View common control - which the ListView Windows Forms control encapsulates, does not support animation (and why should it?). If you want to animate these, you'll have to extend ListView , override WndProc , and handle all the item painting (for an icon, for instance) yourself. These notification messages are documented in the Platform SDK under the UI section. See http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/listview/reflist.asp[^] for more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
string code = "05";
string str;
I want the string str as follows = "05" in that case the double quotes makes part of the sting.
I tried as follows :
str= "\"" + code + "\"";
I receive following (when I stand on str) --> "\"05\""
I tried also :
str = @"""" + code + @"""";
I receive following (when I stand on str) --> "\"05\""
How I can slove this?
Thx,
Jac
|
|
|
|
|
Your code is correct, the debugger displays the \-character just for your information
To see the correct value of "str", use Console.WriteLine(str);
|
|
|
|
|
As an off-topic note, do not concatentate strings like that. Any knowledge of characters arrays would tell you that string concatenations are a (m-1)O(2n) operation, where n is the number of characters and m is the number of strings. Strings are immutable and require that a string long enough for the the first two operands be created (which requires parsing the length of each string), and then characters are copied one-by-one into each. Then this repeats for each string.
Instead, use String.Concat for up to 4 strings, or use String.Format , which provides additional formatting facilities. In your case, the following expression would work well:
string str = string.Format("\"{0}\"", code);
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Dear all,
I have a big problem with datasets in c#. The problem that I have a huge data size which I have to locate it in the dataset (about 80500 records which joined to 100000 records in other table-master detail dataset-) and when I do that I have a problem with accessing the dataset with this amount of data
I have create a dataset with tow data tables and create a relation between the tow data tables
If any body knows any thing which can help with this problem could you please help me with it?
Thanks a lot
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Can't you load only part of data that you need at a time? Or you can use connected way instead of disconnected way, not sure if this has better perfomance.
Mazy
You're face to face,
With the man who sold the world - David Bowie
|
|
|
|
|
Sorry Mazdak ,
but in my application i ahve to use all theis data in the same time so i have to load all data to the dataset
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
What is your application doing with all this data? Is it disconnected? (e.g. it grabs a quantity of data then stores it locally while the PC is taken out into the field) Or is it always going to be connected? (e.g. an office computer on a LAN)
For 80K+ rows on one table joined to another in a dataset it a little excessive. If you must pull all this data on to the client then have you considered using a data reader to pull the data across? You won't have the storage issues because the only data being stored is the row being worked on. Of course this will only work for a foward only view of the data.
Have you considered not pulling the data to the client machine at all? Why not use a stored procedure to process the data on the server? That way you reduce network traffic also and since all the processing is done on the database server it should be much faster than processing it on the client.
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"Get in touch with your Inner Capitalist - I wish you much success!" -- Christopher Duncan, Lounge 9-Feb-2004
|
|
|
|
|
Dear Colin Angus Mackay,
Thank you for your replay first of all the application needs all this data in the client side for drawing, it is an application which deal with Maps and this data is a map data (vector map).
The problem which I have is somehow strange when I use fill all the data in one dataset I have the problem but when I have tried to divide the data on multiple datasets I had a better performance for the application why? I don't know.. in the tow cases I am using the same connection and the same data adaptor for data filling and I don't think that it is a problem of using data adaptor instead of using data reader, so if you have any other note could you please send it to me and I will be thankful for that
Best Regards
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Does matter what it's used for, loading all of it in a DataSet loads the entire data set into memory. Speed should be your last concern.
You don't need to load all of it into memory at once. Even applications like MapPoint don't need to load the entire map (topographical, politcal, whatever) with all its information into memory. Only the view is. Games are designed no differently. Entire worlds (maps) aren't loaded into memory at once. You'd get horrible fps! Besides, your drawing routines can't draw all those rows of data simultaneously - even with SMP.
Read-in your data in chunks - only a few rows at a time. There's no way you can speed-up the look-ups or decrease memory consumption to the point where anything graphical has any decent fps with this many records.
You'd be wise to pick up a book on games programming as well (even though this might not pertain to games). The concept of world/view is what you need. Only draw the data that's visible. There are other books that cover this sort of thing, too, but you'll probably find more books out there about programming games than anything else.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hii
i would like to know how to display Hindi or Chinese messages in my application.
i would also like to know how to display Menu items in some other language.
|
|
|
|
|
You must install characters in your development andd end user machine.
Mazy
You're face to face,
With the man who sold the world - David Bowie
|
|
|
|
|
Can u pls give me an example.
i mean when i write the code in the coding window it's always in english.
|
|
|
|
|
Anonymous wrote:
Can u pls give me an example.
i mean when i write the code in the coding window it's always in english.
Have you install those language i your machine? If yes, then simply choose the language from taskbar when you are in coding window. How do you type them in MS Word? And after that you have to SAVE AS it as Unicode Encoding, UTF-8 .
Mazy
You're face to face,
With the man who sold the world - David Bowie
|
|
|
|
|
First, as Mazdak said, you have to have the fonts (not characters) installed on your system. Many of the OpenType fonts like Arial, Verdana, and Times already have the full Unicode character set supported (at least at the time of their release).
You can further write your applications in your native language (known as the neutral language - the resources that are compiled into your primary assembly) and have other languages - not just text but layouts and other settings as well - in satellite assemblies. In you look in the .NET Framework SDK documentation, there's an entire section didicated to localizing applications, including some examples (though most of this can be done in the VS.NET designer if you like that sort of thing - just see the Localized and Language properties of the Form that's open in the designer).
See Developing World-ready Applications[^] in the .NET Framework SDK for more information, especially the section, Resources in Applications[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello, i used to develop my Web applications using the well know way.. Data layer, dataprovider class, bussiness layer, interface layer.. the dataprovider class is like this:
public class DataProvider
{
public void AddItem(Item item)
{
// SQL COMMANDS
}
public Item GetItem(int itemID)
{
// SQL Commands
return item;
}
}
the bussiness layer would look like this:
public class Item
{
int _itemID;
int _itemName;
int _blahBlah;
// properties
}
public class Items
{
public void AddNew(Item item)
{
DataProvider.AddItem(item);
}
public Item Get(int itemID)
{
Item item = DataProvider.GetItem(itemID);
return item;
}
}
well,, that was nice and lovely.. everything was ok,, until i had to do a windows Forms application... which i am not familiar with
the app i'm doing is kinda complicated.. its for a school. and i have to take care of students, subjects, administrators.. and so on therefore, if i use the old way i used to use in my web application.. i think i will have problems,, coz i will use alot of DataGrids..
Simply, i don't know what to do at all
i know about DataSet, but i don't know how to use it and n-tier application,, how to design the classes to deal with DataSets. should i do the old way but return datasets instead of particular objects "like Item for example", what the #$#$ should i do.. i'm really lost... Can u please help me
i just need to know how to design the layers.. just hints.. or main concept for designing classes that deals with DataSet...
thanx
|
|
|
|
|
|
i saw a sample in MSDN, it wasn't helpful.. i need suggestions
|
|
|
|
|
download thr trial al oloero, or llblgen and check out the samples. They use Collections or ArrayLists as "dataset" and classes that represent a table in the databases.
|
|
|
|
|