我知道如何在Visual Studio中提供服务参考。现在我要在IIS服务器中部署代码。如何提供Web引用(即Web服务的Url。任何人都可以帮助我。
在系统1(带Web服务的Web应用程序)中。系统2(Web应用程序,Web服务必须从system1获取)。我可以在VS2008中执行它,因为我可以轻松地为system2 Web应用程序提供服务引用..
答案 0 :(得分:2)
部署时无需再次添加引用,但您可能希望更改服务的地址,安全信息,配额,超时等。所有这些都是可配置的。
Web /服务参考信息存储在.Net配置文件中(例如app.config和web.config)。部署时,可以根据需要更改这些值以指向正确的位置。
请注意address
属性。这可以更改为端点所在的地址。
<system.serviceModel>
<client>
<endpoint
address="http://localhost/SampleServer/PersonService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_PersonService"
contract="People.PersonService" name="BasicHttpBinding_PersonService" />
</client>
</system.serviceModel>