Sunday, May 3, 2015

Eclipse Error Solution

I was merely creating a JSF project in Eclipse Luna and I kept hitting this issue:

Failed while installing Dynamic Web Module 3.0.
Reason:
Could not set the project description for 'Reanimate Max Headroom' because the project description file (.project) is out of sync with the file system.

For my Windows install, I did the following:

1) I followed the other advice online using Help->"Install New Software" to install:
    a. Eclipse Java EE Developer Tools
    b. Eclipse Java Web Development Tools

2) I moved my workspace to my "c drive" and the error went away. My workspace had been on a UNC path to a Synology NAS SMB share.

Apparently Eclipse doesn't like UNC paths, or maybe SMB, or specifically my Synology diskstation.
I tried lots of combinations, but the file path seemed to be the main issue.

Friday, May 28, 2010

Cryptographic failure while signing assembly -- Unknown error (8013141c)

My Visual Studio 2008 project built fine a few weeks ago, now every time I compile it, I receive this error:

Cryptographic failure while signing assembly 'MyAssembly.dll' -- 'Unknown error (8013141c)'

This post helped the most, and brought me to the answer.

My twist on the solution is as follows:

1) I use 64 bit Windows 7 (though it should be the same for Windows Vista, and 32 bit)
2) I needed to change security on directory:
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys
3) I added my user name, with the following minimum "Advanced" set of permissions:
* Create files / write data
* Create folders / append data
* Write attributes
* Write extended attributes
* Delete
4) After hitting apply, I had to accept that 5 directories were "Access is denied"

The project then built successfully. Any fewer permissions, and the error reoccurred.

According to blogger's consensus, a Windows Update broke the permissions on that directory. I'm using a domain account in the local Administrators group which has "Full Control" so I don't understand why I had to do this at all.

Tuesday, January 19, 2010

WCF Service 401 Intermittent Error (Solution)

Summary:
For a WCF service running on IIS7, the entire service may become inaccessible reporting an HTTP 401 error on every web access, even the main /Service.svc/ and /Service.svc/help URLs. The problem may be that the web.config's aspNetCompatibilityEnabled must be set to "false"

Scenario A (works):
1) web.config / aspNetCompatibilityEnabled="true"
2) iisreset
3) Issue GET request, success (200) (Agent w3wp.exe appears in Task Manager)
4) Issue PUT request, success (200)

Scenario B (fails):
1) web.config / aspNetCompatibilityEnabled="true"
2) iisreset
3) Issue GET request, success (200) (Agent w3wp.exe appears in Task Manager)
3b) Wait 25 minutes (assuming app pool is set to recycle agents after 20 minutes, or do iisreset, agent w3wp.exe disappears from Task Manager)
4) Issue PUT request, failure (401) (See Attachment A below)

Solution:
If at all possible, change your Service's web.config setting aspNetCompatibilityEnabled="false" Even if your app needs it to be true, make the change and redo the test to see if you get by the 401 error. Luckily, my service wasn't using any compatibility features, so I could remove this template default value from my WCF service. This behavior appears to be a bug to me.

The repeatable problem:
When the IIS app pool agent (w3wp.exe) is not running, if a PUT request comes through first, the service will fail with an HTTP 401, and all endpoints of the service will become completely unusable. An iisreset will fix the problem temporarily, but again if the service agent becomes idle for long enough, you may be unluckly enough that a PUT may be the first hit. If a GET is the first hit to the new (or recycled) agent, then the PUT (and other) requests will work properly.

Checking for recycled agent:
1) You could look for that service's w3wp.exe in the task list. Be warned that if you have more than one site/service on that machine they will all look the same.
2) An easy way to determine the first hit on an IIS agent is to look at the IIS log file. The headers are added to the log file when the agent starts up. If the first HTTP hit below the header is unexplicably a 401 (but that hit worked before), then you may have this problem.
3) You could check the "System" event log, it will have an Informational "WAS" event saying: "A worker process with process id of 'NNN' serving application pool 'MyService' was shutdown due to inactivity. Application Pool timeout configuration was set to 20 minutes. A new worker process will be started when needed."

Attachment A: Resulting error

Access is denied.

Server Error in '/' Application.

Access is denied.

Description: An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.

Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'C:\inetpub\MyService\Service.svc'.


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

Friday, March 13, 2009

Automotive Warranty scam

I've been receiving phone calls from these caller-ID numbers recently, claiming to have important information about my automotive warranty. They clearly are not my car's manufacturer, and similar scams are being reported elsewhere. These types of offers have arrived in postal mail for a while.

Do NOT fall for their sales pitches. They want to pretend to be a company you already deal with, and sell you expensive and questionable extended warranties under false pretenses.

I wanted to put these phone numbers on the net to help anyone searching for them from their caller id:

1-062-233-4418
1-062-226-3618
1-062-291-1712

Be warned.

Thursday, February 19, 2009

Copy content types Across Farms (SharePoint)

Content Types in SharePoint can be very useful, and can be created by manually by users or automatically by various products or procedures. In one case, content types may be created automatically during a migration of content from CMS to SharePoint MOSS 2007 publishing server. Regardless of where they came from, they can be copied from one site to another, even moved across farms.

Under most circumstances, Gary Lapointe's stsadm extensions can be used to help automate the process. He has operations for copying content types between sites in the same farm, for propogating content types and for exporting content types from a site. Strangely there is no import content types, which would have enabled cross-farm content type copying.

To copy content types across farms, you'll need to do the gl-exportcontenttypes and then create a SharePoint feature that adds them to your site collection, site, ... whatever. If you don't want to install Gary Lapointe's stsadm extensions, you'll need to use his source code to write a console application that does the same thing. If you have the console application, you can drop it onto your source server (no install needed) and do the export.

For the export, I used the following flags:
url = http://hostname
contentTypeGroup = "Custom Content Types"
contentTypeName = null
excludeParentFields = false
includeFieldDefinitions = true
includeListBindings = false
listName = null
removeEncodedSpaces = false
featureSafe = true
outputFile = "ctypes.xml"

Once I had my output (ctypes.xml), I had to remove any ... tag pairs. For some reason they were included in some of the field definitions (site columns) associated with the exported content types. I don't know what the ultimate effect of this is, but it didn't matter to me in this case, and it worked without it.

The structure of the ctypes.xml file should look like this (values removed):
<elements xmlns="http://schemas.microsoft.com/sharepoint/">
<field id=" Name="" sourceid=" StaticName="" group=" RowOrdinal="" type=" DisplayName="" readonly=" Sealed="" colname=" PITarget="" piattribute=" /">
[...]
<contenttype id=" Name="" group=" Version="">
<folder targetname=" /">
<fieldrefs>
<fieldref id=" Name="">
<fieldref id=" Name="">
</fieldrefs></contenttype></elements>

Create a 12 hive feature directory:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\MyCtypes

Copy the ctypes.xml file into the directory.

Add feature.xml with content like this (with a new Id GUID, and change Scope if desired, remember Scope="Site" means SiteCollection):
<?xml version="1.0" encoding="utf-8"?>
<feature id="031D991D-2559-4512-BE86-024E9CA035B3"
Title="My Imported content types"
Description="Content types imported from wherever"
Version="1.0.0.0"
Scope="Site"
ImageUrl="Health.GIF"
Hidden="FALSE"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<elementmanifests>
<elementmanifest location="ctypes.xml">
</elementmanifests>
</feature>

Install the feature this way:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o installfeature -name MyCtypes

(if your xml file doesn't comply to proper schema, this installfeature will fail)

Now go activeate the feature. In this case, go to "Site Collection Features" and click activate for the new feature. This will add the content types to the site collection.

Uninstall this way:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o uninstallfeature -name MyCtypes

This uninstall will remove the content types from the site collection. I suspect this will fail if the content types are in use by the site.

Monday, February 2, 2009

Olympics of the Mind - Smarty Pants - 1985

(Flashback to high school... Reprinted here with attribution but without permission. From this source.)

Marcellus NY Weekly Observer 1985
Press-Observer, April 24, 1985 - Page 24
Two O.M. Teams Bring Home Trophies


Two school buses, a station wagon and a van slipped quietly back into Skaneateles late Saturday, April 20. This caravan was returning from the New York State finals of the Olympics of the Mind competition at SUNY-Buftalo.

Skaneateles pupils who participated in the Buffalo event were all winners of the regional competition March 16 in Auburn. The contests were titled "Big Top," "Ecology Dozer,"
"Compound Fracture," "Music Maestro" and "High Tech-Smarty Pants." Competition is in three divisions according to the grade level of the student.

After checking in at the guest dorms on the Buffalo campus, Friday, April 19,the 60 students and adult coaches were treated to a dinner at Niagara Falls, Canada. Mist and dense fog unfortunately totally obscured their view of the Falls.

Saturday morning the Skaneateles teams began competing against the other regional winners. The first part of the event is called "long term." This allows the competitors to show or use devices and skits to earn points toward victory. The second part of the event is called "spontaneous," where the team members use only brainpower to earn additional points.

The Division Three Skaneateles team for "High Tech-Smarty Pants" won first place for their robot and its skit dealing with an explosion in the chemistry laboratory. Coached by Georgia Peach, with Tammy Dudden assisting, the team of Sharon Graham, Eric Hadley, Maggie Kelly, David Leonard, Aaron Naas, and John Spear earned the privelege of competing in the 1985 World O.M. Finals at the University of Maryland on June 6 and 7.

A third place trophy went to the Divison Two Skaneateles team for "Ecology Dozer." This team of sixth graders, Jim Darrow, Michael Hancock, Jason Highsmith, Jilian Richards, Dietrich Rapalaski and Marcus Frick, built a vehicle powered by a small hydraulic jack. The car and driver had to move four trees from a starting point and place them into buckets along a 25 foot course. Beth and Jorge Batlle coached this team.

This team also won an award for exceptional creativity for the "long term" part of their event. Carol Anne Smith, coordinator for the elementary teams remarked that this was the first time in her memory that this award was presented for the "long term" portion of the event.

Jimmy Allred competing in Division One's "Compound Fracture" event won an award for special achievement in the "spontaneous" part of his team's event.

The Olympics of the Mind competition encourages the development of individual creative skills, team work, diligence and hard work. The predominant spirit of O.M. competitions is fun and humor, and finding new and different ways of doing things.

Frack the BEEP (in BSG podcasts)

There is a great Battlestar Galactica podcast where the Executive Producer, Ronald D. Moore, discusses each episode and the decisions and circumstances that affected aspects of the show. Very interesting and insightful.

I listen to podcasts as I drive to and from work, and unfortunately I can't listen to this one. His podcasts for each show are constructed from segments, and those segments are separated by something that sounds like an industry standard scene-change extended BEEP. Unfortunately he speaks softly enough that I have to turn up the volume to hear him, and the BEEPs are unexpected and ear-piercing. I'm convinced that he has never listened to his own podcast.

I just posted this to podcast alley for that podcast (http://www.podcastalley.com/podcast_details.php?pod_id=1819):

"Not recommended for listening while driving. Great podcast, but he speaks softly, and the transition beeps are very loud and unexpected. In the car I have to turn it up enough to hear him and I do a massive flinch each time it beeps, and I'm concerned that I'll run off the road. Ronald D. Moore, you need to listen to your own podcast, maybe while you're driving or working out. You'll want the beeps reduced in volume too."