.net

How do I extract the thumbnail of a File into an image file in .NET?

I'm trying to create a content catalog program that is used to browse files. I want to show the thumbnail of the files like Explorer does in windows. How can I use C#.Net to extract the thumbnail that windows explorer shows into an instance of System.Drawing.Image? I'm fairly certain I need to use this or something related to IExtractIm...

Regular Expression Named Groups: Good or Bad?

Hi, How do I create groups with names in C# using Regular expressions, and is it good practice? Thanks in advance. ...

wcf deserialize enum as string

I'm trying to consume a RESTful web service using WCF. I have no control over the format of the web service, so I have to make a few workarounds here and there. One major problem I cannot seem to get around, however, is how to make WCF deserialize an enum as a string. This is my code (names changed, obviously): [DataContract] public en...

Behavior of ObservableCollection(IEnumerable) constructor

According to MSDN there is an overload for the ObservableCollection constructor to which you can pass an IEnumerable. According to the very short MSDN page this will make a "Copy" of the Ienumerable. How do I determine how this will behave? Will the "Copy" be totally independent of the original or will changes made to the Ienumerable (S...

New Relic for .Net?

Is there anything like New Relic for .Net apps? ...

View PDF file within ASPX not acrobat

When a user clicks on a link, it opens a new window (since target="_blank") calls an xyz.ASPX page that will dynamically create an PDF invoice, saving it into a Database (not a physical location) and then I need to be able to open the PDF file within the ASPX page. Right now whats happening is that the aspx that generates the PDF file ...

Issue with SMTP relay in .NET

Perhaps this is more of an IIS question than programming, but I'll throw it out there nonetheless. I am attempting to send an email via SMTP with C# using the following test code: //params: from email, to email, subject, body MailMessage m = new MailMessage( <sendemail>, <receiveemail>, "testsubject", "Testbody" ); SmtpClient c = new ...

.NET Remoting thread locking mechanism

Hello all, I'm having a pressing issue and I'm hoping you all can help me out. I will try my best to explain it as well as I can. I am augmenting a system that uses .NET remoting to allow for database calls from a thin client to a server that executes said calls. The server itself has the data access components installed on it, so it...

Class 'CLSID_CorSymWriter' could not be created: Access is denied.

i keep getting this error. not sure what it is. this is what i have done so far. am working on VISTA and have IIS7. i created a new site and have a directory with my aspx files attached to it. then i converted one of the subfolders to an application. But for some reason when i try to turn on that application (right click browse) i get th...

Serializing Data Transfer Objects in .NET

I have a set of data transfer objects (e.g. a lot of reqest, response message classes, like MainRequest, MainResponse, ShutDownRequest, ShutDownResponse) Where new classes keep coming as the project evolves. These classes must be (de)serialized from and to various XML formats with different public XSDs. New XML formats come as the projec...

Looking for C# WAP Client Library like Java JWAP

Is there any .NET WAP client library similiar to jwap - http://jwap.sourceforge.net/ jWAP is a Java implementation of the Wireless Application Protocol (WAP). ...

Split an IObservable and then combine after processing?

After experimenting with IObservables, I've decided to test them for the processing of incoming messages over a message bus. Essentially I get an IObservable<Request> and the Request contains the necessary functions to reply to the response. At a point during processing I have to deserialize the data and convert it from a Request to a C...

Is there a built in function to hash passwords in .NET?

I seen this question http://stackoverflow.com/questions/287517/encrypting-hashing-plain-text-passwords-in-database and i am aware i shouldnt do md5("salt" + password); and i see an implementation in python for a solution. Is there a .NET built in function with params i can use instead of writing my own? ...

What to choose.... web service or WCF in asp.net 3.5

The current project i am working on is extensively using web services and is made in .net 3.5. Now as we are going for implementation of second phase we are confused if we should either use WCF or web service as done previously ? Further is there anything new that can be useful and is coming up with .net 4.0 regarding web services or WCF...

Is it possible to create a custom ASP.NET MVC strongly typed HTML Helper?

Hello, I was wondering if it is possible to create a custom strongly typed HTML Helper in ASP.NET MVC 2? Creating a regular (read not-strongly-typed) helper is straightforward but i am having difficulty creating strongly typed versions. For example, I would like to create a DatePickerFor html helper... Any guidance or snippets would be ...

How can we use validation controls in a master page in asp.net

How can we use validation controls in a master page. The master page has some server controls and some html controls. Now if we place the validations controls on master page would it effect the child page as well. I read about validation controls from http://jai-on-asp.blogspot.com/2009/12/validation-controls-in-aspnet.html and master pa...

Properties and Data Binding in .NET

One of the advantages that i hear about properties is that they can be used for databinding, while i hear no explanation of why beyond "that's how it works". Is it that way because there is no choice (i.e. a limitation of the .NET VM) or was it really designed that way, and if so why? ...

Is the C# language a Microsoft product?

I am proofing my thesis and I am wondering how I should describe the language that I used Microsoft C-Sharp (C#) C-Sharp (C#) C# C# and the Microsoft .NET Framework Combinations of, or something else? ...

SQL to Linq equivalent

I've got this stored procedure I'd like to convert to LINQ to SQL, but I'm having a bit of trouble because I'm new to LINQ (and actually, I'm no SQL guru) and I am not getting the expected results. (I tried calling the SPROC from LINQ to SQL but when I send in the Period datetime as parameter on the SPROC I get some error on L2S about th...

Generate C# automatic properties with Codedom

is there a way Generate C# automatic properties with Codedom or maybe an other set of libreries that i can use ? ...