I am very new to Salesforce and as you can see from my blog, I am .Net developer and more specifically a SharePoint developer. In salesforce , there is no clear strategy for release management and I am asking the wider Salesforce community to help me to see if the proposed release plan is OK.
The current deployment model we use are multiple Sandbox environments and changeset to deploy change from Dev >> Test>>Preprod>>Prod . Here are the challenges I understand so far in Salesforce deployment.
You cannot rollback after a changeset is successfully deployed
Creating changeset is very manual
To address the first issue (You cannot rollback after a changeset is successfully deployed):
Backup the data by scheduling a weekly data export (my question would be , how we can use the data export to restore the data)
Backup the apex code (trigger, visual force…), we can use eclipse to deploy these changes so that the apex code can be rolled back.
Document all the schema changes(custom object, custom fields, custom labels, tabs …) , if we do need rolled back we can manually delete all those changes..
To address second issue (Creating changeset is very manual)
We are looking at using Salesforce IDE or Salesforce migration tool to deploy the changes from environment to environment.
How to fix: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list
Recently, I am having issues with deploying asp.net mvc 4 application to Windows Server 2008 R2.After add the necessary role and features and I setup an application in IIS. However , I received the following error message: PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list
It turns out that this is because ASP.Net was not completely installed with IIS even though I checked that box in the “Add Feature” dialog.
To fix this, I simply ran the following command at the command prompt
If I had been on a 32 bit system, it would have looked like the following:
How to fix “Error: This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.”
When I try to deploy my custom wsp solution to a specific web application, I got the error below:
This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.
The error message itself explains why you cannot deploy the solution to a web application. However if you do not like to deploy the solution to all the web applications and only like to deploy your solution to a specific application , you need to change the solution settings Assembly Deployment Target from GlobalAssemblyCache to WebApplication.
After you change the Assembly Deployment Target and run the script again, you will have the solution deployed successfully.
In this post, I will show you how to use external xml file with PowerShell. The advantage for doing so is that you can avoid other people to open up your PowerShell code to make the configuration changes; instead all they need to do is to change the xml file. I will refactor my site creation script as an example; you can download the script here and refactored code here.
1. As you can see below, I hard code all the variables in the script itself.
$url = "http://ybbest" $WebsiteName = "Ybbest" $WebsiteDesc = "Ybbest test site" $Template = "STS#0" $PrimaryLogin = "contoso\administrator" $PrimaryDisplay = "administrator" $PrimaryEmail = "email@example.com" $MembersGroup = "$WebsiteName Members" $ViewersGroup = "$WebsiteName Viewers"
2. Next, I will show you how to manipulate xml file using PowerShell. You can use the get-content to grab the content of the file.
[xml] $xmlconfigurations=get-content .\SiteCollection.xml
3. Then you can set it to variable (the variable has to be typed [xml] after that you can read the content of the xml content, PowerShell also give you nice IntelliSense by press the Tab key.
[xml] $xmlconfigurations=get-content .\SiteCollection.xml $xmlconfigurations.SiteCollection $xmlconfigurations.SiteCollection.SiteName
4. After refactoring my code, I can set the variables using the xml file as below.
#Set the parameters $siteInformation=$xmlinput.SiteCollection $url = $siteInformation.URL $siteName = $siteInformation.SiteName $siteDesc = $siteInformation.SiteDescription $Template = $siteInformation.SiteTemplate $PrimaryLogin = $siteInformation.PrimaryLogin $PrimaryDisplay = $siteInformation.PrimaryDisplayName $PrimaryEmail = $siteInformation.PrimaryLoginEmail $MembersGroup = "$WebsiteName Members" $ViewersGroup = "$WebsiteName Viewers"
When your SharePoint Solution package include third party or external dlls , you will often see your solution fail to deploy due to the locking of the dlls. Today I will show you how to find which process locks your dlls using Process Explorer.
1. Here is an example that your solution fails to deploy due to dll being locked.
2. Start the explorer by double click the procexp.exe
3. From the find tab click Find Handle or DLL
4.Type the your dll name and click Search
5. I can see all the processes that use my dlls at the moment, it looks like the iis , visual studio and SharePoint timer services might be the trouble. From my experience , it could be Visual studio.
6. Close visual studio and redeploy my solution, it works like charm. Re-search the dll, you can see Visual studio is not in the results.
Recently, when I running the buildscript for a SharePoint. I get the following error message:
[exec] Remove-SPSite : Cannot open database “WSS_Content_YBBEST_AAA_2013′ requested by the login. The login failed.
[exec] Login failed for user ‘YBBEST\administrator’.
Then I went to the SQL Management studio, the database is in Single user mode, not sure how it ends up in that state. When I try to delete the database then I got the following errors:
Changes to the state or options of database ‘WSS_Content_YBBEST_AAA_2013’ cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
Guess, how to fix the issue?
Restart your SQL Server to fix the problem.
You can restart SQL Server by right click the server in your Management studio and choose restart.