WebService deployment issues in Windows7

Source: Internet
Author: User

One, install the IIS components in the Control Panel, program and uninstall.

Second, IIS cannot display the WebService. asmx file. Workaround:

1, if you are installed before the VS after the installation of IIS, first register IIS:

command line go to directory: C:\Windows\Microsoft.NET\Framework\v2.0.50727 execute command: Use vs command line, enter command: Aspnet_regiis-i, re-register. NET environment.

2, if the command line run prompt error, you can try to run as Administrator (Win7).

After the update is complete, IIS configures the. NETFramework version of the application pool to v4.0.

Third, go to IIS Manager choose to establish or select a Web site, then right-click Add virtual directory, the physical path to your WebService project, after the completion of the selection of virtual directory right-click the "Go to Application" operation, browse: http://localhost/virtual Directory alias/ Service.asmx, the page displays the method that is called.

Iv. Deployment of IIS

1. Add a site

2. Adding virtual directories

3. Convert to Application

4, click OK.

5. Modify the "default document".

6. Add *.asmx File

7. Select the WebService application and click Browse on the right.

Five, set the URL address

1, remove the. Asxm suffix can also be called, for example:

The normal invocation method is: Http://localhost/WebServiceServer/WebService1.asmx

To change to: http://localhost/WebServiceServer/WebService1?wsdl

(1) When the WebService service is created, add the Global.asax global file.

(2) Open Global.asax file and add code:

protected void Application_BeginRequest (object sender, EventArgs e)

{

String path = Request.Url.ToString ();

Path = Request.Url.LocalPath.ToString ();

if (!path. Contains ("/webservice1.asmx"))

{

if (path. Contains ("/webservice1"))

{

Context.rewritepath (path. Replace ("/webservice1", "/webservice1.asmx"));

}

}

}

Vi. New Site

Resources:

1, http://blog.sina.com.cn/s/blog_6abb49260100lc8z.html

2, http://www.doc88.com/p-418980892612.html

3, http://q.cnblogs.com/q/54872/

4, http://blog.sina.com.cn/s/blog_585657900100036h.html

WebService deployment issues in Windows7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.