How do i secure my DLL from being spoofed

Hi,
i have this model.
a wndows application made up of GUI and 3 DLLS
DLL perform the presentation layer duties. DLL2 is the business layer and DLL3 is th DATA acess layer...

Now DLL3, is encrypted, obfuscared etc... it has a unique serivce acount (single user account and password) to access the database. The acount info are embded within the DLL.
What is wrong with this model?
What can i do to improve it or to prevent someing from spoofing the DLL3 ( data access layer)
By extention how to make sure communication with the server is not tapped into to intercept the acount info? maybe using forced encrypting on the client side?
Please help...
Thanks

[690 byte] By [msdnjw] at [2008-1-19]
# 1
You could make use of "Thread.CurrentPrincipal.Identity.Name" property to ensure that only the authenticated user is actually making the call. In this case, your DLL can be spoofed only if someone knows the username/password of this account and can impersonate it. So its secure as long as the password of this account is maintained secret.

Regards,
Vikram

Vikram at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Framework Networking and Communication...

.NET Development

Site Classified