1/02/2009

Custom binding as a workaround WCF clock skew

How to set up a custom binding using entirely the config file. This custom bindings sets the client's clock skew to infinite and implements wsHttpBinding and basicHttpBinding with streaming and MTOM support:



requireDerivedKeys="true" securityHeaderLayout="Strict" includeTimestamp="true"
keyEntropyMode="CombinedEntropy" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
replayCacheSize="900000" maxClockSkew="23:00:00" maxCookieCachingTime="Infinite"
replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00"
sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true"
timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" />
maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="23:00:00"
negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00"
sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00"
reconnectTransportOnFailure="true" maxPendingSessions="128"
maxCachedCookies="1000" timestampValidityDuration="00:05:00" />


maxReceivedMessageSize="40000000" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="false" maxBufferSize="40000000" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" requireClientCertificate="false" />


sendTimeout="00:55:00">

maxBytesPerRead="409600" maxNameTableCharCount="16384" />

requireDerivedKeys="true" securityHeaderLayout="Strict" includeTimestamp="true"
keyEntropyMode="CombinedEntropy" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
replayCacheSize="900000" maxClockSkew="01:10:00" maxCookieCachingTime="Infinite"
replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00"
sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true"
timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" />
maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="01:10:00"
negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00"
sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00"
reconnectTransportOnFailure="true" maxPendingSessions="128"
maxCachedCookies="1000" timestampValidityDuration="00:05:00" />


maxReceivedMessageSize="9223372036854775807" allowCookies="false"
authenticationScheme="Anonymous" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard" keepAliveEnabled="false"
maxBufferSize="40000000" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Streamed" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" requireClientCertificate="false" />

11/28/2008

Using SQL Compact Edition Under ASP.NET | Zorched / One Line Fix

SQL CE by design is prevented to run under ASP applications. You can imagine a single file database is not really a scalable solution. However, there are scenarios that you way want to do that. I know it is silly.
Using SQL Compact Edition Under ASP.NET | Zorched / One Line Fix

11/20/2007

Deleting duplicate records

The other day I wanted to delete multiple records from a table so here is the script that seem to finally work for me:

delete from Record
where RecordID in
( select test_outer.RecordID
from Record as test_outer
where exists( select *
from Record as test_inner
where test_inner.RecordID = test_outer.RecordID
group by RecordID
having count(*) > 1
and min(test_inner.RecordID) <> test_outer.RecordID
)
);

Useful netsh commands

To see blocked ports on your system:  netsh interface ipv4 show excludedportrange protocol=tcp For more info visit: https://ardalis.com/atte...