Archive

Archive for January, 2017

Emergency #Website recovery service – WebserverDown.com

January 31, 2017 Leave a comment

Has your website been hacked?, has your server crashed?, lost your backups?

This service allows you recover your website instantly from a cached copy held at the Internet Archive. This allows you get an old version of your website back online while you fix the problem with your server.

Just the thing to have close at hand during a server emergency WebserverDown.com

HOW DOES THIS WORK?

 The Internet archive contains 279 Billion webpages, if one of them is your website, then it can be recovered.
  • After verifying that your website can be recovered we download the last working copy of your website from the Internet Archive
  • By changing the DNS settings on your domain to point to our server, rather than your broken server, then we serve a working copy of your website instead.
  • Once your server is back on-line, you change your DNS settings back, and you are back to normal

DNS Configuration

In order to direct traffic to the recovered website, then you will need to edit the DNS configuration of your domain to set your “www” CNAME record to point at host.webserverdown.com, This is typically done at the website where you bought your domain name, most common registrars are covered here.

 

Advertisements
Categories: Uncategorized

Reverse #VAT lookup app

January 31, 2017 Leave a comment

screen696x696


 

Apple has just approved version 1.4 of our VAT App, which is available here;

https://itunes.apple.com/gb/app/vat/id524680827?mt=8&at=1000l9tW

It not only allows you to verify a VAT number, but also search for one based on the name of company, and/or a partial address. Thanks to http://www.vatapi.co.uk/  – an API we’ve created that lets you search automatically for company VAT numbers in most European countries.

Hope you like the app!

 

 

Categories: Uncategorized

Refused to load gap://ready #Phonegap #Cordova #CSP

January 29, 2017 2 comments
screen-shot-2017-01-29-at-13-55-12
[Error] Refused to load gap://ready because it appears in neither the child-src directive nor the default-src directive of the Content Security Policy.

I noticed in an app I just updated, that the phonegap plugins were not working, (i.e. InAppBrowser), but deviceReady was getting called, so it it was ‘sort of’ working.

When I attached the remote debugger to the app from Safari I saw the error above in the console window being fired  over and over again.

The fix was to relax the CSP in the index.html, by adding

<meta http-equiv=”Content-Security-Policy” content=”default-src ‘self’ gap://ready file://* *; style-src ‘self’ ‘unsafe-inline’; script-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval'”>

You have to make sure you only have one CSP meta tag, as it will only use the first one.

 

Categories: Uncategorized

Custom #HttpModule to respond to every #HTTP request.

January 28, 2017 Leave a comment

356030_0209_4

Let’s say you wanted to create a HTTP endpoint that could respond with data that is completely generated from a c# class, and independent of the structure of the Url – for example, if you wanted to create a REST based HTTP API, that could accept a very flexible Url structure.

For example, perhaps a API that allowed it’s users to specify clauses in the URL, like yourapi.com/filter/a=5 or something like that.

Anyway, you create a class that implements IHTTPHandler as follows;

using System;
using System.Web;
public class CacheModule : IHttpModule
{
public void Init(HttpApplication application)
{
application.BeginRequest += application_BeginRequest;
}
static void application_BeginRequest(object sender, EventArgs e)
{
var application = (HttpApplication)sender;
var context = application.Context;
context.Response.Write(“<b>Cache Module</b> – Requested url:” + context.Request.Url);
HttpContext.Current.Response.Flush(); // Sends all currently buffered output to the client.
HttpContext.Current.Response.SuppressContent = true; // Gets or sets a value indicating whether to send HTTP content to the client.
HttpContext.Current.ApplicationInstance.CompleteRequest();
}
public void Dispose() { }
}

Then you need to define this in the web.config;

<?xml version=”1.0″?>
<configuration>
<system.web>
<compilation debug=”true” targetFramework=”4.5″ />
<httpRuntime targetFramework=”4.5″ requestPathInvalidCharacters=”&lt;,&gt;,*,%,&amp;,:,\,?”/>
</system.web>
<system.webServer>
<modules>
<add name=”CacheModule” type=”CacheModule“/>
</modules>
</system.webServer>
</configuration>

Categories: Uncategorized

Framework CoreMedia not found error WatchOS / Cordova

January 28, 2017 1 comment

screen-shot-2017-01-28-at-1-25-13-am

If you add a WatchOS project to a Cordova app, it may run, but when you compile it, it gives a Linker error saying that FrameWork CoreMedia is not found.
Here is a step-by-step instruction how to fix it:
 • In Bitcoin project -> Build Settings: Other Linker Flags, there are some flags like “-weak_framework AVFoundation“, “-weak_framework CoreMedia“, etc. Those settings will be inherited by all 3 targets: Bitcoin, Bitcoin Watch and Bitcoin Watch Extension.
Bitcoin target will need them, but Bitcoin Watch and Bitcoin Watch Extension is for watchOS, so it doesn’t have AVFoundation, CoreMedia… You must remove all flags, except -ObjC for those 2 targets. Just go to Build Settings -> Other Linker Flags of each target and delete unwanted flags (see attached image).
• All targets must have the same Version and Build number. And Build number should be integer like 1, 2, 3… instead of `1.1.1`. So I changed all targets version to 1.1.1 and build number to 1.
I also got this error below

screen-shot-2017-01-28-at-10-30-26

You have to make sure that all your icons for the WatchOS app (you drag the images into the Assets.XCassets file in XCode) match the required dimensions and are named WIDTHxHRIGHT@SCALEx.png. Make sure the images have no alpha channel, so export to web on Photoshop, and select No transparency, 8 bit PNG.

 

Categories: Uncategorized

Modify #IIS bindings from c#

January 27, 2017 Leave a comment

iis

If you wanted to determine what host name an IIS website responded to dynamically, then you can use Microsoft.Web.Administration to do this. You need to run your application pool under localSystem privileges, so it’s perhaps not advisable to do on a public-facing website.  You can find the DLL at Windows\system32\inetsrv

This little POC page, lists all sites on my local dev IIS, and then adds a new random binding to a site named “localhost90”

using (ServerManager serverManager = new ServerManager())
{
foreach (var site in serverManager.Sites)
{
Response.Write(site.Name);

// add a random binding
if (site.Name == “localhost90”)
{
Random rnd = new Random();
int intRandomPort = rnd.Next(100, 1000);
Binding binding = site.Bindings.CreateElement(“binding”);
binding[“protocol”] = “http”;
binding[“bindingInformation”] = “:” + intRandomPort + “:”;
site.Bindings.Add(binding);
serverManager.CommitChanges();
}

Response.Write(“<br>”);
Response.Write(“<ul>”);
foreach (var binding in site.Bindings)
{
Response.Write(“<li>” + binding.EndPoint + “</li>”);
}
Response.Write(“</ul>”);

}
}

Categories: Uncategorized

Get a #Temporary #Email #Address, administered via an #API

January 24, 2017 Leave a comment

tea

Categories: Uncategorized