I am trying to deploy a .NET COM interop dll for a web application. During development, for the assembly that needs to register for COM interop, I have the "Register for COM interop" option checked under build properties. In this method, everything works just fine.
However, when I deploy the ASP.NET application and try to register the a...
Hi all, I'm new with the MVC framework and I was wondering what you think is the ideal way to retrieve data and list it on a page. Specifically, I'm referring to data used in report type pages, not lists of movies, books, or other clear 'objects'.
Most online samples seem to suggest using ADO.net Entity Data Models & LINQ which are auto...
Please describe the .NET assembly compilation circular dependency problem in layman's terms, and whether other technologes have similar limitations.
Note: This seems like a simple question, I know, but I have seen a number of real, significant projects that have totally broken dependency graphs.
...
Hi,
I'm automating my MSBuild-based C# solution build using Hudson running on a Windows machine. My product depends on a number of third-party DLLs that need to be registered in some form or fashion for the build to work. Are there any best practices for performing that sort of registration via MSBuild or Hudson?
The particulars:
Red...
I know that for multi part writes, I should be using transactions in nhibernate. However what about for simple read and writes (1 part) ... I've read that it's good practice to always use transactions. Is this required?
Should I do the following for a simple read ?? or can I just drop the transcaction part all togather ?
public P...
I am trying to send a string over a named pipe using StreamWriter, but StreamWriter class only offers synchronous operations. I can use BeginWrite method of the NamedPipeServerStream class, but I wonder why there are no writer classes that would allow asynchronous operations. Am I missing something obvious?
...
I'm using LINQ and a DataContext to return a collection of objects from a SQL Server table. The table is named "Widgets" and the corresponding C# class I'm using is shown below. The Widgets table contains a Name column, and a TypeID column which is a foreign key to another table of widget types.
[Table(Name = "Widgets")]
public Class Wi...
I'm looking to embed web content in my Windows application. Is there a class in the .NET framework for this? If not, are there third party html rendering libraries in C#?
...
Hi,
I need to display xaml code in a panel, how do I write DataTemplates to format the xaml with proper indentation and hyperlinks for references (such as StaticResource etc), for example,
<ListBox ItemsSource="{Binding}" ItemTemplateSelector="{StaticResource ResourceKey=selector}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
...
In this post Sending Email in .NET Through Gmail we have a code to send email through gmail, in the send mail we find from Field contain gmail account that I used
I use the same code but by changing the From Address to any email I want ans set gmail address in Credentials as bellow
var fromAddress = new MailAddress("[email protected]...
I've been browsing the web for over 48 hours reading up on interoperability and playing around with Pinvoke and C++/Cli (very limited the latter). There is an unmanaged c++ api (a namespace containing a lot of exported structs which contain methods, all pure virtual and implemented across several cpp files as classes and what not) and I ...
I'm writing a c# application that requires user authentication.
When the user hits the log in button, quite a bit of stuff is done in the background, but I'm having trouble informing the user that something is happening, and that the program isn't just frozen.
I have some hidden text fields that I would like to have show up after they ...
Hi folks,
What's the best way to monitor exception logging in production environment? I have an application where in exceptions are logged to a text file. Everytime, i need access to these log files, i got to request backoffice team to send me a copy.
To improvise this process, i have thought of few options:
1) Email the error logs on...
I've started using Quartz.Net in a class library project I have. It seems to need require my project to target the full .NET Framework 4, or else I get “type or namespace name could not be found” type errors.
The follow on issue is that in my .NET 4 WPF application (which uses this project class library) I get similar issues and have ...
My application checks on startup if there is a newer version of a file on a shared network drive. If the one on the network share is newer it copies it to the local application directory and overwrites the old one. My current code to do this goes something like this:
FileInfo sourceFile = new FileInfo(source + "\\" + fileName);
if(sourc...
I am using a tcpstream and copied the data into memorystream. Now i would like to convert it to a text (UTF-8 encoded). I tried various ways and did flush() but i could not figured it out. I tried using it in combination with StreamReader with no luck (i get a empty string).
...
We have a single table (25 columns int, text and datetime) with about a million of recrds, and we need to extract them from a SQL Lite database and then render to a wpf xamDataGrid, What is the fastest way of doing it in C#?
PLUS, what would be the most efficient way of doing it?
Options we have thought about:
Getting a DataSet
List ...
We have a VB6 app that has implemented a handler for WM_TCARD messages from an HTML Help file.
It navigates within the application and opens the relevant screens etc.
How does one do this in a WinForms app?
The only way I can immediately see is to handle the window procedure and process the WM_TCARD message in exactly the same way we ...
hi,
Ok so long time ago I thought of using CAB on one of my small apps I realized quickly it was a HUGE overkill. I'm building a new app now, to give you an idea after the first release it will only go upto 15,000 lines MAX.
The problem is its a slightly complicated system for a bank, half of the software is on the server and the it ha...
Hello,
I am working on an application, which will ultimately be distributed to end users.
My IDE is VS 2010. My application does not use any of the features of the 4.0 framework. Should I then target a lower version of the .NET framework like 2.0 which users in general will more likely to have already installed than the 4.0 framework ?
...