Why do I vs2010,c# add a service reference? Why can't I add a service reference?
/* from:http://digantakumar.com/2010/06/04/wse-3-in-visual-studio-2008-and-2010/*/
Don't look at the picture can not see, it is a cup, simply take it over
VS2008 and 2010 are not supported by default for Web Services enhancements (WSE) 3.0 because Ms wants to replace it with WCF. Here's a workaround for Visual Studio 2008 and 2010 to support Web Services enhancements (WSE) 3.0.
1. Download and install WSE 3.0. Confirm that the installation is successful. Note: Close visual Studio before installing.
http://www.microsoft.com/en-us/download/details.aspx?id=14089
2. Open the folder%ALLUSERSPROFILE%\Application Data\Microsoft\MSEnvShared\Addins, if the folder does not exist, close Visual Studio and create it manually.
Like what:
-Windows XP: "C:\Documents and Settings\All Users\Application Data\Microsoft\MSEnvShared\Addins"
-Windows vista/windows 7: "C:\ProgramData\Microsoft\MSEnvShared\AddIns"
3. In the 2nd step of the folder, locate Wsesettingsvs3.addin and back up the file. If the file does not exist, create a file named Wsesettingsvs3.addin, and write the contents of the 4th step to the file.
4. Open Wsesettingsvs3.addin, you can see two sections of configuration, point to version 8.0. Copy the two configurations, and then change the version number in the new configuration to 9.0 (VS2008) or 10.0 (VS2010). Save.
5. Open the installation directory for Visual Studio, go to Common7\IDE, open devenv.exe.config, and back up devenv.exe.config before modifying. Add the following code before the closing tag. In this way, Visual Studio can use WSE to generate the Web service proxy class.
[HTML]View Plaincopy
- <system.web>
- <webservices>
- <soapextensionimportertypes>
- <add type= "Microsoft.Web.Services3.Description.WseExtensionImporter,
- Microsoft.Web.Services3, version=3.0.0.0,
- Culture=neutral, publickeytoken=31bf3856ad364e35 " />
- </soapextensionimportertypes>
- </webservices>
- </system.web>
6. Close all visual Studio and restart.
7. Open the project in VS2010 and right-click on the project to see the WSE Setting 3.0 option. This allows WSE 3.0 to be configured in VS2010.
Let Visual Studio 2008 and 2010 support Web Services Enhancements (WSE) 3.0