On
I've recently updated one of my SharePoint 2013 apps , after deploying the new version to the test environment I keep getting weird errors , when I viewed the URL I noticed that there is no token passed by to the provider hosted application:

I checked the updated Web.config and I discovered that the Client Id and client secret are both empty 
<appsettings><add key="ClientId" value="">
    <add key="ClientSecret" value="">
  </add></add></appsettings>

to make sure that the client context will be successfully retrieved via the method
 public static string GetContextTokenFromRequest(HttpRequest request){
            string[] paramNames = { "AppContext", "AppContextToken", "AccessToken", "SPAppToken" };
            foreach (string paramName in paramNames)
            {
                if (!string.IsNullOrEmpty(request.Form[paramName])) return request.Form[paramName];
                if (!string.IsNullOrEmpty(request.QueryString[paramName])) return request.QueryString[paramName];
            }
            return null;
        }

make sure that the deployed application contains the correct client id and secret you created via Seller dashboard

how to create new client id please review the previous post