내 Silverlight 앱에서 로컬 Dev 서버로 서비스 참조를 만들었습니다. 하지만 지금은 이것을 testserver에 배포하고 싶지만 어떻게 dataservice의 URI를 지금 바꿀 수 있습니까? 내가 배포 한 것은 모두 XAP 파일이며 asp.net에서 web.config의 uri를 변경하는 데 사용되었지만 실버 라이트 앱에는 존재하지 않습니다.silverlight : 배포 후 uri를 내 dataservice로 변경하십시오.
3
A
답변
3
See this answer입니다. 이 방법을 사용하면 설정 파일에 주소 정보를 넣는 것을 피할 수 있습니다.
0
Silverlight 응용 프로그램이 ServiceReferences.ClientConfig를 web.config 파일에 병합해야합니다.
<system.serviceModel>
<bindings>
<!-- Your binding details here -->
</bindings>
<client>
<endpoint address="http://localhost/servicename/servicename.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_Iservicename"
contract="servicenameReference.Iservicename"
name="BasicHttpBinding_Iservicename" />
</client>
</system.serverModel>
는 프로덕션 서버를 가리 키도록 주소를 개정 : 당신은 아래에 그것을 발견 할 것이다. 프로그래밍 방식으로 WCF 프록시 종점을 설정하는 방법에 대한 자세한 내용은
+1. 질문을 잘못 읽었을 수 있습니다. –
예! 그 트릭을했다. – Michel