Friday, October 31, 2008

BlackBerry browser's table redering bug and mending

If you open a web page and there's a table which have rowspan or colspan in it.
You will find it's always can't display properly in the last row. It will miss handle rowspan or colspan in last column. That's basically happens on testified BlackBerry 8830 and 8700. It's also believable for others which include simulator and real device.
Whatever you use .NET GridView, Repeater, Datalist or others, it would happen definitely.

There are 2 method to fix this bug.

1. Add a new same structure blank row in the end of the table. Here is an example
It actually add a new <tr></tr> in the end.

<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" rowspan="2">HW</td>
<td>HW</td>
<td>HW</td>
<td valign="middle" rowspan="2">HW</td>
</tr>
<tr>
<td>HW</td>
<td>HW</td>
</tr>
<tr>
<td valign="middle" rowspan="2">HW</td>
<td>HW</td>
<td>HW</td>
<td valign="middle" rowspan="2">HW</td>
</tr>
<tr>
<td>HW</td>
<td>HW</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>

2. Add a new same structure blank column in the end of the table. Here's an example.
It actually add a new <td></td> in each </tr>.

<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" rowspan="2">HW</td>
<td>HW</td>
<td>HW</td>
<td valign="middle" rowspan="2">HW</td>
<td></td>
</tr>
<tr>
<td>HW</td>
<td>HW</td>
<td></td>
</tr>
<tr>
<td valign="middle" rowspan="2">HW</td>
<td>HW</td>
<td>HW</td>
<td valign="middle" rowspan="2">HW</td>
<td></td>
</tr>
<tr>
<td>HW</td>
<td>HW</td>
<td></td>
</tr>
</table>

Tuesday, October 28, 2008

A batch file with datatime attribute for backup Alternate Access Mappings

Here show you a batch script for backing up AAM

c:
cd\
cls
@echo Backup Alternate Access Mappings
@for /f "tokens=2" %%i in ('date /t') do
@set thedate=%%i
@set mm=%thedate:~0,2%
@set dd=%thedate:~3,2%
@set yyyy=%thedate:~6,4%
stsadm -o enumalternatedomains >>
E:\data\Backup\AAM\AlternateAccessMappings_%mm%%dd%%yyyy%.txt
@echo Done

Friday, October 24, 2008

A DateTime Picker control designed for smartphone browser.

Based on Visual Studio .Net 2008 (with C#), I wrote a datetime picker for smartphone web, especially for BlackBerry.

The first version is actually a DatePicker named BBDatePicker for BlackBerry. I use it on WebPart and show for BlackBerry browser.

I will share with whose commenter here.
Send email to me (teddyyu@live.com) if you want get one.

Thursday, October 23, 2008

How to join custom reference DLL file in when deploy WebPart by STSDEV

Three steps for refer custermized dll such as custom control.
  1. Refer the dll of custom project in.
  2. Sign a key assembly in the custom dll souce project.
  3. Drag the dll into windows assembly and deployment corresponding wss virual directory.

Tuesday, October 21, 2008

STSDEV Debugging for WebPart, Site Definition or workflow.

After deploy the app (webpart etc) into SharePoint site, you want to debug your app as below steps:

  1. Enable debug in project properties.

    Right click project and click properties, click [Build] in left panel.
    Select the method in Configuration which is the deploy method you just done.
    Click to select both "Define DEBUG constant" and "Define TRACE constant".
    Click right-bottom "Advanced.." button and change [Debug Info:] to "full".
    Click [OK] and save all.
  2. Set breakpoint in debug area of your program
  3. Run "iisapp" in command line to choose which SharePoint run time "w3wp.exe" you should pick up. You can pick it by your running sharepoint site name.
  4. Click menu [Debug] - [Attach to Process...], and click the picked "w3wp.exe" and click [Attach] button, go on click [Attach] button on pop up warning window.
  5. Back to the page which host your app (webpart) and refresh or redeploy.

You will see the debug yellow bar pausing on your code for now. You can now use same debugging method by F11/F10 of VS.

Error handle while try to remove SSP

"The snapshot directory does not exist or is not properly configured."

Occasionally, it happened when I tried to delete SSP in SharePoint farm for verify a disaster/recovery procedure. The SSP can not be deleted successfully and not any changes even delete more times.

I then searched from microsoft and internet but get nothing back. What's the snapshot directory ? The error description looks weird and unreachable by internet.

By checking 12 hive logs, get "Delete site operation cancelled by user. Check the log files for additional details. " Hence I tried to delete the SSP host web application manually first and then go on delete the SSP. It worked then.

Friday, October 17, 2008

Where to change PWA administrator account ?

When you do a PWA migration to another environment, you will find the PWA can't be access by account of new environment. Once you want to change it from SharePoint central administration, you will find the PWA owner place is gray which is not able to be changed.

Actually, the PWA account control is not belongs to SharePoint management, it is still within Project control area. I have ever tried to find the owner information from the SharePoint Project content db and Config db but failed, I also spend couple minutes to search it from those 4 Project DB (Draft, Achieve, Published and Reporting) but still can't. If you know where it is specific table to hold, please put comment to let me know. I would appreciate of you.

Here is the steps:
  1. You will have to open http://yoursite/PWA by the previous administrator account which was created by project server procedure. If you can see the [Site Action] in the page left upper corner, that means you have rights to handle.
  2. You want to click [Server Settings] in left quick launch panel, click [Manage Users] under Security panel. You will find the administrator account in new opened page and you may create a new user with assign administrators Security Group for maximum the user rights.

Now by sign in a different user, you will have all the rights to control new PWA site collection.