I am trying to create my first webservice. I've been googling for a tutorial or examples and most of what I find is from previous versions of Visual Studio and say to create a new ASP.Net Webservice...but that doesn't exist in 2010!
What I need to do is have the service receive 2 strings, an agency and a man number. Then run a query to get some information and return a string with a date and time back to the requestor. I need to have a web interface available to call the service as well.
Any guidance on what I need to do to create the service in Visual Studio 2010 in C# will be appreciated!
Update: I've just been told that this process needs to authenticate the users...can someone guide me to information on implementing certificate or digital signatures into my web service? I've looked but most of what I'm finding is for authenticating through Active Directory or some other maintained list with usernames and passwords.
message, found at the bottom of the list of templates, select the Install more tools and features link. Then, in the Visual Studio Installer, select the ASP.NET and web development workload. Select Modify in the Visual Studio Installer. You might be prompted to save your work.
You must choose File => New => Project... instead and not File => New => Web Site... . Then select the Visual C# / Web Templates group on the left, and then choose the “ASP.NET Web Application” template in the center column. Name your project and press the OK button.
This puzzled me too. There's another puzzle to be had when you try and add a reference to an ASP.NET Web Service too, but I'll let you have fun with that one.
Change the target framework version in the dropdown list to .NET framework 2
and choose Web
on the left hand side when creating a new project and it will appear.
Actually, I'm not going to be mean. If you are going to reference the web service from an application built using.NET 3.0 or higher:
Add Service Reference
In VS 2010, you can't create web services because this is covered with WCF services. To create ASP.NET Web Services, you need to select ASP.NET app with Framework 3.5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With