Wednesday, October 19, 2016

Fogbugz API logon and tokens

I was trying to write some scripts to automate some Fogbugz processes. However, we still use "FogBugz For Your Server".

In order to call the api.asp, you need to pass in a token. According to http://help.fogcreek.com/8447/how-to-get-a-fogbugz-xml-api-token#FogBugz_For_Your_Server, you need to pass in your email and password as command line parameters. Talk about lame.

Since I do not have FogBugz On Demand or FogBugz On Site, I do not have the Create API Token button.

Fortunately, I found via a network trace that the cookie value for fbToken can be used. No more query string plaintext passwords.


Monday, April 25, 2016

Amazon Windows Activation Problems

Some of my instances recently started showing up with the black background with:
Error: 0xC004F074 The Software Licensing Service reported that the computer could not be activated. The Key Management Service (KMS) is unavailable.

I recall having done this a long time ago and searching around I found some old correspondence from back in 2011 with Amazon Support that involved activating with the external IP of their KMS servers. However this was what was giving me that error. Unfortunately, I did not make good notes of that so I was going to have to figure out again. Fortunately, Internet to the rescue, I found this: http://kwjblogs.blogspot.ca/2012/01/amazon-ec2-instance-windows-activation.html

... and recalled essentially doing this:
slmgr.vbs /skms 169.254.169.250
slmgr.vbs /ato

Done. Now I also have noted it.



Wednesday, October 7, 2015

SPBasePermissions enumeration - values in Int64, Hexadecimal, and Name


$t = [type]'Microsoft.SharePoint.SPBasePermissions'
[enum]::GetValues($t) | ForEach-Object {Write-Host "$($_): $([int64]$_) (0x$([Convert]::ToString([int64]$_,16)))"}

Haven't figured out a way to use Format-Table for this, but good enough for now.

Thursday, July 30, 2015

Solutions, features, and CompatibilityLevel

I recently came across an issue where certain feature definitions were not available in 2010 mode sites in one farm, but they were in another. It turned out that the parameters supplied to Install-SPSolution are the reason. Essentially, the difference was specifying -CompatibilityLevel {14,15} vs specifying nothing. I found this article to be very helpful: Planning Deployment of Farm Solutions for SharePoint 2013

Monday, July 20, 2015

Error codes

Just some notes to myself on some resources to help decipher error codes that I often come across. These are sometimes mentioned in the ULS logs with something like hresult= or hr=





Saturday, July 4, 2015

A potentially dangerous Request.Path value was detected from the client (%)

Recently came across an issue with an error like the following:
Application error when access {some-url}, Error=A potentially dangerous Request.Path value was detected from the client (%).
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

Looking more carefully at the URL, it turned out there was a %2520 in it. That is there was a space in the URL which was encoded into a %20, but then some errant code encoded it again into %2520.

What was tricky about this issue that I never saw my endpoint request actually get logged in ULS. Instead, it looked like this was caught by .NET.