IIS FTP Passive Mode

I ran into an issue today with my FTP PowerShell script not working. It was configured to use port 21 as it has for years. The FTP site is at my son's house and he just got a new modem when he changed his provide to Telus. I found out that Telus block port 21 so I changed it to port 22, however then ran into a PASV (passive mode) issue where it would not upload files. After several hours I figured out that I needed to set the internal router to allow ports 49152-65534 in and then also had to do the same in IIS under the FTP site as well as set the Exteranl IP Address of Firewall to the IP address of the modem/router.

I found help here if the like still works: http://stackoverflow.com/questions/21032577/how-use-passive-mode-in-ftpwebrequest-fix-pasv-error-in-net-3-5-define-port/21051211#21051211

Show the Output Window During Build

Visual Studio 2010

If you don’t want the Output Window to show up every time you do a build, you can easily keep it from happening by going to Tools -> Options -> Projects and Solutions -> General and deselect the “Show Output window when build starts” option:

MS Access VBA for NumLock Control

Option Compare Database
Option Explicit

Private Declare PtrSafe Sub keybd_event Lib "user32" ( _
    ByVal bVk As Byte, _
    ByVal bScan As Byte, _
    ByVal dwFlags As Long, _
    ByVal dwExtraInfo As Long)
    Private Const VK_NUMLOCK = &H90
    Private Const KEYEVENTF_KEYUP = &H2
    Declare Function GetKeyState Lib "user32.dll" ( _
    ByVal nVirtKey As Long) As Integer
 
Public Sub NUM_TOGGLE()
    keybd_event VK_NUMLOCK, 1, 0, 0
    keybd_event VK_NUMLOCK, 1, KEYEVENTF_KEYUP, 0
End Sub
 
Public Sub NUM_On()
    If Not (GetKeyState(vbKeyNumlock) = 1) Then
        keybd_event VK_NUMLOCK, 1, 0, 0
        keybd_event VK_NUMLOCK, 1, KEYEVENTF_KEYUP, 0
    End If
End Sub
 
Public Sub NUM_Off()
    If (GetKeyState(vbKeyNumlock) = 1) Then
        keybd_event VK_NUMLOCK, 1, 0, 0
        keybd_event VK_NUMLOCK, 1, KEYEVENTF_KEYUP, 0
    End If
End Sub

How to Unblock Unsafe Attachments in Microsoft Outlook

https://www.sitepoint.com/outlook-unblock-unsafe-attachments/

There’s a vast range of desktop and online email clients but it’s hard to beat Microsoft Outlook. The application has been around since 1997 and, despite a few dodgy decisions regarding HTML rendering, it’s still the email client of choice for me and many others.

Unfortunately, there’s an Outlook message web developers hate:

Outlook blocked access to the following potentially unsafe attachments…

Thanks Microsoft. I know why you’re blocking that JavaScript file, but I know what it is and I really, really want it.

Outlook doesn’t allow you to unblock unsafe attachments. Fortunately, there is a way to obtain the file and prevent the embarrassment of requesting a renamed version. Before we start…

tip: BIG REGISTRY WARNING!

We’re about to delve into the Windows registry. Please move along if you don’t know what the registry is or have never dabbled with it before. It’s a dangerous place — once false move and your PC will explode.

The fix will also reduce Outlook security settings. That’s not a problem for someone with reasonable IT knowledge, but it’s not for everyone.

Still here? OK, here’s what you do:

1. Close Outlook

2. Run regedit.exe
Navigate to:

HKEY_CURRENT_USERSoftwareMicrosoftOfficeXX.XOutlookSecurity

Where XX.X indicates your version of Outlook:

  • 14.0 for Microsoft Office 2010
  • 12.0 for Microsoft Office 2007
  • 11.0 for Microsoft Office 2003
  • 10.0 for Microsoft Office 2002
  • 9.0 for Microsoft Office 2000

3. Create a new value
Create a new string value key in that location named:

Level1Remove

4. Choose your ‘safe’ file types
Edit the key and enter a list of attachment extensions you want to unblock. Each should start with a period and be separated with a semi-colon. For example…

To unblock JavaScript files only, enter:

.js

To unblock JavaScript, VBScript, and exe files, enter:

.js;.vbs;.exe

Click OK to save the value then exit regedit.

5. Restart Outlook
The attachment should be magically unblocked. Try rebooting if that’s not the case.

Modifying Config.esriaddinx - change add-in's icon

https://geonet.esri.com/thread/23803

PROBLEM
I have an image logo.png stored in both Resources and Images folder in my VB.NET project. However, this image is somehow not visible for the add-in. I've checked the add-in package (.esriAddIn zip file) after compiling the project and there is no image "logo.png" in the Images folder inside this package.

The question is: how can I include this image to my add in package?

SOLUTION
You need to inform the build process to include the image file in the Add-In package.
In Visual Studio's solution explorer, select your logo.png file under images. Set the Build Action property to AddInContent.

Edge Can’t be Opened Using the Built-in Administrator Account

From: http://windowsitpro.com/windows-server-2016/q-edge-can-t-be-opened-using-built-administrator-account

Q: I recently installed the Windows Server 2016 Tech Preview and when I went to use the new Edge browser to go the Internet I got the following message. “Microsoft Edge can’t be opened using the Built-in Administrator account. Sign in with a different account and try again.” Does Edge now have something like Internet Explorer’s Enhanced Security? This is a test system and I don’t want to bother making multiple accounts. How can I get my Windows Server 2016 test system connected to the Internet when I’m running as Administrator?

A: Fortunately Edge doesn’t have anything like the annoying Internet Explorer Enhanced Security. However, Microsoft has made Edge more like a true app and they have enhanced its security to restrict browsing for highly privileged accounts like the local administrator. There are a couple of workarounds. The simplest is just to use Internet Explorer (IE). IE is still present in Windows Server 2016 and you can start it by opening the Start menu and clicking on the Internet Explorer tile. IE security is still controlled by Internet Explorer Enhanced Security and it won’t display that error message.

Alternatively, if you want to use Edge you can change to the local security policies to allow Edge to run under the Administrator’s account. Use the search option in the taskbar and enter secpol.msc then click on it in the search results. Under Local Policies, Security Options navigate to User Account Control Admin Approval Mode for the Built-in Administrator account click on it to open the properties. Set the policy to Enabled and click Apply. After you reboot the system you will be able to use Edge under the local Administrator account.

Filtering or Sorting columns causes message: enter parameter value .fileURL

In Access 2010 I recently got an error when sorting a column or opening a Form that had a sorted column. It was a popup like you would see when you had a missing parameter in a query. It read qryQuery,FieldName.FileUrl and a place to enter the value. It had me stumped so I opened the form in design and removed any sorting. I was then able to open the form OK, but when I clicked on the first column to sort it gave me this error. BTW it was a Split Form with the Datagrid on the bottom and only the Form section on top was editable.

I did a manual Compact and Repair and the then the issue disappeared. Funnily enough this also happened in the compiled ACCDE. So to fix the ACCDE I just did a manual Compact and Repair ACCDB and THEN made the ACCDE. Then it worked fine.

I hope this helps someone else out there one day!