Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enum values problem
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Windows Communication Foundation (WCF)
Titre:
Enum values problem
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01608147
Message ID:
01608147
Vues:
45
Hi all, I recently added a new Property of type Enum to a class that is used in a WCF application, I've decorated the enum with the necessary attributes ( I think ) and also the interface.
[ServiceContract(Namespace = "http://PJKSolutions.com/24/09/2014", Name = "IPJKSolutionsService")]
[ServiceKnownType(typeof(ChargeType))]

public interface IPJKSolutionsService
{
// Removed for brevity.
}


[DataContract]
    public enum ChargeType
    {
        [EnumMember]
        Daily = 1,
        [EnumMember]
        Hourly,
        [EnumMember]
        FixedFee
    }
A problem occurs when I call a method in the service that involves the modified class ( i.e the one that I've added the enum property to ) I receive an error which is either
System.ServiceModel.CommunicationException was unhandled by user code
  HResult=-2146233087
  Message=The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:09:59.9599977'.

// Lots of stack trace and stuff removed by me.
or a similar one about the server being in a Faulted state, I know it's the enum property thats causing this because I removed it and all is fine again. Any ideas ?
Regards,
Peter J. Kane



Pete
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform