Wednesday, September 30, 2015

IIS cannot show files on Google Drive

The problem:
IIS cannot show files on Google Drive
Is due to file permissions.

You might be able to change the sites Authentication -> Anonymous Authentication to be a user on the machine.

But this works:

On the folder with the web site in the properties security section add this user
MACHINE_NAME\IIS_IUSRS
And make sure it has read permission.

Friday, September 18, 2015

Don't let environment values persist after a batch file runs

To prevent environment variables declared in a batch from being persisted after the batch file is run, use this command before setting them:

setlocal

Reference: http://ss64.com/nt/setlocal.html

Friday, September 11, 2015

Fiddler FAQ


Headers, How to add headers

  1. Run fiddler
  2. Use the editor
  3. Find the method:    static function OnBeforeRequest(oSession: Session) {
  4. At the end of it add your handler code.
  5. Save the changes and try it (seems like fiddler picks up the changes when you save)
  6. See the sample here:

        if (oSession.fullUrl.Contains("/somepartOfUrlToMatch"))
        {
            FiddlerObject.alert('show alert');
            oSession.oRequest["X-MY-USER"]="someUsername";
            oSession.oRequest["X-MY-ROLE"]="someRole";
        }


Installing it:

  1. Get it from telrick http://www.telerik.com/fiddler
  2. Install it.
  3. Run it
  4. Try to "Rules -> Customize Rules" and then have it download the editor for you (or if you are a masochist edit in the default editor)
  5. Install the editor
  6. Use the editor to adjust the rules (it seems to automatically know where the file is and to automatically load it)



Popup, How to show a debug popup:
FiddlerObject.alert('show this message');


Tuesday, September 1, 2015

Java -jar debug with -Xdebug

I had trouble attaching when running a jar via:
java -jar

Seems like all the param after -jar are parameters to it.
So I had to put the -Xdebug _before_ the -jar flag.