Tag Archives: internet & network

WCF basicHttpBinding and Https

Running a WCF service (svc) with basicHttpBinding and Https needs some configuration inside the web.config. First create a website for your service in IIS with a Https (port 443) binding. For this example, I created a test certificate with makecert.exe. Now develop your WCF service with default ABC-configuration (Binding = basicHttpBinding). Open the the service… Read More »

File download mit .NET

Es gibt zwei Varianten Files vom Internet zu kopieren. Hier die einfachere Variante: Die Methode “DownloadFile” holt sich das File und speichert es lokal ab. string strUrlPicture = “http://www.yoururlhere.abc/logo.gif”; WebClient client = new WebClient(); client.DownloadFile(strUrlPicture, @”C:\logo.gif”); client.Dispose(); Die zweite Variante erlaubt etwas mehr Kontrolle. Das File wird zuerst in ein byte-Array geladen. string strUrlPicture =… Read More »