Listing 3: XML • Customize the AppConfig File

You need to customize the AppConfig file to meet the integrated authentication requirement. To do this, you need to look at the XML document's security element under the path configuration/system.servicemodel/bindings/basicHttpBinding/binding, and then set the attribute mode to TransportCredentialOnly. You also need to set the attribute clientCredentialType to Windows in its children element transport. I've highlighted these changes in yellow to make them easier to find.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<system.serviceModel>
		<bindings>
			<basicHttpBinding>
			<binding
			name="eprocurement_purchasingSoap" 
				closeTimeout="00:01:00"
				openTimeout="00:01:00" 
				receiveTimeout="00:10:00" 
				sendTimeout="00:01:00"
					allowCookies="false" 
					bypassProxyOnLocal="false" 
					hostNameComparisonMode=
					"StrongWildcard"
				maxBufferSize="65536"
				maxBufferPoolSize="524288" 
				maxReceivedMessageSize="65536"
				messageEncoding="Text"
					textEncoding="utf-8" 
					transferMode="Buffered"
				useDefaultWebProxy="true">
			<readerQuotas maxDepth="32" 
				maxStringContentLength="8192" 
				maxArrayLength="16384"
				maxBytesPerRead="4096" 
				maxNameTableCharCount="16384" />
				<security mode=
					"TransportCredentialOnly">
					<transport 
					clientCredentialType=
						"Windows"
						proxyCredentialType=
						"None" />
					</security>
				</binding>
			</basicHttpBinding>
		</bindings>
		<client>
			<endpoint address=
			"http://localhost/purchasing" 
			binding="basicHttpBinding"
			bindingConfiguration=
				"eprocurement_purchasingSoap" 
			contract=
				"eprocurement_purchasingSoap"
			name="eprocurement_purchasing" />
		</client>
	</system.serviceModel>
</configuration>;
comments powered by Disqus

Featured

Subscribe on YouTube