|
.NET Remoting (Security Exception)
|
|||
---|---|---|---|
#18+
Pocemu v clientskoi programme poeavleatiesea System.Security.SecurityException. Type System.DelegateSerializationHolder and the types derived from it are not permitted to be deserialized at this security level ?? Ia je pod adminom u sebea na computere Spasibo, ... |
|||
:
Нравится:
Не нравится:
|
|||
12.06.2004, 12:45 |
|
.NET Remoting (Security Exception)
|
|||
---|---|---|---|
#18+
Valeriu VrabiePocemu v clientskoi programme poeavleatiesea System.Security.SecurityException. Type System.DelegateSerializationHolder and the types derived from it are not permitted to be deserialized at this security level ?? Ia je pod adminom u sebea na computere Spasibo, Вы привели очень мало информации чтобы что то толковое сказать. ... |
|||
:
Нравится:
Не нравится:
|
|||
12.06.2004, 16:29 |
|
.NET Remoting (Security Exception)
|
|||
---|---|---|---|
#18+
Действительно, хотелось бы по больше информации... _________________________________________________ Легче написать не правильную программу чем понять правильную (С) Alan Perlis ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2004, 11:00 |
|
.NET Remoting (Security Exception)
|
|||
---|---|---|---|
#18+
backfire Valeriu VrabiePocemu v clientskoi programme poeavleatiesea System.Security.SecurityException. Type System.DelegateSerializationHolder and the types derived from it are not permitted to be deserialized at this security level ?? Ia je pod adminom u sebea na computere Spasibo, Вы привели очень мало информации чтобы что то толковое сказать. backfire Valeriu VrabiePocemu v clientskoi programme poeavleatiesea System.Security.SecurityException. Type System.DelegateSerializationHolder and the types derived from it are not permitted to be deserialized at this security level ?? Ia je pod adminom u sebea na computere Spasibo, Вы привели очень мало информации чтобы что то толковое сказать. Horoso! Bolee podrobno, (Vsea Programa) Prejde cem smotreti, Mogu scazati cito rabodaiet bez "configuration files". Ne znaiu pocemu problema v config. Spasibo Vot cod u clasa Server.cs using System; using System.Runtime.Remoting; public class Server{ public static void Main(string[] Args){ RemotingConfiguration.Configure("Central.config"); Console.WriteLine("The host application is currently running. Press Enter to exit."); Console.ReadLine(); } } Cod dlea ChatCoodinator.cs using System; using System.Runtime.Remoting; using System.Collections; // Define the class that contains the information for a Submission event. [Serializable] public class SubmitEventArgs : EventArgs{ private string _string = null; private string _alias = null; public SubmitEventArgs(string contribution, string contributor){ this._string = contribution; this._alias = contributor; } public string Contribution{ get{ return _string; } } public string Contributor{ get { return _alias; } } } // The delegate declares the structure of the method that the event will call when it occurs. // Clients implement a method with this structure, create a delegate that wraps it, and then // pass that delegate to the event. The runtime implements events as a pair of methods, // add_Submission and remove_Submission, and both take an instance of this type of delegate // (which really means a reference to the method on the client that the event will call). public delegate void SubmissionEventHandler(object sender, SubmitEventArgs submitArgs); // Define the service. public class ChatCoordinator : MarshalByRefObject{ public ChatCoordinator(){ Console.WriteLine("ChatCoordinator created. Instance: " + this.GetHashCode().ToString()); } // This is to insure that when created as a Singleton, the first instance never dies, // regardless of the time between chat users. public override object InitializeLifetimeService(){ return null; } // The client will subscribe and unsubscribe to this event. public event SubmissionEventHandler Submission; // Method called remotely by any client. This simple chat server merely forwards // all messages to any clients that are listening to the Submission event, including // whoever made the contribution. public void Submit(string contribution, string contributor){ Console.WriteLine("{0} sent: {1}.", contributor, contribution); // Package String in SubmitEventArgs, which will be sent as an argument // to all event "sinks", or listeners. SubmitEventArgs e = new SubmitEventArgs(contribution, contributor); if (Submission != null){ Console.WriteLine("Broadcasting..."); // Raise Event. This calls the remote listening method on all clients of this object. Submission(this, e); } } } Cod dlea Client.cs using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; public class ChatClient : MarshalByRefObject { private string username = null; public override object InitializeLifetimeService() { return null; } public ChatClient(string alias){ this.username = alias; } public void Run(){ RemotingConfiguration.Configure("Client.config"); ChatCoordinator chatcenter = new ChatCoordinator(); chatcenter.Submission += new SubmissionEventHandler(this.SubmissionReceiver); String keyState = ""; while (true){ Console.WriteLine("Press 0 (zero) and ENTER to Exit:\r\n"); keyState = Console.ReadLine(); if (String.Compare(keyState,"0", true) == 0) break; chatcenter.Submit(keyState, username); } chatcenter.Submission -= new SubmissionEventHandler(this.SubmissionReceiver); } public void SubmissionReceiver(object sender, SubmitEventArgs args){ if (String.Compare(args.Contributor, username, true) == 0){ Console.WriteLine("Your message was broadcast."); } else Console.WriteLine(args.Contributor + " says: " + args.Contribution); } public static void Main(string[] Args){ if (Args.Length != 1){ Console.WriteLine("You need to type an alias."); return; } ChatClient client = new ChatClient(Args[0]); client.Run(); } } Cod dlea Central.config <configuration> <system.runtime.remoting> <application> <service> <wellknown mode="Singleton" type="ChatCoordinator, ChatCoordinator" objectUri="Chat" /> </service> <channels> <channel ref="http" port="8080" /> </channels> </application> </system.runtime.remoting> </configuration> Cod dlea Client.config <configuration> <system.runtime.remoting> <application> <client> <wellknown type="ChatCoordinator, ChatCoordinator" url="http://localhost:8080/Chat" /> </client> <channels> <channel ref="http" port="0" /> </channels> </application> </system.runtime.remoting> </configuration> ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2004, 18:53 |
|
.NET Remoting (Security Exception)
|
|||
---|---|---|---|
#18+
backfire Valeriu VrabiePocemu v clientskoi programme poeavleatiesea System.Security.SecurityException. Type System.DelegateSerializationHolder and the types derived from it are not permitted to be deserialized at this security level ?? Ia je pod adminom u sebea na computere Spasibo, Вы привели очень мало информации чтобы что то толковое сказать. backfire Valeriu VrabiePocemu v clientskoi programme poeavleatiesea System.Security.SecurityException. Type System.DelegateSerializationHolder and the types derived from it are not permitted to be deserialized at this security level ?? Ia je pod adminom u sebea na computere Spasibo, Вы привели очень мало информации чтобы что то толковое сказать. Horoso! Bolee podrobno, (Vsea Programa) Prejde cem smotreti, Mogu scazati cito rabodaiet bez "configuration files". Ne znaiu pocemu problema v config. Spasibo Vot cod u clasa Server.cs using System; using System.Runtime.Remoting; public class Server{ public static void Main(string[] Args){ RemotingConfiguration.Configure("Central.config"); Console.WriteLine("The host application is currently running. Press Enter to exit."); Console.ReadLine(); } } Cod dlea ChatCoodinator.cs using System; using System.Runtime.Remoting; using System.Collections; // Define the class that contains the information for a Submission event. [Serializable] public class SubmitEventArgs : EventArgs{ private string _string = null; private string _alias = null; public SubmitEventArgs(string contribution, string contributor){ this._string = contribution; this._alias = contributor; } public string Contribution{ get{ return _string; } } public string Contributor{ get { return _alias; } } } // The delegate declares the structure of the method that the event will call when it occurs. // Clients implement a method with this structure, create a delegate that wraps it, and then // pass that delegate to the event. The runtime implements events as a pair of methods, // add_Submission and remove_Submission, and both take an instance of this type of delegate // (which really means a reference to the method on the client that the event will call). public delegate void SubmissionEventHandler(object sender, SubmitEventArgs submitArgs); // Define the service. public class ChatCoordinator : MarshalByRefObject{ public ChatCoordinator(){ Console.WriteLine("ChatCoordinator created. Instance: " + this.GetHashCode().ToString()); } // This is to insure that when created as a Singleton, the first instance never dies, // regardless of the time between chat users. public override object InitializeLifetimeService(){ return null; } // The client will subscribe and unsubscribe to this event. public event SubmissionEventHandler Submission; // Method called remotely by any client. This simple chat server merely forwards // all messages to any clients that are listening to the Submission event, including // whoever made the contribution. public void Submit(string contribution, string contributor){ Console.WriteLine("{0} sent: {1}.", contributor, contribution); // Package String in SubmitEventArgs, which will be sent as an argument // to all event "sinks", or listeners. SubmitEventArgs e = new SubmitEventArgs(contribution, contributor); if (Submission != null){ Console.WriteLine("Broadcasting..."); // Raise Event. This calls the remote listening method on all clients of this object. Submission(this, e); } } } Cod dlea Client.cs using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; public class ChatClient : MarshalByRefObject { private string username = null; public override object InitializeLifetimeService() { return null; } public ChatClient(string alias){ this.username = alias; } public void Run(){ RemotingConfiguration.Configure("Client.config"); ChatCoordinator chatcenter = new ChatCoordinator(); chatcenter.Submission += new SubmissionEventHandler(this.SubmissionReceiver); String keyState = ""; while (true){ Console.WriteLine("Press 0 (zero) and ENTER to Exit:\r\n"); keyState = Console.ReadLine(); if (String.Compare(keyState,"0", true) == 0) break; chatcenter.Submit(keyState, username); } chatcenter.Submission -= new SubmissionEventHandler(this.SubmissionReceiver); } public void SubmissionReceiver(object sender, SubmitEventArgs args){ if (String.Compare(args.Contributor, username, true) == 0){ Console.WriteLine("Your message was broadcast."); } else Console.WriteLine(args.Contributor + " says: " + args.Contribution); } public static void Main(string[] Args){ if (Args.Length != 1){ Console.WriteLine("You need to type an alias."); return; } ChatClient client = new ChatClient(Args[0]); client.Run(); } } Cod dlea Central.config <configuration> <system.runtime.remoting> <application> <service> <wellknown mode="Singleton" type="ChatCoordinator, ChatCoordinator" objectUri="Chat" /> </service> <channels> <channel ref="http" port="8080" /> </channels> </application> </system.runtime.remoting> </configuration> Cod dlea Client.config <configuration> <system.runtime.remoting> <application> <client> <wellknown type="ChatCoordinator, ChatCoordinator" url="http://localhost:8080/Chat" /> </client> <channels> <channel ref="http" port="0" /> </channels> </application> </system.runtime.remoting> </configuration> ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2004, 18:53 |
|
.NET Remoting (Security Exception)
|
|||
---|---|---|---|
#18+
Ваша проблема это FAQ. прочтите это http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B312114 это http://www.thinktecture.com/Resources/RemotingFAQ/Changes2003.html и это http://www.gotdotnet.com/team/changeinfo/Backwards1.0to1.1/default.aspx#00000153 ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2004, 22:38 |
|
|
start [/forum/topic.php?fid=19&msg=32560086&tid=1398154]: |
0ms |
get settings: |
10ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
148ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
49ms |
get tp. blocked users: |
2ms |
others: | 14ms |
total: | 260ms |
0 / 0 |