Archive for June, 2009

The provided URI scheme ‘http’ is invalid; expected ‘https

Going from dev to live, where the dev system referenced dev version of web services, but the live system has to reference live versions which are HTTPS i recieved this error;

The provided URI scheme ‘http’ is invalid; expected ‘https

This is resolved simply by updating the web.config file and setting the security tag’s mode attribute from None to Transport;

<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IWSHttpService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="None" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>

The provided URI scheme ‘http’ is invalid; expected ‘https.

8 Comments

Globalization “Current Culture” settings in the web.config (ASP.NET)

Quick example of the current culture switch in the web.config of a dot net project.

<configuration>
<
system.web>
<
globalization fileEncoding=”utf-8″ requestEncoding=”utf-8″ responseEncoding=”utf-8″ culture=”en-GB” uiCulture=”en-GB”/>
</
system.web>
</
configuration>

Globalization using ASP.NET.

2 Comments

Visually build XPath using “Sketch Path”

Paul found an awesome tool fopr visually parsing XML files and building XPath statements, called Sketch Path available for download here

No Comments

Quick XML serialisation of an object..

Quick code snippet for taking a serialisable object, serialising to XMl then spitting out a string for you to write out to a debug log or something- i used this for spitting back the responses I was getting from a web service call i was making

            StringBuilder sb_xml = new StringBuilder();
            XmlSerializer s = new XmlSerializer( typeof( Hachette.Checkout.Vista.Stock.ProductStockLiteResultResponse ) );
            StringWriter w = new StringWriter(sb_xml);
            s.Serialize(w, ws_response);
            w.Close();
            Response.Write("<!-- Response = " + sb_xml + " -->");

No Comments

Showing Hidden files on the Mac OS

at the console type;

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

To swap back, execute the same code but with FALSE!

No Comments