Click here to Skip to main content
15,916,379 members
Home / Discussions / C#
   

C#

 
AnswerRe: MDI child issues (update) Pin
Alaric_11-Sep-06 18:55
professionalAlaric_11-Sep-06 18:55 
JokeRe: MDI child issues (update) Pin
Nader Elshehabi11-Sep-06 19:07
Nader Elshehabi11-Sep-06 19:07 
Questionhelp Pin
941549611-Sep-06 10:32
941549611-Sep-06 10:32 
AnswerRe: help Pin
Drew McGhie11-Sep-06 10:43
Drew McGhie11-Sep-06 10:43 
AnswerRe: help Pin
Nader Elshehabi11-Sep-06 10:50
Nader Elshehabi11-Sep-06 10:50 
AnswerRe: help Pin
Professor Sharada Ulhas11-Sep-06 11:10
Professor Sharada Ulhas11-Sep-06 11:10 
GeneralRe: help Pin
led mike11-Sep-06 11:48
led mike11-Sep-06 11:48 
QuestionHaving a small issue with typed dataset Pin
Shriniwasan Viswanathan11-Sep-06 9:29
Shriniwasan Viswanathan11-Sep-06 9:29 
AnswerRe: Having a small issue with typed dataset Pin
gus_br11-Sep-06 11:37
gus_br11-Sep-06 11:37 
QuestionHow to use array list in a recursive function:(pls help) Pin
aynka200011-Sep-06 8:51
aynka200011-Sep-06 8:51 
AnswerRe: How to use array list in a recursive function:(pls help) Pin
Guffa11-Sep-06 8:58
Guffa11-Sep-06 8:58 
AnswerRe: How to use array list in a recursive function:(pls help) Pin
Nader Elshehabi11-Sep-06 9:03
Nader Elshehabi11-Sep-06 9:03 
QuestionHow to create a resizable Windows.Forms.Control object? [modified] Pin
ystl11-Sep-06 8:04
ystl11-Sep-06 8:04 
AnswerRe: How to create a resizable Windows.Forms.Control object? Pin
Nader Elshehabi11-Sep-06 8:21
Nader Elshehabi11-Sep-06 8:21 
GeneralRe: How to create a resizable Windows.Forms.Control object? Pin
ystl14-Sep-06 6:10
ystl14-Sep-06 6:10 
QuestionDataGrid Update Problem Pin
llap44411-Sep-06 6:34
llap44411-Sep-06 6:34 
AnswerRe: DataGrid Update Problem Pin
Nader Elshehabi11-Sep-06 7:01
Nader Elshehabi11-Sep-06 7:01 
GeneralRe: DataGrid Update Problem Pin
llap44411-Sep-06 7:26
llap44411-Sep-06 7:26 
GeneralRe: DataGrid Update Problem Pin
Syed Shahid Hussain11-Sep-06 7:40
Syed Shahid Hussain11-Sep-06 7:40 
QuestionHow to change "ReadOnly" value with Controls[] Pin
N3croman11-Sep-06 6:03
N3croman11-Sep-06 6:03 
AnswerRe: How to change "ReadOnly" value with Controls[] Pin
Nader Elshehabi11-Sep-06 6:15
Nader Elshehabi11-Sep-06 6:15 
GeneralRe: How to change "ReadOnly" value with Controls[] Pin
N3croman11-Sep-06 6:23
N3croman11-Sep-06 6:23 
GeneralRe: How to change "ReadOnly" value with Controls[] Pin
Judah Gabriel Himango11-Sep-06 7:09
sponsorJudah Gabriel Himango11-Sep-06 7:09 
Question"This assembly does not allow partially trusted callers" when program executed from network drive Pin
Nigor11-Sep-06 6:01
Nigor11-Sep-06 6:01 
I have a remoting app that works fine when executed from a local hard drive, but will give "This assembly does not allow partially trusted callers" exception when executed from a network drive. The remoting app is used for transfering files. The code for server, shared assembly, and client:

<br />
// Client:<br />
// ---------------------------------------------------------------<br />
<br />
using System;<br />
using System.Collections;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Runtime.Remoting;<br />
using System.Runtime.Remoting.Channels;<br />
using System.Runtime.Remoting.Channels.Http;<br />
using System.IO;<br />
<br />
namespace RemotingTest<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
IDictionary properties = new Hashtable();<br />
<br />
SoapClientFormatterSinkProvider clientSinkProvider = new SoapClientFormatterSinkProvider();<br />
SoapServerFormatterSinkProvider serverSinkProvider = new SoapServerFormatterSinkProvider();<br />
<br />
serverSinkProvider.TypeFilterLevel =<br />
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;<br />
<br />
properties["name"] = "";<br />
properties["port"] = 0;<br />
properties["typeFilterLevel"] = "Full";<br />
<br />
HttpChannel commChannel = new HttpChannel(properties, clientSinkProvider, serverSinkProvider);<br />
<br />
ChannelServices.RegisterChannel(commChannel, false);<br />
<br />
RemotingConfiguration.RegisterWellKnownClientType(<br />
typeof(ServerInterface),<br />
"http://igor.no-ip.ca:1024/Server"); // change to appropriate address here<br />
<br />
ServerInterface server = new ServerInterface();<br />
<br />
string text = "";<br />
<br />
while((text = Console.ReadLine()) != "Quit")<br />
{<br />
Console.WriteLine(server.ShowText("testing string"));<br />
Console.WriteLine(server.ShowFileInfo(text).Name);<br />
}<br />
<br />
Console.Read();<br />
}<br />
}<br />
}<br />
<br />
<br />
// Server Interface:<br />
// ------------------------------------------------------------<br />
<br />
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.IO;<br />
<br />
namespace RemotingTest<br />
{<br />
public class ServerInterface: MarshalByRefObject<br />
{<br />
public FileInfo ShowFileInfo(string filename)<br />
{<br />
Console.WriteLine("Filename " + filename + " requested");<br />
<br />
return new FileInfo(filename);<br />
}<br />
<br />
public string ShowText(string text)<br />
{<br />
Console.WriteLine(text);<br />
<br />
return "\"" + text + "\" show on the server.";<br />
}<br />
}<br />
}<br />
<br />
<br />
// Server:<br />
// --------------------------------------------------------------------<br />
<br />
<br />
using System;<br />
using System.Collections;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Runtime.Remoting;<br />
using System.Runtime.Remoting.Channels;<br />
using System.Runtime.Remoting.Channels.Http;<br />
<br />
namespace RemotingTest<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
IDictionary properties = new Hashtable();<br />
<br />
SoapServerFormatterSinkProvider serverSinkProvider = new SoapServerFormatterSinkProvider();<br />
<br />
serverSinkProvider.TypeFilterLevel =<br />
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;<br />
<br />
properties["name"] = "";<br />
properties["port"] = 1024;<br />
properties["typeFilterLevel"] = "Full";<br />
properties["machineName"] = "igor.no-ip.ca"; // THE MAGIC LINE !!!<br />
<br />
HttpChannel commChannel = new HttpChannel(properties, null, serverSinkProvider);<br />
<br />
ChannelServices.RegisterChannel(commChannel, false);<br />
<br />
RemotingConfiguration.RegisterWellKnownServiceType(<br />
typeof(ServerInterface),<br />
"Server", WellKnownObjectMode.SingleCall);<br />
<br />
Console.Read();<br />
}<br />
}<br />
}<br />


Please help.
AnswerRe: "This assembly does not allow partially trusted callers" when program executed from network drive Pin
Judah Gabriel Himango11-Sep-06 7:02
sponsorJudah Gabriel Himango11-Sep-06 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.