ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

System.Net.WebException Too many automatic redirections were attempted 

Categories: .Net

Assuming you do not need more then 50 redirects, your webpage probably redirects because of a missing cookie. Which can not be set because you didn't add a cookie container...

var request = (HttpWebRequest)WebRequest.Create(url);
request.Method = WebRequestMethods.Http.Get;
request.CookieContainer = new CookieContainer();
using (var response = (HttpWebResponse)request.GetResponse())
{
using (var stream = new StreamReader(response.GetResponseStream()))
{
string html = stream.ReadToEnd();
...
}
}

In case you do need more redirects or more likely less... you can set this property:

request.MaximumAutomaticRedirections = 5;

Export Mercurial into Git  

Categories: Tortoise

How sad that I have to write this post... proves once more that it's all about the marketing and communication, not so much the product.

Anyway, here how you can import your hg history into git using TortoiseHg

  • TortoiseHg > Global Settings > Extensions > Enable hggit
  • create a new git repo : git init --bare .git OR  git clone --bare https://git.ken.be/my-new-repo
  • cd to your hg repository and you might create a bookmark : hg bookmarks hg
  • hg push c:/path/to/your/new/git/repo
  • cd to your git repo
  • if you used init before: git config --bool core.bare false (when you used bare command before)
  • if you used a bookmark merge hg branch into master
  • push changes to remote repository
  • delete local version and get a normal clone.

And you have a new git repo with all your hg history in it. Awesome.

Or not so awesome: https://www.youtube.com/watch?v=CDeG4S-mJts 

Jekyll serve does not render layout 

Categories: Visual Studio

So you are using visual studio to do some jekyll github pages.

Did you save the files as UTF-8 without signature ?

  • File > Advanced Save Options...
  • Tools > Options > Text Editor > General > Auto-detect UTF-8 encoding without signature
  • Tools > Customize > Commands tab > Menu bar > File > Add Command... (if advanced save missing)
Page 2 of 40 << < 1 2 3 4 5 6 7 8 9 10 20 > >>