|
Hi.
It's me again, Peter.
I've tried an other lot of couple variations of settings,
at the adminstration tool, without any success.
I've rebuilded the code.
The site is trusted as well,as the code is trusted.
I haven't any more idea.
Maybe I should ask the Microsoft for it. Or have you done a real working example before?
I haven't seen any example before, what works.
well..
Please help if you have done some working client side usercontrol!
Please tell me the steps where I was fault.
(Sorry for my english )
Agyklon
|
|
|
|
|
Hi!
It's me again.
I found sum helpstuff:
[1] - http://www.gotdotnet.com/team/windowsforms/iesourcing.aspx
[2] - http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/default.aspx
At the IIS was something wrong. ([1]/3.)
There must be only for script executeing rights.
Now, the control is downloaded.
I can found it the cache: gacutil /ldl
but, i can't see everything, it appeares like just a missplaced image.
Site is trusted, there is new codegroup rights, and
i can found all of the rights at
framework configuration/runtime sec/right click/evaluate assembly.
suggestion:
more missconfigured parameters at IIS???
Agyklon
|
|
|
|
|
Try also looking at http://msdn.microsoft.com/msdnmag/issues/02/06/Rich/default.aspx[^]. This will provide you with a sample download that you can play with.
Assuming you have everything setup properly, my next guess would be that your code is throwing an exception that it is not handling. This could be because of security (see below) or simply a problem with your code. Make sure you have try..catch blocks everywhere and try attaching VS.NET to IE before you load your web page - this may enable you to debug your control.
Your code will run in a partially trusted environment, so certain things (e.g. disk access, registry access, web access anywhere other than the site where your control lives) are off limits. Your code will throw an exception (probably a System.Security.SecurityException ) if it attempts these tasks.
|
|
|
|
|
Bet you guys love me now huh?
How is this used MSDN says squat about it (ok not squat but it might as well be ). I remember reading somwhere in one of my books about it being able to tell windows you will be handling certain key presses (like the cursor keys) so it will not take over in the next hooking phase. But dammed if I can find out...
|
|
|
|
|
Hi,
This may help. For the KeyPress event of the control:
private void tbMsg_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if( e.KeyChar == ( char )13 ) // (char)13 is the return key.
{
// Tell the system that the keypress has been handled.
e.Handled = true;
// Do something. Here I'm simulating a button press.
button1_Click( this, e );
}
}
Nathan.
|
|
|
|
|
I'm trying to constrain a graphics object in a panel control (like drawing a square that moves in the panel that stops at the panel line) I am trying to use the Panel.Left and Panel.Right etc in a
if (x <= Panel.Left)<br />
x = x - 10;<br />
else x = Panel.Left;
but it is not constrained by this... Is there another way? The rectangle structure is Rectangle(x,y,10,10)
|
|
|
|
|
My guess is you will have to use a combination of mousecapture and hittest.
Cheers
Kannan
|
|
|
|
|
I figured it out my problem wasn't that I was going outside the panel it was the line redrawing when it hit the side and erasing the part by the panel.
|
|
|
|
|
how to programmatically trigger off an menu item
event?
someone told me that i should
-----------------------------
System.EventArgs args = new System.EventArgs();
this.menuitem1_Click(this, args);
-----------------------------
but i dont think this is correct since this is just executing an event instead of triggering it.
thank you.
regards
yccheok
|
|
|
|
|
You don't really want to trigger the event, you want to execute the code in the event handler. If this is something you will be doing often then have the event handler call another function or object method, which you can also call when needed.
|
|
|
|
|
Same thing in the end. "Triggering" an event due to the user pressing a key or clicking a mouse, eventually causes the event handler (menuitem1_Click in your case) to be executed. Actually, executing directly is much more efficient than when a user causes the event handler to fire.
Cheers
|
|
|
|
|
MenuItems have a PerformClick() method that might be what you're looking for. link[^]
|
|
|
|
|
Having just read Liong's article about using the Observer pattern for a chat server, I don't think that this pattern is appropriate for a situation involving remoting. After all, the GoF patterns were all about object interactions within an app.
Other than the Wiki (http://c2.com/cgi-bin/wiki[^]) which does my head in trying to find anything sensible on it , does anyone know of a catalogue of design patterns? E.g. some that apply to Remoting situations, others applying to other problem domains, etc.
|
|
|
|
|
|
There is a book called C# Design Patterns - A Tutorial that I have found really good.
It basically goes through the GoF patterns using C# examples.
Jarrod
|
|
|
|
|
I have arabic text in textBox1 and I need to convert it to Unicode in textBox2? is there any easy & fast way to do it?
Many Thanks,
Jassim rahma
|
|
|
|
|
Take a look at the System.Text.UnicodeEncoding class.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Hi,
I'm trying to code a chat server that supports tcp/udp connections as well as connections through remoting if the client is behind a firewall. How can I implement the server so that it will support both types of clients? The problem is that remoting requires the server object to be activated by the client but I need the server to be running all the time to support clients that are not using remoting to connect to it.
So the question is, how does an pre-existing object ( instantiated before the activation of the remoting object ) communicate with an object that is activated remotely by a client? The existing object and the activated object are in the same application domain ( I presume ).
This problem has been bugging me for days. I searched the net and there are a whole bunch of remoting tutorials, but none touches on this particular subject. Hopefully, some one here has a clue.
Nathan.
|
|
|
|
|
Well, if I understand you correctly you are trying to get your chat server to send a message to the chat client. This message would probably be a new posting to the current discussion. Not having done this before, I'm probably a little out of my depth but here goes anyway ...
Firewalls are obviously going to limit a direct TCP / UDP connection from the server to the client so that option is out. That means that all communication has to be initiated by the chat client. So two options spring to mind:
- Have the client poll the server every so often - you don't really get instant chat here and the closer you get to it (i.e. by polling more frequently) the more it clogs up your network and your server.
- Have the client initiate an asynchronous request to the server which blocks until the server services it. Then, when a new message comes in to the server it hands the message off to the client. The client sees the response come back and immediately opens another async request.
You'll need a reliable way of identifying individual clients - if you're concerned about firewalls then I don't think IP address will be good enough. Probably each client would need to get an ID from the server and send that along with every request made.
I'd say the second is preferable from a network traffic and immediacy point of view, but it probably won't scale with the number of users (e.g. 5000 users = 5000 connections at the server waiting to be filled). But then who'd want to be in a discussion with 5000 people?!? It will also make the server quite complex to implement as it will have to keep track of which messages have been passed out to which clients. Also, if you have a very active discussion, the client may struggle to keep up - this could be avoided by each client having a number of outstanding requests to the server, but that would further limit the scalability.
Anybody else have any other ideas?
|
|
|
|
|
John,
AFAIK .NET remoting supports serialization of client objects across channel by reference. I am banking on this reference to the client object to maintain a "connection" between server-client. To send a message back to the client I can simply call clientObjectRef.MsgServicingDelegate( Msg ); Indeed this solution will pose a scalability issue since, in affect, the client maintains an open channel with the server. Is this a wise solution? To what extent is the overhead required to maintain an open httpChannel? More importantly, how does the underlying framework acheives this feat?
Nathan.
|
|
|
|
|
Well, I wrote a little test app to try what you are suggesting and it didn't work. I got the very long error message "This remoting proxy has no channel sink which means either the server has no registered server channels that are listening, or this application has no suitable client channel to talk to the server. ". Hats off to MS for at least trying to make their error messages informative ...
A little digging on the web revealed a sample chapter from a Wrox book (http://www.wrox.com/books/sample-chapters/SampleChapter_186100740x.pdf[^]) which discusses a similar problem. If you look on page 24 of the PDF you'll see that they set the client app with a Remoting channel in order for the server to communicate with the client.
Once I'd modified my test app in this way, everything worked. However, I very much doubt that this will work if there's a firewall in the middle of the connection (which was the problem we were discussing).
|
|
|
|
|
Hi John,
For communicating across a firewall I believe you have to set the HttpChannel on the client side to port 80 or a port that is not blocked. I haven't tried this myself since I'm still coding the message/user handling routines for my chat server. If you have time on your hands could you verify this? Thanks.
Nathan.
|
|
|
|
|
It's not the port number that you've got to worry about. It's more the address translation and usual firewall rules base which are going to be issues. Firewalls, in general, don't allow incoming requests to an arbitrary machine protected by them, whatever the port number, unless they have been specifically configured to do so. It's quite usual for them to allow outgoing connections to any server on port 80, but that's a very different thing.
And no, I'm not going to setup a firewall with machines on both sides just so I can test something for you which I don't think will work anyway. Sorry mate, I'm not quite that helpful ...
|
|
|
|
|
Hallo
I have one problem with component MonthCalendar (C#).I need build calendar to my project but set for specific days different background color!!!Can you someone help me?
Robert
|
|
|
|
|