.net

Implications of full backup of running SQL Server database every 4th minute

I have a customer that has set up a full backup of the database to an network path every 4:th minute on a heavy used database. I strongly recommend the customer to not to do that and instead do a transactional backup. But what is the possibly bad things that can happened when doing a full backup in this way? Other than that the backup ...

How can I customize my WCF service to use DataContractSurrogate only in one EndPoint?

Hi, In my wcf service, I am interested in using DataContractSurrogate while exposing the ServiceContract in a particural EndPoint(e.g. WebHttpBinding). How can I do it ? Implementing IEndpointBehavior? In addition to that,do I need to implement IWsdlExportExtension? Thanks, Adil ...

HTTPWebRequest Remote Certificate Name Mistmatch

I'm trying to make an SSL call using HTTPWebRequest and its continually failing saying it can't establish trust. I've added a callback to ServicePointManager.ServerCertificateValidationCallback and returning true always works. However, I'd like things to be a little more secure than that. Looking at the SslPolicyErrors in the validati...

How do I save a Silverlight 2.0 canvas to a database and export it to PDF

I have a Silverlight 2.0 project that allows a user to add text and images to a canvas. They can move, rotate and resize the text/images. I was wondering the best way to serialize the Silverlight objects to a database and also be able to generate a PDF of the canvas to be printed. I've read some articles about calling a web-service ...

Download files using asp.net

Hello all, There is a data file and some image files that I have to download to our local servers every night using asp.net. What is the best way to do this? UPDATE Ok, after viewing the responses I see my initial post of using asp.net is a poor choice. How would you write it for a console app in C#. I am not sure what classes I am us...

PickupDirectoryFromIis, Sender property and SMTP MAIL FROM envelope

Hi, When you send an email using System.Net.Mail you can set the SMTP MAIL FROM envelope by using the MailMessage.Sender Property. If you set the smtp network deliveryMethod property to be "Network", the MAIL FROM envelope is set using the Sender value. If you set the smtp network deliveryMethod property to be "PickupDirectoryFromIis", ...

Is it possible to view all services/types registered to StructureMap?

Hello, I am just trying out structuremap and would like to be able to see which of my classes are registered for which service. For example with castle windsor I can bring up the debugger and view container.Kernel.GraphNodes to see a list of all currently registered service/type pairings. Is there a similar view into StructureMap inter...

How do I get the subclass Type object in a static superclass function in .net, using reflection?

Ok, so I'm trying to make a nice superclass for data-access objects that can generate a tsql query to search all of the subclass's public string properties. I want to use reflection to get the type of the subclass and then iterate through all of the public string properties on the object, since those property names are the same as the d...

VB.NET Problem with "Control Arrays"

I have a VB.NET application and use some third party (closed source) ActiveX controls. One of the controls represents a "camera" (connected over several interfaces) and I try to write an example how to work with several cameras in one application. To do this I allocate multiple "camera" objects dynamically as an array which works as expe...

Edit composite key value using LINQ

I have a table which uses three columns as a composite key. One of these column values is used as a sequence tracker for ordered related records. When I insert a new record I have to increment the sequence numbers for the related records that come after the new record. I can do this directly in SQL Server Management Studio, but when I ...

Long Running Stored Procedure from ADO.NET or Classic ADO

Assume the Stored Proc takes 10 minutes to run and returns no data. What is the proper way to call a stored procedure in SQL Server and have your code not wait around for the result? Is there a way to handle it from the T-SQL or the connection? Something that works in ADO.NET and classic ActiveX ADO? The only way I thought of is: 1) Cr...

HttpModules and DOS attacks?

In the comments for this question, someone stated that use of HttpModules opens yourself up to DOS attacks. I would like to understand the reasoning behind this statement. I've found a couple articles that make use of HttpModules to handle/prevent DOS attacks. ...

How do I list all loaded assemblies?

In .Net, I would like to enumerate all loaded assemblies over all AppDomains. Doing it for my program's AppDomain is easy enough AppDomain.CurrentDomain.GetAssemblies(). Do I need to somehow access every AppDomain? Or is there already a tool that does this? ...

Good .Net Remoting Tutorial/Guide

Does anyone have any links to a good, concise, Tutorial or guide to .Net remoting? Would be grateful! Thanks (sorry for the short post!) Edit: I am now aware of: http://www.codeproject.com/KB/XML/remotingsimpleeng.aspx ...

What is Unity InjectionConstructor Attribute ?

What is Unity InjectionConstructor Attribute and how it works ? ...

unicode implementation: many fonts, or one large font?

Hi all, I'm internationalizing an application into many different languages, and the following languages must be supported: English Spanish German French Russian Mandarin Chinese Thai We're also probably going to add support for: Hindi Portuguese Any other language people at work speak and can translate easily Should I install d...

Reading and editing HTML in .Net

Is there a .Net class for reading and manipulating html other than System.Windows.Forms.HtmlDocument. If not, are there any open source libraries for this. ...

Passing a Windows Service Parameters for it to act on

I want to turn a program I have into a service so I can use it without logging it. Basically what it does is it backs up specified folders to a specified location using SSH. However the problem I'm running into is I don't know how to tell it these items. I only know how to start, stop, and run a custom command with only an integer with a...

How do I implement .net plugins without using AppDomains?

Problem statement: Implement a plug-in system that allows the associated assemblies to be overwritten (avoid file locking). In .Net, specific assemblies may not be unloaded, only entire AppDomains may be unloaded. I'm posting this because when I was trying to solve the problem, every solution made reference to using multiple AppDomains....

Should we use FxCop on UnitTest assemblies?

We use FxCop for all of our projects. For our UnitTests I am not sure it is worth it. We end up with many suppresses: [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = SuppressJustifications.CA1822MethodIsUsedExternallyAsNonStatic)] [SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResu...