Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralConsume a Web Service Pin
hxxbin6-Feb-04 8:44
hxxbin6-Feb-04 8:44 
GeneralRe: Consume a Web Service Pin
Mazdak6-Feb-04 8:54
Mazdak6-Feb-04 8:54 
GeneralMarshaling Type of Unknown Size (SHItemID) Pin
Tristan Rhodes6-Feb-04 7:56
Tristan Rhodes6-Feb-04 7:56 
GeneralRe: Marshaling Type of Unknown Size (SHItemID) Pin
Nick Parker7-Feb-04 8:23
protectorNick Parker7-Feb-04 8:23 
Questionhow do I map a network drive in C# Pin
laptop_016-Feb-04 6:59
laptop_016-Feb-04 6:59 
AnswerRe: how do I map a network drive in C# Pin
Bill Dean6-Feb-04 7:13
Bill Dean6-Feb-04 7:13 
GeneralRe: how do I map a network drive in C# Pin
laptop_016-Feb-04 7:24
laptop_016-Feb-04 7:24 
GeneralProblem setting enum field value using Remoting Pin
claughlin6-Feb-04 6:18
claughlin6-Feb-04 6:18 
I am experiencing a very strange problem while trying to set the value of a public field in a class that is being accessed using .NET remoting. Assuming the following definitions:

public enum BuildMethod {
DropBox,
CVS,
}

public class BuildInfo : System.MarshalByRefObject {

/// <remarks>
public BuildMethod Method;

...
}


The problem occurs in my client when I am trying to set the value of the Method field of BuildInfo, i.e.:

xxxx.Method = BuildMethod.DropBox;

There does not appear to be a problem retrieving the value of the Method field, but only when I try to set it.


Exception Details:

System.Runtime.Remoting.RemotingException: The argument type 1 cannot be converted into parameter type Matrix.Definitions.Schema.BuildMethod.


Stack Trace:

[RemotingException: The argument type 1 cannot be converted into parameter type Matrix.Definitions.Schema.BuildMethod.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +877
System.Object.FieldSetter(String typeName, String fieldName, Object val) +0
Matrix.ProductMgmt.DeliveryMethodEditor.Save_Click(Object sender, EventArgs e) in D:\Matrix\WebApp\Application\ProductMgmt\DeliveryMethodEditor.ascx.cs:116
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1277



I am setting up the channel on the server side like this:

System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider SinkProvider =
new BinaryServerFormatterSinkProvider();
SinkProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["port"] = 10782;
this.ServiceChannel = new TcpChannel(props, null, SinkProvider);
ChannelServices.RegisterChannel(this.ServiceChannel);


I am making the object available on the server side using RemotingServices.Marshal().


I would appreciate any help or suggestions that anyone can provide. Thank you,
Clark Laughlin
GeneralRe: Problem setting enum field value using Remoting Pin
Heath Stewart7-Feb-04 19:39
protectorHeath Stewart7-Feb-04 19:39 
GeneralRe: Problem setting enum field value using Remoting Pin
ClarkLaughlin8-Feb-04 9:03
ClarkLaughlin8-Feb-04 9:03 
GeneralDate Difference Pin
hxxbin6-Feb-04 6:17
hxxbin6-Feb-04 6:17 
GeneralRe: Date Difference Pin
Mazdak6-Feb-04 7:26
Mazdak6-Feb-04 7:26 
GeneralRe: Date Difference Pin
Heath Stewart7-Feb-04 19:40
protectorHeath Stewart7-Feb-04 19:40 
GeneralAn XML newbie's problem Pin
cemlouis6-Feb-04 5:50
cemlouis6-Feb-04 5:50 
GeneralRe: An XML newbie's problem Pin
Kentamanos6-Feb-04 8:50
Kentamanos6-Feb-04 8:50 
GeneralRe: An XML newbie's problem Pin
cemlouis8-Feb-04 8:59
cemlouis8-Feb-04 8:59 
GeneralResources files in VS.NET with CSharp. Pin
NeoAsimov6-Feb-04 5:50
NeoAsimov6-Feb-04 5:50 
GeneralRe: Resources files in VS.NET with CSharp. Pin
Kentamanos6-Feb-04 9:07
Kentamanos6-Feb-04 9:07 
GeneralRe: Resources files in VS.NET with CSharp. Pin
NeoAsimov6-Feb-04 9:28
NeoAsimov6-Feb-04 9:28 
GeneralAdding an event to prepackaged control Pin
dgroves6-Feb-04 5:01
dgroves6-Feb-04 5:01 
GeneralRe: Adding an event to prepackaged control Pin
Heath Stewart7-Feb-04 19:43
protectorHeath Stewart7-Feb-04 19:43 
GeneralRe: Adding an event to prepackaged control Pin
dgroves9-Feb-04 4:42
dgroves9-Feb-04 4:42 
GeneralPrivate Assembly in same Solution Pin
Anonymous6-Feb-04 4:52
Anonymous6-Feb-04 4:52 
GeneralRe: Private Assembly in same Solution Pin
Heath Stewart7-Feb-04 19:47
protectorHeath Stewart7-Feb-04 19:47 
GeneralObject reference not set to an instance of an object. Pin
cdwaddell6-Feb-04 4:06
cdwaddell6-Feb-04 4:06 

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.