c# - WCF - Cannot resolve [WebGet] symbol - what am I doing wrong? -
I am working on a rest WCF project and when I apply the following code, it complains that Can not solve this WebGet class? What am I missing?
I tried to import the system. Servicemodel. Web name space but I can not refer to it, though I refer to it. "Web" in System.ServiceModel.Web, when I register in a statement being used at the top of my code, it is not registered.
Actually, I need to apply such WCF reef concepts such as WebGet, WebInvok, Urememplate, etc.?
Update: After thinking about some feedback and thinking about it, I think that what DLL (System.ServiceModel & System) .ServiceModel .Web) When I go to add a project reference do not come through the 'Add Reference' window. When I first started the project, FYI, because these assemblies did not come for the first time, I was searching for them, and copied them to a temporary folder so that I could refer them and thus, I think That's the issues to solve me. So, now that I am at this point, how can I identify / register these WCF REST DLLs to my VS? Thanks!
Update: I believe I'm an update-to-date on everything: Developing on VS 2008 SP1 - I try to download the latest SP, The remaining preview 2 starter download kit is developing against 3.5 framework, trying to create a WCF REST layer, which can eventually be consumed by the Silverlight 2 client.
I have it:
using the system; Using System.Collections.Generic; Using System.Linq; Use the system. time. Timeliness; Using System.ServiceModel; Using System.Text; Using UtilityClasses; Using Microsoft.ServiceModel.Web; Use of Microsoft Hpt; Namespace WcfRestService {[ServiceContract] Public Interface IRSTService {{OperationContract (name = "AD")] [WebGet (Urememplate = "/")] ** ** can not be compiled here **; }}
Any advice would be greatly appreciated.
This also happened to me.
I did this:
- The system from the context Service. Delete the web
- Create
- div>
Comments
Post a Comment