Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности

Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
15.05.2010, 09:45
|
|||
|---|---|---|---|
|
|||
WCF как развернуть приложение в локальной сети |
|||
|
#18+
Здравствуйте Имеется приложение c self-hosted WCF-сервисом К этому приложению по локальной сети должны подключаться клиенты. Как это сделать? Ниже код конфиг файла(приложение с сервисом): <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="basicBinding" maxReceivedMessageSize="2097151" transferMode="Streamed"/> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="contest.contestServiceBehavior"> <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8731/contest/contestService/"/> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> <behavior name="contest.photoServiceBehavior"> <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8731/contest/photoService/"/> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="contest.contestServiceBehavior" name="contest.contestService"> <endpoint address="http://localhost:8732/contest/contestService/" binding="wsDualHttpBinding" contract="contest.IcontestService" name="wsDualHttpBinding"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> <add baseAddress="http://localhost:8731/contest/contestService/"/> </baseAddresses> </host> </service> <service behaviorConfiguration="contest.photoServiceBehavior" name="contest.photoService"> <endpoint address="http://localhost:8732/contest/photoService/" binding="basicHttpBinding" bindingConfiguration="basicBinding" contract="contest.IphotoService" name="basicHttpBinding"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="http://localhost:8731/contest/photoService/" /> </baseAddresses> </host> </service> </services> </system.serviceModel> </configuration> IP-адрес компа(там где WCF сервис) = 192.168.249.7 Код конфиг файла(клиента): <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="basicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="WeakWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="2097151" messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed" useDefaultWebProxy=" true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> <wsDualHttpBinding> <binding name="wsDualHttpBinding" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:10:00" sendTimeout="00:00:10" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="WeakWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" /> <security mode="None"> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> </security> </binding> </wsDualHttpBinding> </bindings> <client> <endpoint address="http://192.168.249.7:8732/contest/contestService/" binding="wsDualHttpBinding" bindingConfiguration="wsDualHttpBinding" contract="contestServiceReference.IcontestService" name="wsDualHttpBinding"> <identity> <dns value="192.168.249.7" /> </identity> </endpoint> <endpoint address="http://192.168.249.7:8732/contest/photoService/" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" contract="photoServiceReference.IphotoService" name="basicHttpBinding"> <identity> <dns value="192.168.249.7" /> </identity> </endpoint> </client> </system.serviceModel> </configuration> ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
17.05.2010, 10:14
|
|||
|---|---|---|---|
WCF как развернуть приложение в локальной сети |
|||
|
#18+
Azamat Bekmurat uulu, слушай, друг, ты отформатируй,так чтобы читать было удобнее. а то уж.. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
17.05.2010, 11:14
|
|||
|---|---|---|---|
WCF как развернуть приложение в локальной сети |
|||
|
#18+
<identity> <dns value="192.168.249.7" /> </identity> вот подобное - уберите нафиг. Это означает, что клиент может только с этого адреса подключитсья. Иногда туда же лезет имя пользователя или компьютера. Тогда означает - только этот может использовать сервис. В принципе, можно наоборот - расширить список, добавить все айпишники всех разрешенных клиентов. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
18.05.2010, 05:19
|
|||
|---|---|---|---|
|
|||
WCF как развернуть приложение в локальной сети |
|||
|
#18+
AlexeiK слушай, друг, ты отформатируй,так чтобы читать было удобнее. а то уж.. ниже наверно будет получше... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
18.05.2010, 05:26
|
|||
|---|---|---|---|
|
|||
WCF как развернуть приложение в локальной сети |
|||
|
#18+
Имеется приложение c self-hosted WCF-сервисом К этому приложению по локальной сети должны подключаться клиенты. Как это сделать? Ниже код конфиг файла(приложение с сервисом): <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="basicBinding" maxReceivedMessageSize="2097151" transferMode="Streamed"/> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="contest.contestServiceBehavior"> <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8731/contest/contestService/"/> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> <behavior name="contest.photoServiceBehavior"> <serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:8731/contest/photoService/"/> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="contest.contestServiceBehavior" name="contest.contestService"> <endpoint address="http://localhost:8731/contest/contestService/" binding="wsDualHttpBinding" contract="contest.IcontestService" name="wsDualHttpBinding"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> <add baseAddress="http://localhost:8731/contest/contestService/"/> </baseAddresses> </host> </service> <service behaviorConfiguration="contest.photoServiceBehavior" name="contest.photoService"> <endpoint address="http://localhost:8731/contest/photoService/" binding="basicHttpBinding" bindingConfiguration="basicBinding" contract="contest.IphotoService" name="basicHttpBinding"> <identity> <dns value="localhost"/> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="http://localhost:8731/contest/photoService/" /> </baseAddresses> </host> </service> </services> </system.serviceModel> </configuration> IP-адрес компа(там где WCF сервис) = 192.168.249.7 Код конфиг файла(клиента): <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="basicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="WeakWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="2097151" messageEncoding="Text" textEncoding="utf-8" transferMode="Streamed" useDefaultWebProxy=" true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> <wsDualHttpBinding> <binding name="wsDualHttpBinding" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:10:00" sendTimeout="00:00:10" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="WeakWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" /> <security mode="None"> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> </security> </binding> </wsDualHttpBinding> </bindings> <client> <endpoint address="http://192.168.249.7:8731/contest/contestService/" binding="wsDualHttpBinding" bindingConfiguration="wsDualHttpBinding" contract="contestServiceReference.IcontestService" name="wsDualHttpBinding"> <identity> <dns value="192.168.249.7" /> </identity> </endpoint> <endpoint address="http://192.168.249.7:8731/contest/photoService/" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" contract="photoServiceReference.IphotoService" name="basicHttpBinding"> <identity> <dns value="192.168.249.7" /> </identity> </endpoint> </client> </system.serviceModel> </configuration> ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
18.05.2010, 05:28
|
|||
|---|---|---|---|
|
|||
WCF как развернуть приложение в локальной сети |
|||
|
#18+
D129 спасибо. Сегодня попробую ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=19&mobile=1&tid=1397667]: |
0ms |
get settings: |
9ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
71ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
48ms |
get tp. blocked users: |
2ms |
| others: | 287ms |
| total: | 456ms |

| 0 / 0 |
