.net

DAL "Typed DataSets" or Custom Business Object

Hi guys, I would like your opinions regarding "DataSet Designer" and DAL (Data Access Layer) best practices. I use Visual Studio 2010 Framework .NEt 4.0. For my understanding "DataSet Designer" allow me to create automatically strictly Typed-DataSet with DataTable and Adapter, this consist in DAL directly in Visual Studio 2010. I would...

Window ActualTop, ActualLeft

What is the correct way to retrieve a window's position in WPF? Here's some attempts I made. First attempt, the obvious Point GetPosition(Window win) { return new Point(win.Top, win.Left); } but this returns the "wrong" position when the window is maximized. Second attempt: Point GetPosition(Window win) { if (win.WindowState...

how many classes can you inherit from in c#?

I'm wondering how many classes you can inherit from in .net. There are several backend cs files that I would like to share separate static methods, but they are all in different classes. Is there a way to inherit multiple classes? Example code would be much appreciated. ...

disable right click in file explorer telerik

Greetings everyone, i just wanna ask.. how do i disable the right click property in a telerik file explorer... what i want to achieve particularly is to restrict the user from deleting a file or folder.. i managed to hide the delete in toolbar but not in the right click.. kindly help me out... thanks... Below is the code i did for hidin...

How do I send signed emails from C# application?

I need to send signed emails from within my C# .NET application. Which is the easiest way to do this? ...

Finding Windows User in .net

I am using Environment.UserName to get the UserName in .net , but Iam getting Machine name instead of UserName. Also I tried using System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString(); and even this returning Machine name instead of UserName. Any idea? ...

Problem persisting read/write collection at design-time in .Net Winforms.

I have a requirement to persist a collection at design-time: Public Class MyButton Inherits Button Private _MyCol As MyCol <Editor(GetType(MyColEditor), GetType(UITypeEditor))> _ Public Property MyCol() As MyCol Get Return _MyCol End Get Set(ByVal value As MyCol) _MyCol = ...

Desktop Application auto-complete

Hi I am working on a .net project, (first ever for me) and I would like to do something like the AJAX.AutoCompleteExtender that I used with my WEB projects. What should I use? is there something ready to use, Or I should go and make my own using the textbox, or combo box or something like that. The app I am working on, is a .net appli...

Why does intellisense work with Using directive but not when specifing types withing the namespace?

I can add the statement using System.Configuration; to my code using intellisense, but I can't get any intellisense when I access the type ConfigurationManager. Why does intellisense work when entering the using directive, but doesn't work when specifying a type from that namespace? using System.Configuration; namespace TestDBMSConnec...

learning CSLA.NET framework

What will be a good start point for learning CSLA framework. ...

String.Split VS. Regex.Split?

If I have a delimited text file with a basic delimiter (say "|" for instance) does it make a difference whether I use a String or a Regex split? Would I see any performance gains with one versus the other? I am assuming you would want to use Regex.Split if you have "escaped" delimiters that you don't want to split on ("\|" for exampl...

WCF SSL configuration error perhaps

hey there Trying to get HelloWorld working via SSL. Read all those docs: http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509findtype.aspx http://msdn.microsoft.com/en-us/library/ff648431.aspx http://msdn.microsoft.com/en-us/library/ms733791.aspx http://msdn.microsoft.com/en-us/library/ms733813.aspx...

UnmanagedCode permission. What is it?

The following code exists in LogEntry.cs in the Enterprise Library's Logging Application Block: private bool UnmanagedCodePermissionAvailable { get { if (!unmanagedCodePermissionAvailableInitialized) { // check whether the unmanaged code permission is available to avoid three potential stack walks bool internalUn...

Session variable returning null ...after couple of postbacks..though user session is valid...

I have logged in to the application (In development Environment) with my userid and pswd... I am using Session variables in the application..in order to access some values across different pages. Though my session didnt time out, my session variables are becoming null after a while...Can some one please help me with this.. Thanks, ...

Parsing a strangely formatted DateTime. Anyone fancy stepping up?

Hi folks, I'm trying to parse a datestamp (that I got from Twitter) but am receiving errors. here's the datestamp: Fri, 27 Aug 2010 22:00:07 +0000 Here's my code: DateTime.ParseExact(MyDateValue, "ddd, dd MMM YYYY HH:mm:ss +ffff", new CultureInfo("en-US")) and here's my error: System.FormatException was unhandled Mes...

static methods/fields and WCF

Hi all, can use static methods/ classes safely in WCF due to the fact that WCF creates a new thread for each user, so if i'll have a static variable public static int = 5 and if two clients will try to change it simultaneously, will one of them will be able to change it for the other? thanks... ...

500.19 error in IIS7 and Windows 2008 with .NET 4.0

Hi, We developed a .NET application to provide REST services. We are trying to deploy it in IIS with the below server configuration: IIS 7.0 SQL Server Express Edition 2008 Windows 2008 Server .NET 4.0 We are getting the error as attached in the picture. Please help This is driving us crazy. THE ERROR MESSAGE IS HTTP Error 500....

Implementation recommendations (tutorial) for implementing a linq interface

Developing a .net library based on an industry standard. The standard includes data structures and an api for interacting with a server. I am considering adding a Linq friendly implementation, and to try to either implment or emulate Linq to Entities. The obvious difference is the API is used for CRUD operations, instead of a database ...

Global variables in WCF REST services

Hi, My applciation works as follows [user]----username/password/domain----->[WCF service] then i access the domain server to see to which actual DB the user is associated, after getting that, i validate the user in his actual DB(DB is per domain) the problem is that i need a place to store the domain name for the following requests...

Call CLR code from JVM

Is it possible to call CLR methods from JVM? Any library that would host a CLR instance inside JVM, and provide a simple mapping for Java? Are there any libraries that would do that? I'd like to write a plugin for existing Java application which already runs on JVM. I'd like to avoid having two binaries. I only want to call few methods...