Home  /  Questions  /  Question



50   50
Aug 19, 2010


ActionServiceClient in MVC project

Where does ActionServiceClient come from in the MVC project? 

In the RepositoryBase class there is a getter/setter but the WCF service does not have anything with that name.  When I mouse over the text is says "ASPNETMVCApplication.ActionServiceReference.ActionServiceClient"  ActionServiceReference being the WCF service obviously.

When I mimic the code with my WCF service I don't have the property State, so the code below fails.
Code snippet follows: 

if (client.State == CommunicationState.Faulted)
What am I missing?
Thanks.




50   50
Aug 24, 2010
Dan, you are right. Somehow I added it as a Web Reference instead of a Service Reference.

=(  Doh!

830   99.9
Aug 23, 2010
William:

The ActionServiceClient is automatically generated when adding the Service References.
The Client derives from System.ServiceModel.ClientBase which is a .NET class and has the State property.

So, I am really not sure why you don't see State.
Could it have been a temporaray Intellisense problem?