Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where's the ASP.Net WebService in Visual Studio 2010?

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.

like image 361
Leslie Avatar asked Aug 18 '10 15:08

Leslie


People also ask

How do I get ASP.NET in Visual Studio?

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.

How do I open a Web form in Visual Studio 2010?

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.


2 Answers

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:

  1. Go to Add Service Reference
  2. Go to Advanced
  3. Click Add Web Reference at the bottom of the dialog.
like image 57
fletcher Avatar answered Oct 04 '22 13:10

fletcher


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.

like image 36
CHF Avatar answered Oct 04 '22 14:10

CHF