Friday, June 17, 2011

Windows Sharepoint Service 2007 - Search Return Unknown Error

Found some strange problem today. Search function in Sharepoint Server which is installed in workgroup mode apparently not working when it is accessed from the Internet.

Below are the details of the setup:
- OS: Windows Server 2008 Data Center Edition
- Software: Windows Sharepoint Service 2007
- Machine: Amazon EC2 - Small Instance
- Authentication: Integrated Windows Authentication (No Domain)

The search function will work when it is accessed from a browser locally on the server, but return "unknown error" when accessed from Internet.

The solution of this problem:
1. Open Sharepoint Central Administration
2. Click Operations
3. Click Alternate access mappings under Global Configurations
4. Click Add Internal URLs
5. Under URL Protocol, host and port type: http://<domain name or ip address>
The domain name or ip address must be the one used by user to access from the Internet
6. Under Zone, select: Internet
7. Click Save

Tuesday, June 14, 2011

Send MSMQ Message to Private Queue on Different Machine

Faced a requirement from client to set up a system that require sending of MSMQ message to remote MSMQ private queue recently.

Below are the steps to set up simple MSMQ system:

1. Install MSMQ on the sender PC (32 bit Vista)
Go to Program and Features > add Windows Component > Message Queuing

2. Install MSMQ on the destination PC (32 bit Windows Server 2008)
Go to Server Manager > Features > Add > Message Queuing

3. Create a private queue on the destination PC
Go to Server Manager > Features > Message Queuing > Private Queue
Right Click Private Queue > New > Name your new private queue
Right click on the newly created private queue > Properties
Go to security tab and allow Anonymous Access

4. The remote queue can be accessed from sender PC with the following Format Name:
"FormatName:Direct=OS:remotePCName\\private$\\remoteprivatequeuename"

Sample Code in C# here