Friday, July 11, 2008
SharePoint 2007: Shared Services "Provision in Progress"
At last, we manage to find the cause of the problem, it's caused by SharePoint Services Timer in Windows Services, which is stopped before, because it consumes a lot of resources when some heavy testings are needed. When the Windows SharePoint Services Timer has been started, the Shared Services can be created smoothly.
Wednesday, June 25, 2008
Gmail and IE7: Operation Aborted
Well, here is Google advice at this page: http://mail.google.com/support/bin/static.py?page=known_issues.cs&knownissue=gmail_issue_ie7operationaborted&topic=12778#
Some Internet Explorer 7 users are reporting the error message "Internet Explorer cannot open the Internet site http://mail.gmail.com/mail/. Operation aborted." If you're experiencing this problem, please use Mozilla Firefox or the older version of Gmail.
And so far, no more useful explanation rather than switch to Firefox and "leave da microsoft's crap for your live". And, if you read on the other solutions there, Google can only advice remove whatever toolbars or addins in IE7 that cause the error. I am not really sure if they're good advices. So, are we allowed to use Google Toolbar only in order to use Gmail smoothly? Come on Google, you can give better explanation, or just fix the issue (for god sake). You're big enough to come out with the complex algorithm for search and unable to solve this small little issue for months? I use a lot of internet/intranet application on IE7, and no single issue happens with the same scale of this error.
Monday, June 23, 2008
SharePoint 2007: Default.aspx displayed "HTTP 500 Internal Error"
1. You try to edit permission in Advanced Permission, but SharePoint throws some error message, so you decide to go to "_layouts/role.aspx", and break the relationship from there.
2. It seems that everything is fine, until you go to the site without typing "default.aspx" (http://server/site/subsite), it will show HTTP 500 Internal Server Error, but if you include "default.aspx" (http://server/site/subsite/default.aspx) in the URL, it is fine.
3. You cannot export/import the site using stsadm.
4. You cannot see the subsite in the SharePoint Designer parent site (however you can open the site in SharePoint Designer by directly typing the full URL), backup/restore site through SharePoint designer will fail too.
5. You cannot create new Document Library, which SharePoint prompt the list name exists, although you're sure that the document library name does not exist.
6. Solution: Go back to Advanced Permission, Inherit the permission back, and try to edit permission again. Now it shouldn't throw any error.anymore.
Tuesday, June 03, 2008
Feature '75a0fea7-c54f-46b9-86b1-2e103a8fedba' is not installed in this farm, and can not be added to this scope
Well, one of the possible reason is ApplicationTemplateCore is not installed yet on your server farm. It's one of the initial step before you use any Application Templates. Having played and installed so many application templates, people might miss the initial step in the other SharePoint environment. If this is not the case, there's other suggestion that might work is to append "-force" when you deploy the solution.
Sunday, June 01, 2008
SharePoint Designer: Show Line Break for Multi Text (Plain Text)
There're 2 ways to overcome this issue:
1. Wrap your <xsl:value-of select="@Column_Name" escaping="yes"></xsl:value-of>using <pre>. However, you will lose the text-wrap functionality, since most browser will render <pre> as it is, no line break means no line break. This maybe a no-go to this solution.
2. Using xslt functionality to change all line break to.For example your original text is:
<xsl:value-of select="@Column_Name" escaping="yes"></xsl:value-of>
Replace it to:
<xsl:call-template name="breakitemdesc"></xsl:call-template>
Add below to the beginning of the other <xslt:template> or after </xslt:template> of the section:
<xsl:template name="breakitemdesc">
<xsl:param name="text" select="@item_x0020_Description"/>
<xsl:choose>
<xsl:when test="contains($text, ' ')">
<xsl:value-of select="substring-before($text, ' ')"/>
<br/>
<xsl:call-template name="breakitemdesc">
<xsl:with-param name="text" select="substring-after($text,' ')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Access Denied when Accessing User Profiles and Properties
What you need to do:
Click on "Personalization Services Permission" in the Shared Services page, and then grant the permission from there. It seems that this permission is totally separated from other permission setting in SharePoint.
Friday, November 23, 2007
How to Setup Loopback Adapter
1. Open Device Manager
2. At the top/root, right click, and select Add Legacy Hardware
3. Select Network Adapter, then look for Loopback Adapter (Microsoft).
Monday, February 12, 2007
Import Mass Data to CRM 3.0: Unable to connect to the remote server
And I am not lucky that my project has quite a lot variety of data to be imported to CRM which is a custom entity. So, I have to built my own application to mass import the data. The application I have built have several basic function, like mapping between excel column and CRM attribute, lookup entity through different attribute, some validation, save/load settings, etc. If I got time, I hope I can tell more about this application in next post. After all seems ok, time to run the real data migration comes. And another unlucky thing happens that after importing about 1000+ records, CRM seems rejecting connection. The specific error is: "The underlying connection was closed: Unable to connect to the remote server". So, no matter what, I have to find a way to solve this problem. It's impossible for me to import every 1000 records for 1.5 million records. First, I try to set some thread sleeping time, or delaying inserting record for several second after several records, no luck. Second, I try to reset the connection by reinitializing the CRM Service, no luck. At last, I ask my uncle Google, and find really good and relevant Knowledge Base, the almighty "913515". If you are not Microsoft Partner, you won't be able to access this, but I think, if you develop Microsoft CRM, you are a Microsoft Partner. But, the point is to set the registry for MaxUserPort and set TcpTimedWaitDelay in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters (they are new registry key value). The maximum value for MaxUserPort is 65,534 (recommended 30,000) and TcpTimedWaitDelay is 260. If you face the same problem and unable to solve it, just contact me. :)
Wednesday, February 07, 2007
MS CRM 3.0: Callout's Configuration
Create one xml file, for example custom.config, and copy this file to the same directory as your callout library:
<configuration>
<connectionstring>your connection string</connectionstring>
</configuration>
You can access the value of Connection String by writing this code in your callout:
XmlDocument doc = new XmlDocument();
string path = System.Reflection.Assembly.GetCallingAssembly().Location + + @"/custom.config";
doc.Load(path);
// set XPath to point to ConnectionString Node
XmlNode node = doc.SelectSingleNode("//Configuration/ ConnectionString");
string connString = node.InnerText;
If you have more than one configuration, you can add new node inside <configuration> and set the XPath in the code accordingly. Happy configuring!
Saturday, October 28, 2006
Refactoring: Replace Method with Method Object
I hope below sample can explain what Extract Method, although it's too simple:
void LongFunction(...)
{
// very long function here
foreach(int item in items)
if (item % 2 == 0)
isEven = true;
// another very long function
}
Applying Extract Method, it will be:
void LongFunction(...)
{
// very long function here
foreach(int item in items)
isEven = IsNumberEven(item)
// another very long function
}
bool IsNumberEvem(int item)
{
if (item % 2 == 0)
return true;
else
return false;
}
Ok, most of the cases Extract Method can be used, as Fowler said, 99% cases. But some extreme cases, that you use too much local variable will be very difficult to apply Extract Method, another ways to do are Introduce Parameter Object, Preserve Whole Object, and Replace Method with Method Object.
Well, what I have experienced before is I have a function that is to do Invoice Calculation. This Invoice Calculation include bunch of variable, local object, etc, and quite long of code and logic. This calculation is used in so many places, like Creating Invoice, Check GIRO, Apply GIRO, etc. So, with Replace Method with Method Object, I create totally new class to do Invoice Calculation. All temporary variable and local object are created as class fields/properties. After applying all the logic into the new method inside the new class, I start to refactor using Extract Method. After series of retesting, I found the new code is far easier to read and maintain. The InvoiceCalculation object can be reused easily, without using too many local variable/paremeter. And, another aspect, I can focus on tweaking the performance easier.
The interesting point, I did this before reading the refactoring technique. After reading, I can apply more understandable word to explain what I am doing. Good book, try yourself.
Thursday, August 17, 2006
Javascript: Debugger
Sunday, July 23, 2006
MS CRM 3.0: How to display Active only at Associated View.
For you do customization on Ms CRM, by default, Ms CRM 3.0 will display both active and inactive record in associated view (View that is displayed child entities in the detail of master entity) for Custom Entities. This is different from default associated view of Contact that is displayed in Account detail, which just displays active record. To achieve same view as Contact, you must edit the exported customization XML manually, since there’s no UI in Ms CRM 3.0 to edit filtering of customized view. And be warned, that this is unsupported way.
Try to export Contact entity from Customization, and find in any text editor “Associated View”, then find
<filter type="and">
<condition operator="eq" value="0" column="statecode">
</filter>
With this condition, you can apply to every Custom Entity to display only Active Record in associated view, by export, edit, import it back and don’t forget to publish the entity. By this mean, you can also put additional condition as needed. If you are not sure what is the format of the condition string, try to do it in the advanced find and see what the string looks like.
Tuesday, March 07, 2006
Sharepoint: Hide Toolbar for Anonymous User
What you need to do is editing the XML Schema/Template for each list. You can see list of existing templates in SPS at folder C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\template\1033\STS\LISTS. Below is example definition for announcement:
Javascript: showModal(less)Dialog
What is the difference between window.showModalDialog and window.showModelessDialog? From how Javascript call this two function, when window.showModalDialog is called, the code will stop there and wait until the new window is closed, but for window.showModelessDialog, the code will keep running and don't wait until new window is closed. So if your parent window is supposed to wait until result from new window returns, then use window.showModalDialog. Otherwise, If you don't care about the result or the result is not needed inside the calling method, then use window.showModelessDialog.
Preamble
Cheers,
Gunady