-
August 4th, 2011, 11:55 AM
#1
CHANGE WCF client IP
I used Service Reference to create a WCF client class (much like the svcutil.exe tool). It generated this section in the app.config automatically:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_WMON_ISqlCeDBController" closeTimeout="00:01:00"
openTimeout="00:05:00" receiveTimeout="00:05:00" sendTimeout="00:05:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="20000000" maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="20000000"
maxArrayLength="20000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8731/WMON/Database/WMON_SqlCeDBWcfService"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_WMON_ISqlCeDBController"
contract="WMON_SqlCeWcfClient.WMON_ISqlCeDBController" name="BasicHttpBinding_WMON_ISqlCeDBController" />
</client>
</system.serviceModel>
I have a GUI program with a settings tab to allow the user to change the WCF server IP. But I dont' know how to change it in the app.config.
PLEASE HELP. I'm stuck.
I posted this topic sometime ago in MSDN and never got proper answer. and MSDN search capabilities are terrible.
-
August 4th, 2011, 12:20 PM
#2
Re: CHANGE WCF client IP
Originally Posted by armen_shlang
I have a GUI program with a settings tab to allow the user to change the WCF server IP. But I dont' know how to change it in the app.config.
Are you trying write the user changes back to the app config file? If so, app configs are mean't to be read-only. I'm not saying it can't be done, but I'm trying to understand what you are after.
Originally Posted by armen_shlang
... MSDN search capabilities are terrible.
It just takes a bit getting used to if you are new to it. Once you understand what data it's good for and how to search it, it becomes easy to use.
-
August 4th, 2011, 12:55 PM
#3
Re: CHANGE WCF client IP
Originally Posted by Arjay
Are you trying write the user changes back to the app config file? If so, app configs are mean't to be read-only. I'm not saying it can't be done, but I'm trying to understand what you are after.
.
No I'm not trying to write to it, only change the value before it's used by the WCF client call.
thanks for the reply
-
August 4th, 2011, 05:06 PM
#4
Re: CHANGE WCF client IP
Originally Posted by armen_shlang
No I'm not trying to write to it, only change the value before it's used by the WCF client call.
thanks for the reply
Ok, just hand edit the following in the app config file..
Code:
address="http://localhost:8731/WMON/Database/WMON_SqlCeDBWcfService"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|