.net

How to store the keys generated by DSACryptoServiceProvider?

As explained in the MSDN, it is possible to generate new public/private keys by calling the method DSACryptoServiceProvider.ExportParameters. The result of this method is of type DSAParameters. What is the de facto standard on dealing with these keys? Should I generate new keys for each transaction or should I generate keys once, store ...

Arguments for using .NET instead of Java in a university environment

My university is (to my dismay) fully entrenched in the Linux side of software development, with Java typically being the language of choice for most instructors. One of my classes this semester required the book Pro C# 2010 and the .NET 4 Platform. I was so excited to finally have a class based around C#. First day of class the instr...

How do I use a C++ library from C# and .NET?

My question is closely related to how a DLL exports C++ classes and generic methods (wrt C++ language features without a C# parallel). I believe you can call functions inside an extern "C" block from C# by just referencing the DLL and using DLLImport. But can you instantiate a templated C++ type? What if the C++ type does somethin' c...

When install an app on a windows mobile device, install prerequisites

Is it possible when installing an app on a windows mobile device to automatically install the compact framework, the sql ce compact, etc ? Or those can only be installed manually? ...

How to use distinct with group by in Linq to SQL

I'm trying to convert the following sql to Linq 2 SQL: select groupId, count(distinct(userId)) from processroundissueinstance group by groupId Here is my code: var q = from i in ProcessRoundIssueInstance group i by i.GroupID into g select new { Key = g.Key, Count = g.Select(x => x.UserID).Distinct().Count...

What are the technical difference between .Net desktop application and web applications?

I have just started learning C#. Can anyone explain the technical differences between a .Net desktop application and a web application?. I mean for example, if I have a simple HelloWorld application using a WinForm, what are the steps required to change that into a HelloWorld web application? ...

.NET authorizing Windows Authentication

hi, I have this page http://www.mareez.com.sa/Camera1.htm. It asks for the windows username & password. I want to hide this username & password, and I want to pass it to the camera server in my code (i.e. not visible to the website visitor). ...

DependencyProperty keeps it's value after destruction

Scenario: A VB6 library calls a method in a .NET-Assembly through COM and with that opens a WPF-Dialog, which is contained in another .NET-Assembly that is early bound. This WPF-Dialog got a complex master/detail implementation over a DependencyProperty of type ObservableCollection on this dialog. The DependencyProperty looks something l...

UserPrincipal.FindByIdentity Permissions

I'm attempting to use the .NET System.DirectoryServices.AccountManagement library to obtain the UserPrincipal for a particular Active Directory user. I've got the following code: PrincipalContext context = new PrincipalContext(ContextType.Domain, "DomainName"); userPrincipal = UserPrincipal.FindByIdentity(context, IdentityType.SamAccou...

C# Libraries for CouchDB?

I haven't seen the question asked/answered for over a year, and I'm sure there have a been a lot of changes in that time. If you are using CouchDB in a .Net/C# environment (in production), I'd like to know which library you use, and what your experiences with it have been. I have found that there are at least four libraries out there: ...

Get URL from browser to C# application

How can I get the url from a running instance of Chrome or Opera using C# .NET windows form app? Thanks! ...

Does Sandcastle support code contracts?

My library uses code contracts. Is there a way to incorporate these contracts in the documentation generated by sandcastle? ...

Event not firing through AppDomain

I am having a lot of trouble with AppDomains. I currently have an AppDomain containing camera controls, and am trying to have events raised from this secondary AppDomain (like a picture being taken) come back to the main program. Everything seems to be set up correctly (events are registered, functions will run across domain boundry) but...

Force File Download prompt in IE for .NET executable?

We have a .NET executable that we are hosting on a web server. The domain for the web server is set as a "Trusted Site" on the user's IE. When the user left clicks the link for the executable, it blows up with the error: "Microsoft IE Execute shell has encountered a problem and needs to close". From what I have read, it is because IE ...

.NET Framework 4.0 Client Profile vs .NET Framework 4.0

When I started new .NET Console Application in VS2010, By default Target Framework was set to .NET Framework 4.0 Client Profile, what is the difference between .NET Framework 4.0 and .NET Framework 4.0 Client Profile ...

In TFS 2010 is there any equivalent to reporter (or a way to change the "Created By" field)

When adding a work item to TFS 2010 via the SDK, the incidents are created using the same identity that was used to authenticate to the TFS server. In other applications providing defect tracker/work item support the API normally allows you to set a Reporter/ReportedBy/CreatedBy field, so you can make it appear as if the user your servi...

How do I create Windows with WPF that look like notification area windows in Windows 7?

Is there a way to create windows like the native Windows 7 notification area Windows with Windows Presentation Foundation? For example the audio controls or the power plan settings. I was able to create a Window with Windows Forms that was looking equal, but still had the resize cursor when you hovered the borders. I’m using the followi...

Is there a .NET attribute for specifying the "display name" of a property?

Is there a property that allows you to specify a user friendly name for a property in a class? For example, say I have the following class: public class Position { public string EmployeeName { get; set; } public ContactInfo EmployeeContactInfo { get; set; } } I'd like to specify that the display name for the EmployeeName pr...

simplest key value store for xml data with best performance for .NET

I need a way to store large-numbers of variously sized XML data in a simple key/value store. So far I have tried two simple approaches: RAM: Store everything in a ConcurrentDictionary instance Problem: limited resources at project launch, a single server with 8GBs of RAM! Note: Windows AppFabric could be a solution here in the future...

Can you open a JPEG, add text, and resave as a JPEG in .NET?

I want to write a small program in .NET 4.0 that will open a .jpg (or .jpeg) file, add a line of text to the image, and then resave the image as a .jpg. Does anyone know the easiest way to do this? Thanks for any help. ...