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

57,207

Solution 1

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.

Solution 2

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.

Solution 3

Visual Studio 2010 SP1, .NET Framwework 4.0 You need to create ASP.NET web site, and then Add New Item and there select from Web tab template Web Service.

Solution 4

Consider creating a WCF service instead. This is the evolutionary successor of the 'bare' Webservice.

When you configure the WCF server with BasicHttpBinfing you have a (SOAP) Webservice. Other binding-types (including more advanced WS-* webservices) only require changes in the config.

But for an old-style ASMX based webservice you can follow fletchers answer.

Solution 5

It looks like Microsoft have removed the ability to create Web Services with Visual Studio 2010 Ultimate SP1.

It does not matter what framework you are using (2, 3, 3.5, 4) the option is not available. It is unknown at this time why Microsoft made such a move. They have been hush hush over it for a while now.

Share:
57,207
Leslie
Author by

Leslie

I am a Lead Data Architect with 3Cloud, an Azure Certified Data Engineer and Data Analyst, and was a 2018-2019 Idera ACE. I obtained my BBA with an MIS concentration from the Anderson School of Management at the University of New Mexico and worked in the public sector for 15 years developing applications, databases, and ETL processes. I enjoy spending time with her family, travelling, climbing, kettlebells, and reading epic fantasy; I am active in the SQL community, and on the Governing Board of a Charter School.

Updated on July 09, 2022

Comments

  • Leslie
    Leslie almost 2 years

    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.