.net

What should we have in a Business Logic Layer (BLL).

I know this is a very basic question. But I am really not able to comprehend what should we have in BLL. Let me take an example. Let us consider a Login.aspx web page, which is used to facilitate user login. In this case Login.aspx will have two textboxes and one login button.(Presentation Layer). Data Acess Layer will have functions to...

how to invoke user's (non-outlook) email application from .NET program

My C# application needs to email problem reports from the user's machine to a support tech. There is no common SMTP server available, so I don't think I can use System.Net.Mail; instead the message must be sent using the user's own email program and account. I could use office automation to launch outlook and compose a message. But w...

zip and unzip string with Deflate

Hi I need to zip and unzip string Here is code: public static byte[] ZipStr(String str) { using (MemoryStream output = new MemoryStream()) using (DeflateStream gzip = new DeflateStream(output, CompressionMode.Compress)) using (StreamWriter writer = new StreamWriter(gzip)) { writer.Write(str); ...

Using iTextSharp to save to file the fonts used in a PDF file

This is pretty much a duplicate of this unanswered question, but hopefully someone in the know is watching now and can be helpful. I'm looking for the ability have some .NET code extract the font embedded in a PDF to a font file. I'm currently using iTextSharp, but I'm open to other .NET libraries (e.g. PDFBox, PDF CLown, etc...). I'm ...

C# Invoke Action Cross Thread Access

greetings, im new to programming. at the moment my application uses delegates to process/execute methods that reside in a another class/object. but i was getting an error stating that they were residing in separte threads. so after searching the web i came up with this: this.Invoke(new Action(delegate() { this.ChatRichTextBox.AppendT...

.NET API for determining VM fragmentation

Is there a .NET API for getting detailed info on VM use? I'm specifically interested in determining how fragmented my address space is. Thanks! ...

Nested ConfigurationElementCollection

I have a following configSection in App.Config. http://codepaste.net/vrhrht This has been mapped to following Classes in c# http://codepaste.net/nzdfdy I am getting the following error Unhandled Exception: System.Configuration.ConfigurationErrorsException: Unrecogn ized element 'services'. Can anybody let me know what is wrong her...

Configuration System Designer tool for Visual Studio 2005

Is there Configuration Section Designer like http://csd.codeplex.com/ for Visual Studio 2005? ...

Why does the .net world not have application servers like the Java world ?

I know about IIS being the web/application server. Why not have full fledge enterprise application servers like Web Logic / Tomcat / JBoss that are so scalable like they have in Java world. EDIT1: I am not a Java developer myself. I called those servers only because "scalable and configurable and optimized" are the buzz words associated...

BinaryFormatter deserialize gives SerializationException

I'm getting an: System.Runtime.Serialization.SerializationException: Unable to find assembly 'myNameSpace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null When trying to deserialize some data in another program than the program I serialized it with. After some googling I've found out that apparently this can only be done using ...

switch DLL based on environment - .net

I want to release a DLL that contains some classes for other developers to use. Behind these classes are another DLL that contatain referenced functionality. In the development environment I want this backend DLL to have development oriented functions, but when the code is migrated to the production environment, I want that backend DLL...

Effect of unused methods and properties on library or executable

I'm playing around with creating a source code generator for C# (.NET). Will generating properties or methods that never get called cause my code to run slower? How about inserting "using" statements for libraries that don't get used? I'm assuming the compiler is smart enough not to build in the unused "using" statements, but there is n...

.net special button design control

Hi, I have the following programming task (Visual Studio .net - no web application) where I wonder if there is maybe some sort of custom control (Third Party?), which could be useful: There is a rectangular layout and it should be possible to create and move around rectangular buttons. The user should be able to create button and adjus...

Determine screen color depth/monochrome in .NET compact framework 2.0?

I'm using the .NET CF 2.0 on multiple devices which have different display capabilities (specifically color/monochrome) that I'd like to determine at run-time but can't find any methods that provide access to this information. ...

List<> Better to init with a maximum capacity and only use a fraction of that, or init with no capacity.

I have a List<MyStruct> that I'm initializing to be empty, and I will be populating this struct in a loop as I parse the data. I know that there is a maximum possible number of entries that will be inserted into this list. For now lets say 1000. However after my parsing of the 1000 entries I may end up only putting 2 into the List. So sh...

Header printing on every page.

I have a gridview that i want to print its header on every page and i want to print a page header on every page. The problem is that one or the other works for me. I can't get both to work at the same time. Below is sample code to show what i've done. <table> <tr> <td> <body onload="thead('tblheader');"> <table id="tblheader">...

WebClient throws exception on second download atttempt

I'm trying to write a random wallpaper downloader for my desktop. The code works fine on the first download, but hangs and throws an exception on the second attempt. I tried to dipose of the client and start with a fresh Web Client. I also tried without disposing. Thanks in advance. public class ChangeWallpaper { [DllImport("user32....

PowerShell manifest referencing external assembly

Is it possible to register a new PowerShell module just by defining a new module manifest and putting it in the specified directory? E.g. a a new module named SampleModule should be created. I put the empty manifest file SampleModule.psd1 in the directory <%PSModulePath%>\SampleModule. (It doesn't matter which (user or global) module pa...

Tool for creating .NET wrappers for a COM DLL?

Is there any open source tool for automatically generating .NET wrappers for a COM DLL library? Thank you. ...

Send SMS/MMS, especially MMS using .Net w C#

Does anyone know how to send an MMS message with the .net framework? Theres sample code for SMS but not MMS. I have a GPRS modem already installed on my server. ...