views:

124

answers:

2

Hi! I am trying to create a WCF service in JScript.NET. (I know, I should do it in C# or VB.NET, but humour me, please.) Has anyone done this before?

I can create .asmx web services, but I'm not sure how I have to modify web.config to make the .svc file work -- do I need to precompile things?

Also, I am (for right now) trying to do this using inline code -- is this feasible, or do I really need a code-behind if I'm doing things by hand...

Thanks!

A: 

You are going to need a code behind. The model for creating services in WCF is drastically different than the .asmx model for web services (WCF services are actually more than that).

And while you can do contract-first development with WCF services (which would prevent you from having to define interfaces and attributes, somewhat), some of WCF's power comes from using code constructs to define your contract. I don't think that this will be easy in a language like JScript. You might be able to get away with the actual implementation, but I think the contract definitions are going to be an issue for you if you use JScript.

casperOne
A: 

I think you can. But it won't necessarily be as easy as it is in VB.NET or C#.

tyndall