Wednesday, September 27, 2006

Creating users programmatically in DNN 4.3.5

We had creted a custom registration module in DNN 4.0.3. When I updated my module to DNN 4.3.5 I found that this version had several changes.

The major issue I have found is the fact that I can not set any profile property. In this DNN forum you can finf how to resolve it. In my case in didnt' work. After try several alternatives I have fixed setting the properties out of the profile and directly into the UserInfo properties:

Example in DNN 4.0.X:

Example in DNN 4.3.X:

With this solution now I can sign in my users in portal.

Tuesday, September 26, 2006

Shrinking the Log File in SQL Server 2005

Sometimes we need to delete the log file as quickly as possible. This is not the best way but is the most simple. Only in 6 steps:
1 - Detach DataBase
2 - Rename Log file or remove if tou are completely sure.
3 - Attach the database. You have to select the mdf file of the database.
4 - If you have deleted or renamed the log file tou will see an error "Not found" in the log file of the attached database.
5 - Select the log file with the error and click on "Remove"
6 - Click on "OK"

Now you have the same database without the large log file. Automatically SQL Server creates another file with minimum size and you can delete the file.

Use this method only to shrink database files without imprtance (development or test DB).