Add "dp_user" user to the MySQL.
1) Install Apache web server.
2) Install PHP to your web server.
PHP should support GD and MySQL
3) Install MySQL.
4) Add "dp_user" user to the MySQL.
5) Create a schema (Database) "dotproject" and assign user "dp_user" has full permission of this DB.
6) Copy all dotProject files to the htdocs folder.
- Open browser to access http://Your Domain/dotProject/install/index.php
- follow the step to complete the installation.
7) The default admin login is :
User Id : admin
Password : passwd
Friday, February 19, 2010
Prepare SQL 2005 to use CLR
1) Turn on the 'clr enabled" feature of your server.
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
2) Turn on the Trustworthy property of your database if your clr assembly require access external resources.
ALTER DATABASE [DB Name]
SET TRUSTWORTHY ON
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
2) Turn on the Trustworthy property of your database if your clr assembly require access external resources.
ALTER DATABASE [DB Name]
SET TRUSTWORTHY ON
Sunday, November 22, 2009
Use Diskpart to Remove EISA Partition
- Open a command prompt as administrator.
- Run Diskpart application by typing Diskpart in the command prompt.
- In the “Diskpart” prompt, enter rescan command and press Enter key to re-scan all partitions, volumes and drives available.
- Then type in list disk and press Enter key to show all hard disk drive available.
- Select the disk that contains the partition you want to remove. So the command will be:
select disk y
Finish by Enter key.
- Type list partition and press Enter key to show all available and created partition in the disk selected.
- Select the partition that wanted to be deleted by using the following command, followed by Enter key:
select partition x
where x is the number of the EISA based recovery partition to be removed and unlocked its space. Be careful with the number of this partition, as wrong number may get data wipes off.
- Finally, type in delete partition override and press Enter key.
Wednesday, September 23, 2009
Caution when upgrade WinService from .NET 1.1 To .NET 2.0
When you try to upgrade a WinService from .NET 1.1 to .NET 2.0, Please pay attention at the thread mode. In .NET 1.1, the default value of the thread mode is background. However, the default value of the thread mode is changed in .NET 2.0.
In .NET 2.0, You need to explicitly set the thread mode to background.
In .NET 2.0, You need to explicitly set the thread mode to background.
Tuesday, June 9, 2009
Reduce LDAP connection creation
I have a problem when my application runs to do a high-volumn LDAP operation.
This is the original codes. This code creation a lot of TCP port to AD with "TIME WAIT" status.
private void AddToGroup(UserPrincipal currentUser, GroupPrincipal group)
{
using (DirectoryEntry dirEntry = new DirectoryEntry(string.Format("LDAP://{0}/{1}", group.Context.ConnectedServer, group.DistinguishedName)))
{
dirEntry.Properties["member"].Add(currentUser.DistinguishedName);
dirEntry.CommitChanges();
dirEntry.Close();
dirEntry.Dispose();
}
}
In order to reduce the LDAP connection creation from using SDS.AM. We could use the GetUnderlyingObject() method to get the corresponding DirectoryEntry object of the UserPrincipal or GroupPrincipal. Using this way, my application could finish its task without error. Here is the new codes to do the same thing.
private void AddToGroup(UserPrincipal currentUser, GroupPrincipal group)
{
using (DirectoryEntry gEntry = (DirectoryEntry)group.GetUnderlyingObject())
{
gEntry.Properties["member"].Add(currentUser.DistinguishedName);
gEntry.CommitChanges();
}
}
Here is a reference from Microsoft. http://msdn.microsoft.com/en-us/library/bb924562.aspx
This is the original codes. This code creation a lot of TCP port to AD with "TIME WAIT" status.
private void AddToGroup(UserPrincipal currentUser, GroupPrincipal group)
{
using (DirectoryEntry dirEntry = new DirectoryEntry(string.Format("LDAP://{0}/{1}", group.Context.ConnectedServer, group.DistinguishedName)))
{
dirEntry.Properties["member"].Add(currentUser.DistinguishedName);
dirEntry.CommitChanges();
dirEntry.Close();
dirEntry.Dispose();
}
}
In order to reduce the LDAP connection creation from using SDS.AM. We could use the GetUnderlyingObject() method to get the corresponding DirectoryEntry object of the UserPrincipal or GroupPrincipal. Using this way, my application could finish its task without error. Here is the new codes to do the same thing.
private void AddToGroup(UserPrincipal currentUser, GroupPrincipal group)
{
using (DirectoryEntry gEntry = (DirectoryEntry)group.GetUnderlyingObject())
{
gEntry.Properties["member"].Add(currentUser.DistinguishedName);
gEntry.CommitChanges();
}
}
Here is a reference from Microsoft. http://msdn.microsoft.com/en-us/library/bb924562.aspx
Saturday, June 6, 2009
Get Mime Type from IIS
Except the System.DirectoryServices, I also need to add a reference of com object "Active DS IIS Namespace Provider" in VS.
using System.DirectoryServices;
public static string GetMimeType(string extension)
{
string retMimeType = null;
using (DirectoryEntry mimeMap = new DirectoryEntry("IIS://Localhost/MimeMap"))
{
PropertyValueCollection pValues = mimeMap.Properties["MimeMap"];
foreach (object value in pValues)
{
IISOle.IISMimeType mimeType = (IISOle.IISMimeType)value;
if (extension == mimeType.Extension)
{
retMimeType = mimeType.MimeType;
}
}
}
return retMimeType;
}
Subscribe to:
Posts (Atom)