How to configure IIS to allow access to apple-developer-merchantid-domain-association

Also know as how to configure IIS to permit access to files with NO extension.

In this case we need to create a file in this location:

https://(my-website-domain)/.well-known/apple-developer-merchantid-domain-association

 

  1. Create a directory in your website called “well known”
  2. Create a virtual directory in the IIS manager, alias is .well-known and point it to the directory above.
  3. Place the file from Apple — apple-developer-merchantid-domain-association into the “well known” real directory
  4. Back in the IIS Manager… click on the .well-known virtual directory
  5. Screenshot:
  6. Click on MIME TYPES
  7. Add a new mime type. Extension .* and Mime type = application/octet-stream
  8. Hit OK
  9. Go test the file from a web browser.  It should now work and you can now have Apple verify your site.

How to get OPEN NAT with Xbox or Xbox One and PFSENSE firewall

Here is my quick & easy guide to getting OPEN NAT inside your network for multiple XBOX’s and inside a PFSENSE FIREWALLED network.

  1. all Xboxes must be configured with a STATIC IP.
    1. under the Xbox Settings, Network, Advanced settings, I use MANUAL IP address setting.
      1. put a static IP inside the range of your network.
      2. as an example:
        1. IP: 192.168.100.20
        2. Subnet: 255.255.255.0
        3. Gateway: 192.168.100.1
        4. DNS: Point it at your PFSENSE box.  192.168.100.1
        5. Secondary DNS: Use Google:  8.8.8.8
      3. Alternate PORT:  not needed // leave at default
      4. clear any alternate MAC addresses.
    2. Save these settings and SHUT DOWN your XBOX.
    3. Pull the plug
  2. Go log into your PFSENSE firewall
  3. I am using a beta version of PFSENSE 2.5.0.a.20200401.1515
  4. You should try to be using as current a version as possible to avoid any issues with outdated PFSENSE code.
  5. Inside PFSENSE, go to Services/ UPnP & NAT-PMP
    1. Setup your settings like this (click image for larger version):
      Notes:

      1. under ACL ENTRIES, each XBOX’s STATIC IP address must be on it’s own line here.  If you have multiple XBOX’s, create one line entry for each XBOX and edit the IP ADDRESS
      2. HIT SAVE to save your settings here.
  6. Go to Firewall / NAT / Outbound
    1. Make sure that the MODE is set to Hybrid Outbound NAT rule generation.
    2. Add a mapping (see below, click for larger image)
    3. NOTES:
      1. under SOURCE, you must put the IP address for your XBOX here.
      2. Repeat and add mappings for EACH XBOX (and IP ADDRESS) inside your LAN
      3. SAVE CHANGES
  7. Plug the power back into your Xbox
  8. Power it on
  9. Once it is booted, go to NETWORK / SETTINGS.
  10. RE-RUN NAT TYPE test
  11. RE-RUN MULTIPLAYER test
  12. you should now have “OPEN” NAT

 

Automatically Empty Google Drive Trash

Want to empty your Google Drive Trash automatically?  I finally have the solution for you.

  1. Make sure you use GOOGLE CHROME web browser for best results.
  2. Open Chrome and go to www.google.com
  3. Make sure you are signed into your Google account.  If not, sign in.
  4. You should OBVIOUSLY have Google Drive account up and running since that’s why you’re here, right?
  5. Go here https://script.google.com/home
  6. Click NEW PROJECT.
  7. Clear out the default code that appears in the next window.
  8. Paste in this code (exactly)
    function createTimeDrivenTriggers() {
      ScriptApp.newTrigger('emptyThrash')
          .timeBased()
          .everyHours(1)
          .create();
    }
    function emptyThrash()
    {
    Drive.Files.emptyTrash();
    }
    
  9. Click the Save Icon
  10. Enter a name such as “Automatically Empty Google Drive Trash”
  11. Click the “Resources -> Advanced Google Services” menu within the Code editor
  12.  Scroll down and turn “Drive API” to “ON”
  13. You should see a message “These services must also be enabled in the Google Cloud Platform API Dashboard”.  Click that link.
  14. NOTE:  If you DO NOT see the message above, click this direct link
  15. Click “ENABLE APIS AND SERVICES”
  16. Locate “Google Drive API” and click it.
  17. Click Enable
  18. Go back to your browser window with the “Advanced Google Services” window still open.
  19. Click OK
  20. Click the “Run” icon within the project editor
  21. You should see “Authorization Required”.  Click Review Permissions
  22. Choose your google account (this links up the script with the proper account).
  23. You will see “This app isn’t verified”.  Click Advanced. Click Go to XXXX Project (unsafe).
  24. Click ALLOW
  25. Save your project again.
  26. Go to “Run->Run Function->createTimeDrivenTriggers”
  27. Hit the “Timer” icon.
  28. You should see your project listed under “Triggers”
  29. Your job is now scheduled to run every 1 hour and empty your trash!

 

This process was crafted by deciphering the following two pages:

https://stackoverflow.com/questions/32749289/automatically-delete-file-from-google-drive-trash

https://stackoverflow.com/questions/25749906/permanently-delete-file-from-google-drive/32749203

webDNA Error: You are not allowed to change the price

If you are here for this:

Error: You are not allowed to change the price

under webDNA:

How to fix:

1) look at the error text files. It will tell you which script is throwing the error.
2) edit that script and search for “password”. Find the webdna password. it will look like this: password=whatevermypasswordis
3) go to the webDNA control panel. ISP Sandbox.
4) locate the sandbox in question and click the small ADMIN button
5) login (generally with sbadmin/sbadmin)
6) preferences “Price Change Password”. Set the password equal to what you found in #2 above.
7) save
8) retry your page, it should work now.

Recaptcha V2 under classic ASP

Here’s a quick primer on upgrading your Classic ASP site Recaptcha V1 to V2.

First, go to Google Recaptcha online and generate yourself a v2 pair of keys for your site’s domain.

Next:

On the page with the “FORM” on it on which you want to display the Recaptcha V2.

Add to the HEADER (inside the HEAD TAGS):

<script src='https://www.google.com/recaptcha/api.js'></script>

 

Replace the existing code which renders your v1 recaptcha with this line:

<div class="g-recaptcha" data-sitekey="put your google public v2 key here" ></div>

 

on your FORM SUBMIT page (where the v2 form gets submitted to):

Inside ASP tags, place this line:

Response.LCID = 1033 ' USA LCID

It is a required element for the JSON Parser.

Inside the HEAD:

<!--#include file="jsonObject.class.asp" -->

 

you can get this file from my site HERE

now the processing code to handle the Recaptcha JSON response:

 

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
 Dim recaptcha_secret, sendstring, objXML
 
 recaptcha_secret = "your secret key goes here"

 sendstring = "https://www.google.com/recaptcha/api/siteverify?secret=" & recaptcha_secret & "&response=" & Request.form("g-recaptcha-response")

 Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
 objXML.Open "GET", sendstring, False

 objXML.Send
 
 set jsonObj = new JSONobject
 set jsonArr = new jsonArray


 jsonString = objXML.responseText
 
 set outputObj = jsonObj.parse(jsonString)  
 
 
 if jsonObj.value("success") then
  Global_Msg="Captcha GOOD!"
 else
  Global_Msg="Invalid Recaptcha Response."
 end if
 
 Set objXML = Nothing
End If

if Global_Msg<>"Captcha GOOD!" then
%>
invalid RECAPTCHA response.  Hit back and try again.
<%
response.end

end if

 

For your convenience, here is all the code inside one ZIP file.

 

Let me know if this helped you!

 

 

Cannot browse network neighborhood under Windows 10 Fall Creators update 1709 and newer

Once again, Microsoft has thrown a monkey wrench into the operation of how your network neighborhood (or “Network”) item under Windows 10 works.

I had previously created this blog post which addressed the initial issues with Windows 10 not allowing the Network to show a list of all your local computers.

Well, due to the Fall Creators update and versions 1709 and later, Microsoft has moved even further to stop the use (and functionality) of the Network icon inside windows explorer.

Microsoft has completely disabled (and removed) SMBv1 in Windows 10 (and modern Windows Server 2016) starting with the FALL CREATORS UPDATE build 1709 and later.   This in-effect completely disables the ability for your NETWORK item in Windows Explorer to populate a list of your local network computers.

I manage several small networks and it is EXTREMELY helpful to be able to browse a list of all the local computers.

To fix this issue, go to WINDOWS FEATURES (just use Cortana and type in windows features), expand SMB 1.0/CIFS File Sharing Support

CHECK: SMB 1.0/CIFS CLIENT and SERVER

click OK

it will prompt you to reboot

when you’ve rebooted, go to windows file explorer and click on NETWORK.  you may need to hit the refresh icon, but it should pull the list of all local PC’s and magically your network neighborhood will now work!

 

**Note: if you try this and it still doesn’t work, make sure you do the registry entry on my prior blog post (link at the top of this post).  You will need to add that registry key and reboot.

 

1080p HDTV as second monitor display blinks on and off while watching video

I have a second monitor which is a Philips 1080p 40 inch TV (that I switch the HDMI inputs to alternate between cable and a second monitor).

When I play streaming video from YouTube on the monitor, the display blinks on and off continuously.  This does NOT happen when using the Philips for TEXT displays (outlook, explorer, etc.)

The fix is easy.

First, make sure your second monitor (HDTV) is in “PC” mode. (This is not the fix in itself).

Secondly, I have the most current NVIDIA drivers installed.

Go to NVIDIA CONTROL PANEL (right click on an empty desktop)

Click ADJUST DESKTOP COLOR SETTINGS

click on your secondary monitor name (in my case, PHILIPS)

You will see a dropdown box appear.

Set “content reported to the desktop” to “Desktop Programs”.

 

That’s it.

Your secondary monitor should now be rock stable while watching videos.

 

let me know if this helped you!

sprintf or printf do not output float variables correctly

Have you run into situation under the MPLAB IDE where you are trying to output variables, but even though you have the format correct, a float variable outputs with a .0 value?

Example

(from somewhere else in code)
AIRTEMP=751
====
float adjustedtemp= 0.0;
adjustedtemp= (AIRTEMP + 5)/10;
printf("Air Temp: %5.2f \r\n", adjustedtemp);

the result looks like this

Air Temp: 75.00

when it SHOULD look like this

Air Temp: 75.60

this is due to a bug in the way MPLAB handles floats.

Two easy ways to fix it:

#1:

adjustedtemp= (AIRTEMP + 5.0)/10.0;

or,

#2

adjustedtemp= ((float)AIRTEMP + 5)/10;

Either of these methods will result in the correct value being displayed during your sprintf() or printf() command.

1 2 3 10