Monday, November 26, 2012

You updated the workflow, but the changes haven't taken effect

I know how frustrating this can get, I have been there.

I changed the workflow using SharePoint Designer 2007 and published it, but when I test the workflow on SharePoint 2007, it seems to have not been effected by those changes.

Seems like the SPD workflow cache is being superior. Here is how you go about resolving:

  • Close the designer (SharePoint Designer)
  • Navigate to %system drive%\Documents and Settings\%user%\Local Settings\Application Data\Microsoft\WebSiteCache
  • Open the directory that you are referring to. This is similar to the name of your website.
  • Delete the assembly that you were changing. (You might as well delete all the files here)
  • Open SharePoint Designer, publish the workflow and check

Sunday, November 4, 2012

The web application at [URL] could not be found

Here is an error I encountered while calling the SPSite object using the URL:

The Web application at [URL] could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

It was the first time I encountered this and this is how I moved about resolving the issue

1. Checked if the URL was really not available.

That wasn't the case. The URL was very much valid and hence this option got eliminated.

2. Google search on this issue almost always pointed to the bit-ness of the platform. That the application was targeting x86 platform and SharePoint Server was x64 bit platform.

In my case, this wasn't true either. Both my platforms were on x86. It was easy to eliminate this option.

3. AAM, Alternate Access Mapping not done properly.

Wasn't an issue in my case. Any guesses? This option was eliminated as well.

4. The code is a windows or web service application which you are running with an account that does not have permissions to connect to SharePoint or SQL Server.

This is where I was at and out of it. This was the issue in my case. My web service code was running on the DefaultAppPool and the identity for the DefaultAppPool was Network Service Account.

I selected configurable and provided the username and password of a user who had elevated privileges.

It all worked and I hope it does for you as well!