1
<system.runtime.remoting>
섹션 (channels\channel ref="tcp" port="9090"
)의 TCP 포트 번호를 App.config
에서 읽으려고합니다. 설정 파일은 아래와 같습니다.원격 섹션의 구성 파일에서 포트 번호를 읽습니다.
<?xml version="1.0"?>
<configuration>
<system.runtime.remoting>
<application Name="MyServer">
<service>
<wellknown mode="Singleton" type="MyServer.Servers.SvrConnection, MyServer" objectUri="MyConnection" />
</service>
<channels>
<channel ref="tcp" port="9090">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
어떻게하면됩니까? 도와주세요.