Publish WCF Service app on IIS Express using Web D

2019-02-11 08:53发布

I want to publish WCF Service Application created in Visual Studio 2010 on IIS Express.

So I'm using Project -> Publish -> Web Deploy:

Service URL: http://localhost
Site/application: wcf

But ran into some miss-understanding:

  • Web Deployment requires a virtual directory, it doesn't want to publish in the site root
  • IIS Express doesn't support virtual directories

How can I accomplish the task?

4条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-02-11 09:28

IIS Express does support virtual directories. Using appcmd command provided by 'Eugene' should work.

查看更多
戒情不戒烟
3楼-- · 2019-02-11 09:43

Fist of all, you need to specify the correct Service URL, i.e. http://server/MsDeployAgentService

查看更多
放我归山
4楼-- · 2019-02-11 09:45

You should be able to specify the destination of your web site/application in site properties -> Package/Publish Web. In the field "IIS Web Site/application name to use on the destination server" put the site name. There, by default, the application is specified as a virtual directory but it does not have to be. You can just put the name of your site there, without the "/" and then it will deploy to the root of the site, not a virtual (sub-)directory. See screenshot:

Screenshot

查看更多
啃猪蹄的小仙女
5楼-- · 2019-02-11 09:48

You can add a virtual directory via a command line using appcmd:

appcmd add vdir /app.name:<site_name>/ /path:/<virtual_directory> /physicalPath:<physical_location> 

See here

查看更多
登录 后发表回答