Blog Stats

  • Blogs - 4
  • Posts - 85
  • Articles - 0
  • Comments - 25
  • Trackbacks - 38

Bloggers (posts, last update)

Welcome All

When SubText is configured to host multiple Blogs, you'll see http://blogs.hzsolutions.com/vnd/Default.aspx is fine, but http://blogs.hzsolutions.com/vnd/ will return 404 - Not found error code. The simplest solution here is create a real directory and put inside it an empty Default.aspx page, for example i have to create a folder named vnd in order make http://blogs.hzsolutions.com/vnd/ work !

For more detail, take a look at  Shiva Manjunath blog at  http://theshiva.us/technicalblog/archive/2006/12/14/subtext-error-solution-fix-404-page-not-found-errors-multiple-blogs.aspx

Latest Posts

Someone is WRONG on the Internet

posted @ 8/19/2008 3:33 PM by Vu Nguyen

Windows: Logon failure: the user has not been granted the requested logon type at this computer

When you share a Folder from a Windows XP machine, you might not able to access to it even you see that computer in it's work group, any time you attempt to access to, you receive a error message like

  • \\[SHARE] is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have  access permissions. 
  • Logon failure: the user has not been granted the requested logon type at this computer

 

When ran into it, you can consider one of two solution I found from others over Internet. It  might help a lot.

Audit Local Security Settings

  1. On Start Menu>Control Panel>Users, enable Guest user.
  2. Open Local Security Settings by select Start Menu>Control Panel>Administrative Tools>Local Security Settings
  3. Navigate to Local Policies>User Rights Assignment
  4. Right-click on Access this computer from the network>Properties>Add Users or Groups, add everyone or any users you want to be able to access the computer from the network > Add Guest user to this if not exists
  5. Right-click on Deny access to this computer from the network>Properties, remove everyone or any users you do NOT want denied to be able to access the computer from the network > Remove Guest user from this if exists

Using Windows Server 2003 Resource Kit Tools (Steve Winograd)

 

  1. Download and install the Windows 2003 Server Resource Kit Tools
    from http://go.microsoft.com/fwlink/?LinkId=4544 .
  2. Click Start | All Programs | Windows Resource Kit Tools | Command Shell.
  3. Type these lines at the command prompt. The second and third commands are case-sensitive, so type them exactly as shown. Note the "+r" in the second one and the "-r" in the third one:
    • net user guest /active:yes
    • ntrights +r SeNetworkLogonRight -u Guest
    • ntrights -r SeDenyNetworkLogonRight -u Guest

 

Technorati Tags: ,

posted @ 8/16/2008 12:52 AM by Vu Nguyen

Windows: Remote Desktop Shutdown/Restart/Hibernate

You'll not see "Shutdown" in Start Menu anymore when you are connected to a workstation via Remote Desktop, the "Shutdown" option changes to "Disconnect". If you want to turn off the computer, hibernate it, or put it on stand-by, there are really more than one solution to get thing done

  1. Open Task Manager, from the main Menu and select your shutdown option under "Shutdown" menu.
  2. On the desktop and type Alt+F4. This will call up the shutdown dialog.
  3. And the last way I know is using shutdown utilities from Star->Run command, here are some samples
    • "shutdown" to shutdown
    • "shutdown -r" to reboot
    • "shutdown -i" to get a GUI
    • "shutdown -l" to logoff

Off course that all need administrative privileges on the remote computer, you might supply your administrator account by %windir%\system32\runas.exe /user:AdminAcctNameHere "%windir%\system32\shutdown.exe -s "

 

posted @ 8/16/2008 12:18 AM by Vu Nguyen

ASP.NET: Can't not logged in successful on a few computer

One of our ASP.NET web application goes to production for months. Last week, we received reports on a few computers , users can't log-in with their correct credentials. We asked them to have administrator control on a computer which problem happen. After make sure that their Browser security, Anti-spyware, Anti-Virus and anything might cause the problem. We have decided install a HTTP traffic monitor tool like IE Web Developer V2 to see what happening on this computer with our website

  1. The browser requests the specified login.aspx page
  2. The server responds with the login page
  3. The user fills in the login page and submits the form, so the browser POST the form back to the login page
  4. If the credentials are valid, the server responds with another "302 Page Moved" status, a Location header pointing to a protected.aspx, and a Set-Cookie header providing the encrypted Forms Authentication Ticket. Everything seem as it happen on working computer.
  5. Get redirected to login.aspx page again

Nothing potential caused the problems and we did frustrated after 5 days without able to location is that wrong in client side or server side after

  • Replace authentication module by new one
  • Setup brand new application to a sandbox
  • Review Web server configurations
  • And anything we can think to....

Really headache, huh ?

God bless us, when we almost ran out of time and received more bad report from our users, we found why. I'm glad to share you our report on this problems, due to rights have been removed

 

Introduction

- When user provide correct username/password, Concorde will send them a authentication cookie with Issued date and Expired Date, these date are in GMT time zone.

- In our application, the authentication cookies will be expired in next 30’, as described in timeout attribute of <Forms…> tag of Web.config.

- This cookies is very important in order to authenticate visitor in HTTP stateless environment

Problems

- User can’t login occasionally in few computers, reported seem to be Internet Explorer 6 problems, FireFox and IE 7 are seem to be fine.

- We have re-write code to replace authentication by another alternative methods, but not work.

- Tracing Raw HTTP with some HTTP traffic monitoring tools show that

o Login code work well

o Authentication cookie issued but Internet Explorer seem rejected it without a reason (surely Its not blocked by security policy), cookies appeared and lost ==> YES, this is problem.

- We have check to make sure nothing straight  happen to

o Browser, Browser’s security and privacy setting

o Client’s antivirus, firewall, anti-spyware,…

o Evaluating setting of websites, domains, sub-domains, and whole IIS setting, still see nothing.

o Online community doesn’t help at all.

Root cause

- Hopelessly, but how about cookie’s expired time ?

- Follow that idea and found there are something wrong to Cookie expired date, We didn’t really that because the value are in GMT, when client machine are in GMT-7. Convert current time in Server Machine, Client Machine to GMT, It’s clearly that Expired Date of the cookie are in past, and of course that IE will rejected it because it was expired.

- That mean there are something wrong with clocks on Server or Client machine here, but if this bug is occasionally happen, then this client’s clock must be the one wrong, I check out and see that this machine doesn’t auto-syn with Internet time server, that’s is.

- Also noticed that might be this is Daylight-saving problem and found a useful paper at http://support.microsoft.com/kb/934413

Solution

- Change timeout value of authentication cookie from 30 minutes to 120 minutes by change timeout="120" <forms name="XYZAuthentication" protection="All" path="/" loginUrl="~/Login.aspx" slidingExpiration="true" timeout="120" cookieless="UseCookies"/> in Web.config.

- Noticed that will not sure when clock on client machine faster than server machine above 2 hours (120 minutes), then ask end-users to

o Automatically synchronize with an Internet time server as attached screenshot

o Follow Microsoft’s Daylight Saving Time Help at http://support.microsoft.com/dst2007

 

posted @ 7/30/2008 12:16 PM by Vu Nguyen

.NET Framework 3.5 Training Kit

- The Visual Studio 2008 and .NET Framework 3.5 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies including: LINQ, C# 3.0, Visual Basic 9, WCF, WF, WPF, ASP.NET AJAX, VSTO, CardSpace, SilverLight, Mobile and Application Lifecycle Management.

- The .NET Framework 3.5 Enhancements Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the .NET 3.5 Enhancement features including: ASP.NET MVC, ASP.NET Dynamic Data, ASP.NET AJAX History, ASP.NET Silverlight controls, ADO.NET Data Services and ADO.NET Entity Framework.

  1. Visual Studio 2008 and .NET Framework 3.5 Training Kit
  2. .NET 3.5 Enhancements Training Kit

 

posted @ 7/30/2008 2:51 AM by Vu Nguyen

ASP.NET: Read Authentication Form Timeout value

When you write a custom Membership provider, you might need to know timeout value of authentication form which declared in Web.config tto fullfil to your custom authentication ticket

// Get form authentication time-out

posted @ 7/18/2008 11:06 PM by Vu Nguyen

ASP.NET: Display Row Index number in GridView, DataGrid, Repeater, DataList

Solution #1

<asp:TemplateField>
    <ItemTemplate>
        <%# Container.DataItemIndex + 1 %>
    </ItemTemplate>
</asp:TemplateField>

Solution #2

  • Template
<asp:TemplateField>
    <ItemTemplate>
        <asp:Label runat="server" ID="lblRowIndex"/>   
    </ItemTemplate>
</asp:TemplateField>
  • Behind code

protected void GridView1_RowCreated1(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.DataRow) { 
        Label lblRowIndex= (Label)e.Row.Cells(0).Controls(0); 
        lblRowIndex.Text = (e.Row.RowIndex + 1).ToString();
    }
}

posted @ 7/5/2008 10:08 AM by Vu Nguyen

AJAXToolKit: ModalPopupExtender and Form validation issues

Why Validation Controls Don't Work ?

Found on http://www.myonlyblog.com/2007/07/modalpopup-validation-controls-dont.html:

"The solution, it turned out is REAL simple, don't use either the OkControlID or OnOkScript. Basically you don't need the OkControlID or OnOkScript to be set unless you plan on doing some processing on the client side, this was why I was not firing the validation controls, I was posting back first because I had both of these set."

Keep the ModalPopupExtender open when something wrong in Server processing

For example, you lets user to enter a data entry form in a ModalPopupExtender (something like Matt Berseth 's work at  http://mattberseth.com/blog/2008/04/masterdetail_with_the_gridview.html), and you want to notify user if something wrong and data couldn't be saved properly and keep the ModalPopupExtender open, just all ModalPopupExtender.Show() in catch block of your try...catch statement.

Anyway, if you like http://mattberseth.com/blog/2008/04/masterdetail_with_the_gridview.html, you must read his bug fix http://mattberseth.com/blog/2008/05/bug_bashbuttoncausesvalidation.html too !

 

posted @ 7/5/2008 8:36 AM by Vu Nguyen

Tìm Hiểu Card Màn hình Laptop và Chọn Mua


(bài viết này chỉ để tham khảo thêm khi mua máy , không nặng về tính kỹ thuật của từng loại Card màn hình)

Khi máy tính xử lý các tác vụ đồ họa nặng như chơi game hoặc chỉnh sửa video thì các thông tin cần thiết cho việc hiển thị hình ảnh sẽ được lưu trữ tạm trong bộ nhớ RAM của bo mạch đồ họa (Video RAM). Những tác vụ hay game càng nặng nề thì lượng bộ nhớ cần thiết phải càng nhiều. Bo mạch đồ họa loại cũ có dung lượng bộ nhớ từ 32 tới 64 MB, dòng bo mạch tầm trung có dung lượng từ 64 tới 128 MB và các mẫu cao cấp (với giá cao hơn) có bộ nhớ từ 128 tới 256 hoặc 512M . Bộ nhớ 32 MB đáp ứng tốt các nhu cầu văn phòng, trong khi 64 MB có thể xem là đủ để chơi một số game thuộc loại cũ, nhưng thường không đủ đáp ứng các game mới khi chạy ở độ phân giải trên 1600 x 1200 pixel. Do đó, với các game 3D mới cũng như công việc xử lý đồ họa - phim ảnh cao cấp, bạn nên chọn bo mạch đồ họa với dung lượng bộ nhớ tối thiểu là 128 MB.
Cũng cần nhắc đến các loại bo mạch đồ họa tích hợp sẵn trên mainboard (thường gọi là card onboard), loại này chia sẻ bộ nhớ RAM của hệ thống để sử dụng cho đồ họa. Nhìn chung, việc chia sẻ này làm giảm tổng hiệu năng của hệ thống nhưng lại tạm đủ cho các tác vụ đơn giản. Vì vậy đây không phải là sự lựa chọn tốt cho các game thủ, người làm công việc thiết kế và xử lý phim ảnh

ĐIỀU BĂN KHOĂN LÀ CARD MÀN HINH NÀO THÍCH HỢP VỚI CÔNG VIỆC CỦA MÌNH VÀ CHẤT LƯỢNG, GIÁ CẢ, CARD CỦA HÃNG NÀO THÌ TỐT HƠN...


Hiện nay, hai "đại gia" về chip xử lý đồ họa là nVIDIA (geforce)và ATI(radeon) chiếm phần lớn thị trường thông qua nhiều nhà sản xuất thứ ba như Asus, Abit, Albatron, Gigabyte... Dòng cao cấp của ATI thường được ký hiệu XT hay Pro sau tên sản phẩm, còn cấp thấp là SE. Ví dụ đối với ATI RADEON 9800 thì tốc độ và hiệu năng sẽ được sắp xếp giảm dần theo RADEON 9800XT, RADEON 9800Pro, RADEON 9800SE. Đối với nVIDIA, thứ tự lại là Ultra/Ti/Pro/SE và XT.và G->GS->GT->GTScho Laptop. Hãy chú ý ký hiệu XT đối với ATI thể hiện sự cao cấp, còn với nVIDIA lại là dòng rẻ tiền nhắm vào thị trường cấp thấp. nVIDIA chỉ tập trung vào sản xuất GPU (Graphic Processing Unit, bộ xử lý đồ họa), nên 100% card là của những hãng thứ ba. Còn ATI vừa sản xuất card, vừa bán GPU của mình cho các nhà sản xuất khác nên có nhiều lựa chọn hơn. Vì thế, các card AGP sử dụng GPU ATI được phân làm hai loại: BBA (Built by ATI, card do chính ATI sản xuất và bảo hành) và PBA (Powered by ATI, card do các hãng khác sản xuất với GPU ATI).

SHARE RAM TRÊN CARD MÀN HÌNH RỜI:

Hiện ATI đang sữ dụng công nghệ Hyper Memory và NVIDIA sử dụng TurboCAche để share thêm RAM từ bộ nhớ chính cho card màn hình rời.
- HYPERMEMORY : loại này thường dễ xác định. Số RAM share sẽ bằng số RAM có sẵn trên card. Ví dụ 1 card VGA của ATI ghi: "256MB ATI Mobility Radeon X1400 HyperMemory” ta sẽ biết nó gồm 128Mb trên card + 128 MB share từ mainmemory.
- TURBOCACHE: loại này tương đối khó xác định (có thể phải dùng phần mềm kiểm tra mới biết đích xác). Thí dụ 1 card VGA của NVIDIA ghi: "256MB Nvidia GeForce Go7400 TurboCache" thì có thể là share phân nữa như ATI (128 + 128), nhưng cũng có thể là share tới 3/4 (tức là 64 Mb trên card + 192Mb từ mainmemory)

Card Geforce khá nhiều nhà nhập khẩu laptop Việt Nam chọn để nhập về. Các dòng card rời như : 8400, 8400GT, 8600, 8600GS, 8600GT, 8700... và các bạn đang phân vân về dung lượng và sự khác nhau của nó.

dưới đây là những dòng Card đồ họa hỗ trợ DirectX 10 mới nhất: NVIDIA GeForce 8, ATI HD2xx

NVIDIA GEFORCE

GeForce 8400: bao gồm GeForce 8400M G, GeForce 8400M GS, GeForce 8400M GT



Thông số kĩ thuật:

Stream Processors: 16 (8400M G chỉ có 8)
Xung nhân: 400 MHz (8400M GT tới 450 MHz)
Shader Clock: 800 MHz (8400M GT tới 900 MHz)
Xung nhớ: 600 MHz
RAM: 256 MB (8400M GT tới 512 MB)
Giao tiếp bộ nhớ: 64-bit (riêng 8400M GT là 128-bit)
Băng thông: 9.6 GB/s (riêng 8400M GT 19.2 GB/s)


GeForce 8600: bao gồm GeForce 8600M GS, GeForce 8600M GT



Thông số kĩ thuật

Stream Processors: 16 (8600M GT tới 32)
Xung nhân: 600 MHz (8600M GT chỉ có 475 MHz)
Shader Clock: 1200 MHz (8400M GT chỉ có 950 MHz)
Xung nhớ: 700 MHz
RAM: 512 MB
Giao tiếp bộ nhớ: 128-bit (riêng 8400M GT là 128-bit)


GeForce 8700M: chỉ có một đại diện duy nhất là GeForce 8700M GT

chết thèm với chú này hic hic!!
Thông số kĩ thuật

Stream Processors: 32
Xung nhân: 625 MHz
Shader Clock: 1250 MHz
Xung nhớ: 800 MHz
RAM: 512 MB
Giao tiếp bộ nhớ: 128-bit

ATI RADEON


ATI Mobility Radeon X2300

ATI Mobility Radeon HD 2300

ATI Mobility Radeon HD 2400

ATI Mobility Radeon HD 2400XT

ATI Mobility Radeon X2500

ATI Mobility Radeon HD 2600

ATI Mobility Radeon HD 2600 XT

Để dễ dàng so sánh hơn. Các bạn vào link này tìm hiểu thêm
http://www.notebookcheck.net/Mobile-Graphi...List.844.0.html

posted @ 5/27/2008 4:00 PM by Phuongnt

Free Wallpaper

posted @ 5/21/2008 4:50 AM by Phuongnt

> 6 Phần Mềm Miễn Phí Không Thể Thiếu Cho Chỉnh Sửa ảnh Số, những phần mềm khá hay

6 phần mềm miễn phí không thể thiếu cho chỉnh sửa ảnh số


Những phần mềm vượt trội sau sẽ giúp bạn chỉnh sửa hiệu quả kho ảnh số của mình mà không cần tốn nhiều công sức, và không cần bỏ ra nhiều tiền bởi đa phần các chương trình là miễn phí.

Bạn cần "làm sạch" ảnh, xóa hiệu ứng mắt đỏ, chỉnh sửa gamma, hay bổ sung các hiệu ứng đặc biệt? Có rất nhiều phần mềm có khả năng thực hiện điều này. Các ứng dụng sau dành cho cả đối tượng amateur lẫn chuyên nghiệp.

1. The Gimp:

Phần mềm nguồn mở này được thiết kế khá tốt, trình bày tập trung và hoàn toàn miễn phí. Gimp có một số tính năng rất mạnh có thể sánh cùng với Photoshop, bao gồm các bộc lọc, hiệu ứng, mask và lớp. Dĩ nhiên, chương trình này cũng có các công cụ cơ bản dành cho một trình chỉnh sửa ảnh, chẳng hạn như sửa hiệu ứng mắt đỏ. Nếu bạn đang tìm kiếm một chương trình chỉnh sửa ảnh chuyên nghiệp mà không cần đầu tư cho cả một gói ứng dụng, hoặc ko muốn trả tiền, thì Gimp sẽ rất thích hợp cho bạn.

download. Giá: Miễn phí

2. XnView:

Khi đã quen với các chương trình chỉnh sửa ảnh, thì không có gì tốt hơn là một phần mềm miễn phí, đặc biệt là ứng dụng đó lại có nhiều công cụ chỉnh sửa ảnh như XnView. Bạn có thể điều chỉnh kích thước, chỉnh hiệu ứng mắt đỏ, xoay, trượt, và thực hiện nhiều tác vụ chỉnh ảnh như độ sáng, tương phản, và gamma. Chương trình này còn có thể chuyển ảnh sang nhiều định dạng ảnh khác nhau. XnView không phải là một công cụ mạnh như Gimp nhưng ít nhất nó cũng có những tính năng cần thiết nhất, và ngoài ra nó hoàn toàn miễn phí.

download. Giá: Miễn phí

3. Image Resizer:

Bạn cần một chương trình có thể chỉnh kích cỡ hàng loạt ảnh một cách nhanh chóng? Hãy sử dụng trình miễn phí rất dễ sử dụng này của Microsoft trong gói PowerToy. Nhấn chuột phải vào một ảnh hoặc một nhóm ảnh, rồi chọn chế độ Resize Pictures, bạn sẽ có thể chỉnh lại kích cỡ ảnh theo các định dạng: Nhỏ (640x480 pixel), Trung bình (800x600 pixel), Lớn (1024x768 pixel), hoặc Handheld PC (240x320 pixel).

Khi lựa chọn ảnh và nhấn OK, chương trình sẽ chỉnh sửa ảnh sang kích cỡ khác trong khi vẫn giữ nguyên ảnh gốc. Nếu bạn nhấn vào nút Advanced trước khi nhấn OK, bạn có thể chỉnh sửa ảnh gốc thay vì copy chúng.

download. Giá: Miễn phí

4. FxFoto 2.0:

Lại là một chương trình miễn phí khác nhưng khả năng chỉnh sửa ảnh lại mạnh đến mức ngạc nhiên. Các tính năng của FxFoto 2.0 có rất nhiều: loại bỏ hiệu ứng mắt đỏ, chỉnh độ sáng, tương phản, gamma, cân bằng màu, hiệu ứng bộ lọc, loại bỏ vết nhơ tự động, vẽ, nhân bản, bổ sung frame, tạo viền...

Giao diện làm việc của FXFoto 2.0 cũng rất tuyệt, nó tạo một thư viện ảnh ngay phía dưới (bên trái) màn hình để bạn có thể dễ dàng kéo xuyên suốt và tìm chính xác tấm ảnh bạn muốn. Khi đã chỉnh sửa ảnh xong, bạn có thể tạo slideshow với các hiệu ứng chuyển đổi chuyên nghiệp. Ngoài ra, chương trình còn cho phép tạo ảnh nghệ thuật, và có những công cụ chia sẻ ảnh qua e-e-mail, upload lên site chia sẻ hoặc ghi vào đĩa CD.



download. Giá: Miễn phí

5. Roxio Media Ticker

Nếu bạn muốn một kiểu trình diễn ảnh dạng trượt ngang qua màn hình desktop, hay muốn trang trí ảnh cho những người khác xem thông qua trang chia sẻ Flickr thì Roxio Media Ticker sẽ là lựa chọn đúng đắn.

Chương trình có thể tạo thanh trượt dành cho ảnh để bạn có thể đặt chúng ở bất kỳ nơi nào trên màn hình desktop. Ảnh có thể là ảnh từ ổ cứng, từ RSS feed, hoặc từ ảnh upload lên Flickr. Khi di chuột qua bất cứ ảnh nào bạn đều nhìn thấy thông tin mô tả. Khi nhấn đúp vào ảnh, nó sẽ hiển thị to hơn trên màn hình, để từ đó bạn có thể in ảnh, e-mail, xoay chuyển, hoặc tạo ảnh nền...

download. Giá: Miễn phí.

6. Photoscape

Photoscape là một ví dụ khác về phần mềm tuy miễn phí nhưng lại có đầy đủ chức năng, từ xem ảnh, chỉnh ảnh, tạo slideshow, chỉnh sửa nhiều file cùng lúc, chụp màn hình... Ứng dụng này còn có các công cụ cải tiến khác, chẳng hạn như nối nhiều ảnh thành một khung hình, hoặc import file ảnh RAW và chuyển đổi thành ảnh .JPEG.

Mặc dù chương trình trình miễn phí nhưng Photoscape vẫn có cơ chế ủng hộ tài chính cho tác giả nếu người dùng muốn.

posted @ 5/21/2008 4:47 AM by Phuongnt

ASP.NET: Create ASP.NET 2.0 Multilingual Websites

  1. Localizing process (from Michèle Leroux Bustamante)
    • Design pages by applying a combination of static HTML and ASP.NET server controls.
    • Prepare static areas for localization by wrapping them with the ASP.NET Localize control.
    • Provide proper control names to all server controls so that generated event handlers and resource keys can be easily recognized.
    • Create shared resources in the App_GlobalResources subdirectory. These can be .resx files that already exist, or new .resx files created to hold terms that will be shared across several pages.
    • Associate shared resources with control properties using explicit resource expressions, where appropriate. It is best to do this before generating local resources for the page.
    • Generate local resources while in Page Design view by selecting the Generate Local Resource menu item.
  2. Video How Do I: Create a Multi-Lingual Site with Localization? from ASP.NET 2.0 "How Do I" video series of Scott Stansfield
  3. Tutorials
  4. Advanced
  5. To be continuing...

posted @ 5/12/2008 3:21 AM by Vu Nguyen

SQL Server CE: Unable to check if a table exist before drop

IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'YOUR_TABLE')
DROP TABLE ''YOUR_TABLE'

will NOT work because SQL CE are not support that IF EXISTS statement in this case, how awful ?

posted @ 5/4/2008 9:02 AM by Vu Nguyen

.NET: Build custom providers for application

White papers

  1. Provider Toolkit
  2. Custom Provider-Based Services
  3. Hands-on Custom Providers- The Contoso Times
  4. Code template to get quick start http://download.microsoft.com/download/8/e/2/8e254b03-796b-48d4-9579-abe4492cd11b/providerbasedfeature.msi

ASP.NET 2.0 providers implementations

  1. Access-based Sample Access Providers
  2. Xml-based provider ASP.NET XmlProvider Library, ASP.NET XmlProviders, XML membership provider for ASP.NET 2.0
  3. FireBird-based providers http://www.firebirdsql.org/index.php?op=files&id=netprovider
  4. MySql-based providers CodeProject- Membership and Role providers for MySQL. Free source, CodeProject- MySQL Membership Role Sitemap Personalization,

Sample & tutorials

  1. Custom Site Map Providers in ASP.NET 2.0
  2. Understanding and Extending the Site Navigation System in ASP.NET 2.0

Who did they utilize it ?

  1. A tutorial on how to use the Provider Templates to create your own provider http://www.codeproject.com/KB/aspnet/HTMLEditor.aspx.
  2. Localizing your web application Extending the ASP.NET 2.0 Resource-Provider Model

posted @ 5/3/2008 7:33 AM by Vu Nguyen

ORM - Should we move to ORM instead of keep up with conventional DAL ?

 

Advantages & Disadvantages

Conventional DAL

ORM

Disadvantages of the Conventional Model

  1. The stored procedures or SQL commands need to be written well in advance.
  2. Does not support multiple databases – The stored procedures written are only for the SQL server.  The same has to be done for other databases as well.
    Writing SQL queries is a laborious task as well as error prone.
  3. Most developers do not like writing SQL queries as they do not want to get out of Object oriented world.
  4. Queries involving even the smallest business logic need to be changed in case of change in the business rules.
Advantages

  1. Automatic generation of SQL statements – The ORM layer generates automatically SQL statements.  This helps the programmers concentrate more on the actual business logic removing the overhead of the SQL statements.
  2. Support of the Multiple Databases – Majority of the ORM packages available in the market support ANSI SQL standards.  Hence, they can be used with most of the RDBMS.  This can very useful in product development.
  3. ORM emphasizes on fully following the object oriented approach.  Every thing is an object. Database CRUD operations are typically called as a function.  We will have functions on the business objects like Save, Update and Delete.

 

Disadvantages

  1. Lack of standards – We have variety of ORM packages available in the market.  We do not have common standard or conventions followed.  Lack of such standard has made the programmers job tough.  An ORM package may be completely different from another one.
  2. Performance related issues - Most of ORM related packages use reflection.  As we know, using   Reflection excessively is a performance overhead.  (But there are some ORM packages which do not use the same.)

Comparison

Let us compare the ORM with Conventional model to have a better understanding of the ORM.

Conventional Model

ORM Model

Programmer needs to write all the SQL queries for each and every interaction with the database.

Programmer needs not write even a single SQL query for any interaction with the database.

It is tough to handle the changes to the SQL queries in case of any change requests.  This is in comparison with ORM.

The change requests to any database related activities can be done in a very easy way.  As these are classes and methods we can keep the track of the changes with version control systems pretty accurately.

We generally have a separate team for handling DDL (Data Definition Language) and DML (Data Manipulation Language) issues.

We may have a team for the same here, but their work will be limited to only DDL. As we do not have DML in form of queries, programmers are responsible for the DML related tasks.  Hence, programmer has a better control on the same.

Support for Transactions is available.

It is a common notion that Transactions are not available in ORM. But Support for the Transactions are very much available.

Chance of Errors due to the SQL queries. This is more as the complexity of the SQL queries.

Chance of Errors is less as we have our code written in classes and methods.

We have some Interfaces to the database to see the execution of the SQL statements like Query Analyzer.  This helps the programmer for testing the database.

In most of the ORM packages we do not have such a kind of facility.  Some of the ORM packages have their own language called as OQL – Object query Language.

.NET based ORMs

(from Yves Reynhout's blog)

.NET Persistence
BBADataObjects
DataObjects.NET
Data Tier Modeler for .NET
DotNorm
Eldorado.NET
Enterprise Core Objects (ECO™)
Entity Broker
eXpress Persistent Objects for .NET
Versant Open Access
JC Persistent Framework
LLBLGen Pro
ModelWorks
Nhibernate
Nolics.NET
Norm
Norpheme
ObjectBroker
ObjectSpaces
ObjectSpark
Objectz.NET
OJB.NET
OPF.Net (Object Persistent Framework)
ORM.NET
Pragmatier Data Tier Builder
RapTier
Sisyphus Persistence Framework
TierDeveloper
ORM [Private workspace @ http://www.gotdotnet.com/Community/Workspaces]
Persistence Library [Private workspace @ http://www.gotdotnet.com/Community/Workspaces]

UPDATE:

Bob.NET
ObjectPersistor.NET
Genome

Other interesting links I've found while researching O/R Mapping tools:

Unified DataAccess Framework
Provider Factory
Generic ADO.NET
Abstract ADO.NET
Neo

posted @ 4/28/2008 11:15 AM by Vu Nguyen

ASP.NET: An easily to use Web.sitemap editor

I have found a usable ASP.NET 2.0 sitemap editor from David Sussman with full source code, its offer basics feature which help you to boost up your site navigating building process, get it at http://www.ipona.com/samples/WebMenuEditor/Default.aspx

The WebMenuEditor is a Windows Forms 2.0 Application that provides a user interface for editing ASP.NET 2.0 Site Map files. The editor is pretty simple and supports loading and saving of SiteMap files, including custom attributes. A template site can be created from the SiteMap nodes, using VB or C#, code-inline or code-behind and standard pages or master/content pages.

Note that this is a work in progress and is a version 0.1 tool. It has been released now to allow people to use it before I get dragged into other project and have no further time to develop it. There are plenty of things that need doing to it, but it works well enough in its basic form. There's a small 'to do' list in the project

posted @ 4/15/2008 4:51 AM by Vu Nguyen

ASP.NET - URL Rewriting breaks your website Themes

I got problems with ASP.NET 2.0 Themes and Url Rewriting today. I came across the fact that Url Rewriting breaks your ASP.NET 2.0 Themes by changing the base file path looked at by the client and screwing up the relative URL to your stylesheets.

When you are using themes, the ASP.NET engine will automatically create <link href="App_Themes/themename/css/yourcss.css" type="text/css" rel="stylesheet" /> tags for each css file placed in (or under) the active theme directory.

If you at the same time are using url rewriting you will probably end up with no css being found - cause the link href'' statement uses a relative path. So a request to

/www.store.com/category_12/article12.aspx

which you rewrite to

/www.store.com/article.aspx?artid=12&cat=12

will of course try to find the css at

/www.store.com/category_12/themes/css/....

instead of

/www.store.com/themes/css/....

 

The simple solution is to use the rebaseClientPath flag in RewritePath: Turns out this problem with Url Rewriting and ASP.NET 2.0 Themes was reported to Microsoft and they created a new boolean parameter for HttpContext.RewritePath, called rebaseClientPath, that allows you to specify whether or not you want the virtual path reset when doing Url Rewriting.

public void RewritePath (string path, bool rebaseClientPath)

By default, rebaseClientPath is set to true, which is why the links to the stylesheets are broken.  If you are doing Url Rewriting with ASP.NET 2.0 Themes and having problems with your stylesheets, change your code to set rebaseClientPath to false and it may fix your problem.

posted @ 4/13/2008 12:14 AM by Vu Nguyen

Visual Studio: Missing Generate Local Resource menu item in Visual Studio 2005

Some of you have pointed out to me that when doing localization for your ASP.NET 2.0 web application, you could not locate the Generate Local Resource menu item under the Tools menu in Visual Studio 2005.

While I do not know the exact cause of the missing menu item (probably it went missing after you install some third-party tools in Visual Studio 2005). However, you can get it back easily. Here are the steps:

Go to Tools->Customize.

Select the Tools catagory and click on the “Rearrange Commands…” button.

In the Menu Bar list, select Tools and click Add… to add the Generate Local Resource menu item.

That should add the Generate Local Resource menu item back into the Tools menu.

posted @ 4/11/2008 12:04 AM by Vu Nguyen

Web Design: CSS printing friendly version for your page(s)

I found this great article in implement printing friendly version at http://www.alistapart.com/articles/printtopreview

 

Remember in the old days when you had to effectively run two sites or create separate templates in a CMS for “printer friendly pages”? No one liked that. Then print stylesheets came along and everything became wonderful and easy. Except that the people who use our sites didn’t think so; in fact, most got a tad confused because suddenly the “print this page” button and the subsequent full screen preview disappeared on all but the largest of sites.

What’s happening now?

Many sites have done away with the “print this page” button entirely. Most web designers expect site users to know how to print from the browser, and if they do offer a “print this page” button, clicking the button simply prints without a preview. There is, of course, a “preview” button in the print dialogue box but most people miss it, have forgotten about it, or don’t even know about it.

As Cameron Adams noted back in 2004, visitors aren’t familiar with print CSS and don’t see a print preview; they expect that when they print a web page, the design on screen will match the printed page—or at least be very similar. Readers of A List Apart know that the changes from screen stylesheets to print stylesheets can be dramatic. This is often by design, as we want to improve people’s paper-based experience by removing “unnecessary” elements such as navigation and advertising. However, these dramatic changes can make people uncertain how the printed page they have in their hands relates to the website they just visited.

Oh great—expectations

So how do we set the right expection about our print version? Why, we switch stylesheets of course! We can create an alternate stylesheet to show how the page will look when it’s printed, perhaps display a preview message explaining what this new view is about, and then automatically print the page with the print stylesheet we know, love, and trust.

posted @ 3/30/2008 10:47 AM by Vu Nguyen

Windows - Auto logoff immediately after log on

If one day, you are unable to logged in to your Windows because it's just keep auto logoff right after you have logged in with your password successfully. And you have make it back to normal even

  1. Scan whole your computer by anti-virus tools
  2. Repair your Windows with the CD
  3. Anything you can...

I have deal with this problem on my co-worker computer, and found this http://support.microsoft.com/default.aspx?scid=kb;en-us;892893, but still have problems that I will not know which file is declared in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon until I can read your my registry, but how ? Will booting to Recovery Console with the Windows CD will help ?

Finally, I take the HDD out the PC, plug into working one and using this amazing tool MiTec Windows Registry File Viewer to read get thing done, it able to read your offline registry file, in this case you should open system in %SYSTEMROOT%/Windows/System32/Config, then you can follow instructions in http://support.microsoft.com/default.aspx?scid=kb;en-us;892893

Hope it help

posted @ 3/28/2008 2:57 PM by Vu Nguyen

Latest Images

From Photos
From Photos
From Photos
From Photos
From Photos
From Photos
From Photos
From Photos
From Photos
From Photos