How do I create a web service with Framework 4.0?
-
I have my web site ready for my UI person to pretty it up. All I have left to do is write the web service for it so other web sites can use it. I didn't think it would be this puzzling since I had seen that option before as a project template and I understand (at a high level at least) what SOAP is. I've already coded using the web site with Entity Framework (which requires the .NET Framework 4.0) and the only web service examples I have been able to dig up say 'pick Framework 3.5' in the instructions. As many articles as I've looked at I must be missing something. There has to be a way to do this without rewriting my search in Framework 3.5, right? All I want to do is either return 0 or more records which have four strings (each) based on search criteria, or return a detail record if an id is passed. So, it looks like EF4 is my brick wall. Any hints how to go through/around it? TIA, -Chris C.
-
I have my web site ready for my UI person to pretty it up. All I have left to do is write the web service for it so other web sites can use it. I didn't think it would be this puzzling since I had seen that option before as a project template and I understand (at a high level at least) what SOAP is. I've already coded using the web site with Entity Framework (which requires the .NET Framework 4.0) and the only web service examples I have been able to dig up say 'pick Framework 3.5' in the instructions. As many articles as I've looked at I must be missing something. There has to be a way to do this without rewriting my search in Framework 3.5, right? All I want to do is either return 0 or more records which have four strings (each) based on search criteria, or return a detail record if an id is passed. So, it looks like EF4 is my brick wall. Any hints how to go through/around it? TIA, -Chris C.
To create webservice in .Net 4.0, you need to create an asp.net web application project and then add a "web service" new item. With WCF in hand, do you really want to do that? WCF can do much more than web service and faster.
// ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫
Tell your manager, while you code: "good, cheap or fast: pick two. "
-
To create webservice in .Net 4.0, you need to create an asp.net web application project and then add a "web service" new item. With WCF in hand, do you really want to do that? WCF can do much more than web service and faster.
// ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫
Tell your manager, while you code: "good, cheap or fast: pick two. "
I'll start with that thanks! > With WCF in hand, do you really want to do that? And... I can take a hint, so I've done some quick reading about how WCF is a 'service framework' and why that's superior to a web service (don't need a web server). But one (possibly stupid) question: Can it act as a Web Service? (I know it can run on a web server but that might not be the same thing) This is only a critical question because the specification (written by a contractor that is no longer here) calls for a web service. TIA, -Chris C.
-
I'll start with that thanks! > With WCF in hand, do you really want to do that? And... I can take a hint, so I've done some quick reading about how WCF is a 'service framework' and why that's superior to a web service (don't need a web server). But one (possibly stupid) question: Can it act as a Web Service? (I know it can run on a web server but that might not be the same thing) This is only a critical question because the specification (written by a contractor that is no longer here) calls for a web service. TIA, -Chris C.
jccompton43 wrote:
Can it act as a Web Service? (
Yes. WCF is largely transport agnostic. The same code can serve up different transport types, merely by changing configuration, so you could have the same code simultaneously serving up via named pipes, TCP and HTTP without changing a single line of code.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
I'll start with that thanks! > With WCF in hand, do you really want to do that? And... I can take a hint, so I've done some quick reading about how WCF is a 'service framework' and why that's superior to a web service (don't need a web server). But one (possibly stupid) question: Can it act as a Web Service? (I know it can run on a web server but that might not be the same thing) This is only a critical question because the specification (written by a contractor that is no longer here) calls for a web service. TIA, -Chris C.