|
I'm not sure how you're transfering the data. If your sending a huge array of bytes, try sending a reference to the stream instead. Just have your remoted object return a stream object instead of the bytes.
Hope this helps
-Steve
|
|
|
|
|
I'm attaching the dataset to a container object, that is sent to the client. At the client, it then becomes the datasource of a datagrid. I need the data to be at client side completely, because data can be grouped and if not all data is present, inaccurate results are shown.
So I think a reference to the data is not an option here?
Anyway, I changed the configuration files. The web.config now looks like this:
<channels>
<channel ref="http">
<serverProviders>
<formatter ref="binary" />
<provider ref="wsdl"/>
</serverProviders>
</channel>
</channels>
and the client configuration file looks like this:
<channels>
<channel ref="http">
<clientProviders>
<formatter ref="binary" /> </clientProviders>
</channel>
</channels>
No I don't get the error anymore, instead I now get an 'out-of-memory' error!
Ludwig
|
|
|
|
|
Well, I probably found out the reason for this behaviour. In the event log I found the message:
"aspnet_wp.exe (PID: 1836) was recycled because memory consumption exceeded the 153 MB (60 percent of available RAM)."
The question is... how can I avoid my dataset being filled with too much data?
|
|
|
|
|
Sorry, I don't know. I'd really need a closer look at your code to understand what you're doing. Hopefully, someone else can give it a shot.
|
|
|
|
|
|
We ran into a similar issue with remoting large datasets, and came to the conclusion that if the dataset was large enough there were either memory leaks or at least garbage that was not reclaimed by GC in a timely fasion. There is an MSDN Mag article[^] that sheds some additional light on the issues. We ended up serializing the datasets ourselves, (basically into a collection of arraylists) and then reconstructing the dataset at the client from our custom object. This resulted in 30% less network bandwidth usage and a 100% speed increase. The fundamental problem seems to be that the contents of the dataset (datatables and datarelations) get seialized to XML even if the containing dataset is using a binary serializer, and in some cases this fails and some memory seems not to get reclaimed. Also, if the datasets are large, they get allocated on the large object heap which is not GC'd with the same frequency as other garbage (large objects are 'presumed' to have a longer lifetime... .
Some ideas are so stupid that only an intellectual could have thought of them - George Orwell
|
|
|
|
|
I am writing POP3 client in C#, i dont know how to get attchments from a mail. i am using Sockets to connect to a POP server. Any one know a generic way of seperating attachments from Mail contents. Any pointer?
Cheers,
Venkatraman Kalyanam
Chennai - India
"Being Excellent is not a skill, it is an attitude"
|
|
|
|
|
E-mail attachments are encoded using MIME, which is convoluted and ugly. I don't know of any free sources for decoding it. If your app will be GPL'd then you could gank some code from some *nix pop3 clients
I believe, the MIME 'standard' is documented as an RFC document.
FWIW, this is where I stopped writing my POP3 client as well
James
"The elastic retreat rings the close of play as the last wave uncovers
the newfangled way.
But your new shoes are worn at the heels and
your suntan does rapidly peel and
your wise men don't know how it feels to be thick as a brick."
"Thick as a Brick" from Thick as a Brick, Jethro Tull 1972
|
|
|
|
|
|
Hey guys
Are any of you famaliar with how to dock windows to the side of the screen, like the Taskbar does and programs such as ICQ and AOL Instant Messenger. If anyone has done this or knows where I can find information I'd appreciate it if you could send me in the right direction
I'm using C# / .NET, by the way.
Thanks
Dan
|
|
|
|
|
CP Clickety[^]
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
|
What I want is a remoting host that keeps one copy of the remoted object for each of the clients. I need my host to act this way because each client will request and decode a message. If the message is correctly decoded, a private boolean variable in the remoted object is set to true. This is the only way I could think of to authenticate clients without going through a login process.
If my host uses Singleton mode: once one client authenticates itself, all the clients will be authenticated. In other words, authentication can be bypassed if a legitemate user is already in.
If my host uses SingleCall mode: once a client authenticates itself, the remoted object will be destroyed, and the client won't be able to call any subsequent functions.
I hope this makes sense. Any suggestions would be greatly appreciated.
Thanks,
Steve
|
|
|
|
|
|
It seems to be flavour of the month atm, but I'm trying to develop a generic plugin architecture for extending application functionality. To achieve this I have a dll that contains interfaces for a base addin (IBaseAddin) and an addin manager (IAddinManager).
I have an application in mind that is already written, I just need to move some of it's functionality out into addins, which will be tab pages. I also want other people to be able to produce addins for the application, so I am producing and SDK too. Essentially the SDK just extends the generic dll described above, so we have MyAddin which inherits from TabPage and implements IBaseAddin and I also have IMyAddinManager, which extends IAddinManager. This SDK is also a separate dll and any addins will be implemented in their own dll exporting a single type that inherits from MyAddin.
The main form in the application implements IMyAddinManager (i.e. it is the addin manager itself) and has a LoadAddins method which is responsible for loading all addins in the \addins\ folder and addin each one to the tab control of the main form. The code to achieve this looks something like this atm:
public void LoadAddins()
{
IAddinManager manager = this;
DirectoryInfo dirInfo = new DirectoryInfo(Environment.CurrentDirectory + @"\addins\");
FileInfo[] fileInfo = dirInfo.GetFiles("*.dll");
foreach(FileInfo fileInfo in Files)
{
Assembly assembly = Assembly.LoadFrom(fileInfo.FullName);
try
{
Type[] types = assembly.GetExportedTypes();
object addin = assembly.CreateInstance(types[0].FullName);
if((null != addin) && (addin is TabPage))
{
((MyAddin)addin).Manager = manager;
this.tabControl.Controls.Add(addin as TabPage);
this.addins.Add(addin as IBaseAddin);
}
}
catch(Exception exc)
{
System.Diagnostics.Debug.WriteLine(exc.Message);
}
}
}
The line that tries to set the Manager property throws a System.InvalidCastException even though the debugger allows me to browse all of the relevant properties, etc. and shows the correct type. Any ideas why this isn't working?
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
|
Hi!
There is a main form with a set of child controls (buttons, labels, editboxes, etc). I need to paint some graphics OVER these controls. Overriding MainForm.OnPaint does not help -- all graphics is overshadowed by the controls. Any ideas?
Regards,
dur_kart
|
|
|
|
|
i have a simple network of two computer (xp prof installed on both).i have created a user on both machine with same name and password and both are members of admin.. group.
i have created a service in c# i am running it in local system account.
but i could not access any file on the network of another computer in my service of c#?
could any body help me in this regard?
r00d0034@yahoo.com
|
|
|
|
|
The problem you're running into is that while the "local system" account has virtually unlimited power on one machine, it's got no authority whatsoever across the network.
With Windows XP, a new built-in account "Network Service" was added that can access resources on remote machines authenticated as the machine account. I think however that this requires your machines to be part of a domain. If so, running your service as Network Service is probably a good approach.
If your machines aren't part of a domain, then you'll need to configure the service to run under a local account with a matching account on the machine you want to access. The username and password must match, and I think the workgroup name may have to match as well, though I'm not sure about that. If you configure your service to run under this account, it should be able to access remote files on any other machine with a matching account.
Hope that helps
Burt Harris
|
|
|
|
|
1. Say I have Project A, which references Project B and Project B then references Project C. Why must I add a reference to Projects B AND C in Project A?
2. What can I do to resolve a circular dependency? I have an application that references a class library (separate dll), but that class library requries access to a class in the main application. Hey presto circular dependency
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
If you have 3 DLLs and the referencing works like this:
A refs B which refs C, then A doesn't need to reference C at all.
Unless, there B exposes parameters that exist in C or something like that.
This doesn't make much sense.
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
my svg article
|
|
|
|
|
You'll probably need to rethink the packaging of your classes to avoid the circular dependencies. There are times that this means putting a class in a place that might seem "wrong", but it works out for the best.
The concept of Namespace is great for the logical partitioning of your applicaiton, where as packaging classes into Assemblies (the output from your projects) involves deployment decisions, security decisions, etc. When I originally started out with managed code, I tried for a 1:1 relationship between the two, but as I've gained experience with them, I realize that its often good to treat them as indepenednent dimensions.
One approach you might use to resolve the circularity is to define an abstract class in your DLL which is used by references in the DLL. The .EXE references the DLL, implements a class that inherits from the abstract class, and instantiates it. It's also possible to use interfaces to do the same thing, if in doubt, try the abstract base class first.
Burt Harris
|
|
|
|
|
Hi,
I would like to know how these parameters handled by runtime, that includes how memory is managed and alocated based on "ref" or "out" qualifier.
Any pointer is welcome...
Cheers,
Venkatraman Kalyanam
Chennai - India
"Being Excellent is not a skill, it is an attitude"
|
|
|
|
|
IMHO:
Memory is not allocated for ref parameters, they are like pointers in C++, the caller should allocate the memory.
And, the memory allocated by the out parameter is just like a return value of a function.
Don't forget, the memory allocation behaviour on .NET is well-defined, maybe you need to read something on the Garbage Collector.
I see dumb people
|
|
|
|
|
Hi , i have developed two controls that both are licensed.
QUESTION 1:
say i have :
control A
control B contains control A
both are licensed (using .lic files)
when i add control A to a form, vs.net automagicly adds a licenses.licx with information saying that control A uses a license.
so far so good.
but if i try to add control B to a form , vs.net adds informtion about control B into the licenses.licx as it should , the control appears in designtime..
but when i start , i get an error saying that no valid license could be found for control A!!!
so , why is it that the control can appear in designtime but not in runtime?
and how can i make control B add information about both itself and control A into the licenses.lixs when i add it to a form?
-----------------------------------------------------------------------------------------------
QUESTION 2:
if only one of my controls uses licenses (using .lic files).
say Control A is licensed but control B is not.
Control B contains Control A.
if a user of my controls then adds control B to a form , nothing gets added to the licenses.licx.
so , how can i make one control add license information about another into the licenses.licx???
//Roger
|
|
|
|