Saturday, September 13, 2008

Leaving Blogger

I won't be posting to Blogger anymore. I moved to Wordpress and I hope to take advantage of this change to, first, start blogging more, and to start posting more original articles and less links to other people's solutions. The link to my new blog is http://benoit808.wordpress.com/

Friday, March 7, 2008

Error Adding WebReference in VS2005

Today I was trying to add a Web Reference to an existing project in Visual Studio 2005 and got the following error message:

The web services enumeration components are not available. You need to reinstall Visual Studio to add web references to your application.

I tried several solutions found online (except the one suggesting to uninstall and reinstall Visual Studio) but what finally did the trick was a simple command line:
Open the Visual Studio 2005 Command Prompt and type the following command:

devenv /resetskippkgs

Friday, February 1, 2008

New content not getting indexed in MOSS 2007

I have been struggling with an indexing problem in MOSS 2007. We are using an incremental index schedule to index all our content in MOSS and for some reason, which we haven't figured out yet, the indexing service stopped indexing new content. The solution that worked great for us was to Reset the Index. Sharepoint started reindexing the entire site including all my new content.

Monday, December 31, 2007

Uploading a file using Dojo

I was trying to upload a file using and async request with the dojo.xhrPost call. I kept getting an error from my server script (CFMX 7) saying that the contentType was wrong as it was expecting "application/x-www-form-urlencoded" but it was expecting "multipart/form-data".
It was then brought to my attention that you cannot upload a file using xhrPost. You have to use either dojo.io.iframe.send() or dojox.xhrMultiPart.
I tried the dojo.iframe.send() approach and it worked just fine. The javascript looks like this:
dojo.require("dojo.io.iframe");
dojo.io.iframe.send({
method: "post",
url: "process.cfm",
handleAs: "html",
timeout: 3000,
handle: AddEditCallback,
form: dojo.byId('myForm')
});

Tuesday, December 18, 2007

Item Templates not showing up in VS2005

I recently converted the WebPart template provided by Microsoft from C# to VB (Microsoft didn't release a VB version and we are, unfortunately, standardized on VB).
After converting the code and placing it in the appropriate folder (C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates\VisualBasic\SharePoint\), the template was still not showing when creating a new project. This was because the templates cache had to be refreshed. I was able to solve this thanks to a post by Eric Hammersley (Missing an item template in Visual Studio 2005? Try this...)

The secret was just to open a VisualStudio Command prompt and run the command

devenv /installvstemplates

Thursday, December 6, 2007

The application-specific permission settings do not grant Local Activation permission for the COM Server application

This error can be found in the Event Viewer. It can be solved in 3 steps: identify the application using the registry, grant local activation using the Component Services console, restart IIS. Below are the details copied from Mike H's blog post (I changed the service affected to reflect the problem I had to resolve):
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

{BA126AD1-2166-11D1-B1D0-00805FC1270E}

to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security permission can be modified using the Component Services administrative tool.

Copy the GUID following the CLSID above, and Start-->Run-->regedit

With the registry editor open, ensure that your cursor is on the computer at the beginning of the tree (make sure you are not in the middle of some previous edit session in the registry editor).

Edit-->Find and paste in the GUID. It'll stop at the application entry - and you will want to note the application name on the right side pane. In this example, it was the Netowrk Connections Manager service that popped up.

Now, open Component Services (typically, from the server - Start-->Administrative Tools-->Component Services), expand Component Services, Computers, My Computer, DCOM Config. Scroll down and find the application (netman in this case). Right-Click-->Properties and select the Security tab. You'll have some options here - the first block Launch and Activation Permissions - ensure that the Customize radio button is selected, and click Edit. Now, add your service account - giving it launch and activate - and in some requirements - remote launch / activate permission.

Restart IIS and continue on.

Friday, November 2, 2007

Get the current user without writing code in InfoPath 2007

Itay Shakury wrote a great post about getting the current user in InfoPath without using code which would require to have the InfoPath form signed