I added plain text version to system generated emails, because email without text version is considered as spam. Here is my code:
MailMessage mm = new MailMessage(
new MailAddress(from, msg.FromName), new MailAddress(msg.ToEmail, msg.ToName));
mm.Subject = msg.Subject;
mm.Body = msg.Body;
mm.IsBodyHtml = 1;
mm.Priority = MailPriority.N...
Hi,
this is more of a design question:
lets say that I have some internal type definitions that I absolutely want to keep secret (not exposed to my service consumers. However, i do need to exchange data with the service users. some of the types I want to share with the users are exactly the same as the internal ones while others are ...
Here's the issue... if I use, say a directory catalog in MEF and have some.dll and copy of some.dll, i will get double the exports, even though they are defining the same type, is there a way to resolve this?
EDIT: the problem isn't with this particular issue, this is just an abstract example of a real issue, for instance, if i have an ...
Quite often in my GUI code, I write something like this:
private void SecondTimer_Elapsed(object sender, ElapsedEventArgs e)
{
if (progressBar1.InvokeRequired)
{
progressBar1.BeginInvoke(new ElapsedEventHandler(SecondTimer_Elapsed), new[] {sender, e});
return;
}
//Code goes here
}
Of course, this is necessary i...
I have been looking into c# for a while. and covered all the basics.
What should i look into next?
Linq to Objects/SQL ? Entity Framework ? WCF?
What are your recommendations and resources (books?) ?
i work on middle tier and systems development, neither web applications or desktop, i just use plain good old c# with nosql db
Thanks....
My .net app uses an MDB file as a database (JET 4.0).
From this app I need to make a BACKUP of the current database.
The backup is performed making a ZIP file with the Access file.
My function is throwing an error because the Access file is in use (by my own app).
I tried to close the connection just before compressing the file but that...
I see a lot of people asking a similar question, but not this exact one. I'm trying to do what I would hope would be relatively simple with POCO proxies.
using (var context = new MyObjectContext())
{
context.ContextOptions.ProxyCreationEnabled = true;
// this does indeed create an instance of a proxy for me...
// ...
For the apps I'm writing in Visual C#?
...
7 Questions:
1 Can I sell the software I make in it?
2 What kind of licenses am I allowed to use?
3 Any templates for Terms of Use & Conditions?
4 Can I just distribute the exe in the /Release folder?
5 What if I use class libraries?
6 How do I stop people from installing it after the trial period is up?
7 How do I make a custom install...
I have previously been using Chilkat Zip .Net to generate backup files from my application, but after having issues with the Component, moved to Xceed Zip .Net for the same function.
If you take one of the Zips generated with the Chilkat and attempt to extract using Xceed, 7Zip, WinZip then it fails.
If you take the same file and extra...
in the constructor of PaperSize, what unit are the numbers in?
var ps = new PaperSize( "Custom Size", XX , YY );
I'm using PrintDocument to do some print out and need to create a page size (w x h) of 9.79cm by 14.75cm.
I'm using e.Graphics.PageUnit = GraphicsUnit.Millimeter; I want to crate a font of 24 points,
Font titleFont = new...
I have some concerns about using the "Add Service Reference" dialog in Visual Studio 2010.
When I look at the files it generates, they contain references to 4.0.0.0. However my project is targeted to .NET 3.5. Is this going to be a problem? Or is it just the generation tools using .NET 4.0?
Examples:
configuration.svcinfo
<?xml versi...
I'm trying to set up an assembly binding redirect, using the following app.config:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.AnalysisServices"
PublicKeyToken="89845dcd8080cc91" />
<bindin...
I have the necessity for a client application to "lock" (aka "check-out" certain business entities store in the database.
The workflow is such that:
The user navigates to a page for some business object.
The user hits "edit".
This locks the item from being edited by anyone else.
Other users on other workstations will see a little "loc...
Hi all,
I'm trying to understand how to use SourceLocationProvider.CollectMappingmethod in C# .NET 4.0.
The documentation in http://msdn.microsoft.com/en-us/library/dd987879.aspx mentions that the parameters are
rootActivity1, Type: System.Activities.Activity, description: A workflow element that represents an activity that is not ma...
I have an IObservable that produces values at random intervals and I want to throttle this sequence. One thing I have found out is that the Throttle operator's definition of "throttling" is not the same as mine.
Throttle only produces values after the specified interval elapses with silence (it produces the last value seen). I thought t...
Hi all,
I have a generic function and I want to check whether the type parameter is an interface. Is there anyway to do that? Thanks in advance!
...
I need to compare few function calls and signature between my application and an working application. Here I don't mean any way to reverse engineer or access the source code of the other application , but truly need to know what are the methods , Interfaces used by the working application.
I tried attaching my application to Visual Stud...
Hi
I'm having problems building the nAntContrib library using the instructions provided. When running the build I get the following feedback
C:\Code\trunk\tools\nAnt-Contrib>..\nant\nant-0.90\bin\nant.exe -D:nant.dir=C:\c
ode\trunk\tools\nAnt\nant-0.90 -f:NantContrib.build
NAnt 0.90 (Build 0.90.3780.0; release; 5/8/2010)
Copyright (C) ...
Hi all
I want to upload report files via c# application to the report manager.(mean Like simple Upload, select a report file and then upload selected file into report manager).
I use this sample and when i upload file an exception occurred the remote server returned an error: (401) unauthorized
** my code **
WebClient webclient = new ...