I am currently developing a WCF service .net 4.0 which has got 2 properties. For some reason those property is not visible on the client.
Following is the code for the service.
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; using System.Data; using System.IO; using System.Configuration; using Longview.ScatIt.Data.Model; using Longview.ScatIt.Service.Contract; namespace Longview.ScatIt.Service { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "SqlJob" in code, svc and config file together. [ServiceContract] public class SqlJob : ISqlJob { #region IJob Members [DataMemberAttribute(Name="FileName")] internal string _fileName; [DataMemberAttribute(Name = "Location")] internal string _location; #endregion } }
I read somewhere on internet that in partial trust property need to be defined as "internal" and add [assembly: InternalsVisibleTo("System.Runtime.Serialization")] attribute in AssemblyInfo.cs in the service contract.
Am I doing something wrong because of which those to properties are not visible on the server?
Any suggestion is appriciated
Thanks