.net

Why I have to use fully qualified assembly name for local assemblies?

In many places, like in app.config/web.config files I have to specify types using this verbose fully qualified names, like <add name="myListener" type="System.Diagnostics.TextWriterTraceListener, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> This MSDN site says, that Partial binding, which speci...

Using C# Regular expression to replace XML element content

I'm writing some code that handles logging xml data and I would like to be able to replace the content of certain elements (eg passwords) in the document. I'd rather not serialize and parse the document as my code will be handling a variety of schemas. Sample input documents: doc #1: <user> <userid>jsmith</userid> <p...

Receipt printer?

I am developing a software which require to print receipts. What is the most common type of receipt printer? Are there any industry standards for receipt printer API? Are there any .net library for that? Tried to find but didn't find anything. ...

Powerful .NET Map APIs?

A coworker of mine thought of a great way to visualize a lot of the data we work with in our user-end applications, but we're not aware of many available sdk's or apis that hook in. We're trying to recreate in essence, the "Magic-Wall" of CNN. We would like to be able to show trends across the country in a 'heat-map' kind of way, and be...

Customer WCF Bindings / Binding Elements For Encryption

I am trying to implement encryption for my WCF service. I am aware that there are several options out there for me to do this. I am not interested in them. I would like to use a password to regenerate repeatable RSA keys. These keys will then be used to exchanged AES keys which will be used to encrypted the actual passed data. I think I...

Processing incoming email

How do I programmatically read an incoming email with .NET. I need a method to take the content of email message (in this case XML) on a POP server and read it into my application. Ideally this could be solved by: .NET code that I can run as a background task on my webserver to process the email. A service that can POST the contents ...

Why is IEnumerable.Count() capped at 200?

Is there a limit to the rows that IEnumerable.Count() (or IQueryable.Count()) using LINQ to SQL? For whatever reason, if my query returns more than 200 records, I only get 200 from IEnumerable.Count(). I've even tried using IEnumerable.LongCount() (even though the number of results shouldn't be high enough to need it). I've also verif...

Registry values in a different language

I have an application that requires .Net. I have found out how to check registry values to see if .Net is installed and whether or not it is the proper version. What I want to know is this: Will registry values change based on the Language setting of the OS. That is, if someone in Peru installs .Net and my application calls something l...

Castle-Windsor Fluent Interface: How to register all implementations of all interfaces?

I have two assemblies EDC2.DAL and EDC2 where EDC2.DaoInterfaces defines a bunch of interfaces for data access objects to objects in the EDC2.Domain namespace. These are all implemented by classes in EDC2.DAL. So to give an example: Assembly EDC2 Namespace EDC2.DaoInterfaces ICustomerDao IProductDao Assembly EDC2.DAL Name...

How do retrieve no of uesrs connected on IIS at any point

Hello - I want to know how many users are connected to the IIS web server at any point on a simple .net page. Is there a way using a native .net class in 3.5 that will tell me this information. I want to create a simple web page that will give me the total number of users/open sessions at a given time. Currently, I am using Perfmon to ...

What are some good examples of JQuery using JSONP talking to .net?

As the question says, what are some good examples (or just examples really), of Jquery using JSONP to talk to a .net page or webservice? I'm attempting to write a page which uses JQuery to call another website (Thus I need to use JSONP) which hosts the webservice/webpage (either is fine), and I can't find a good example of this. ...

Interop issue in .NET

I have a 32 bit managed assembly that access a 32 bit COM component. When i compile the assembly using the 64 bit flag, i get an error when i try to access the 32 bit COM component from it. Is there a way around this problem? ...

WCF minimal app.config settings

What are the minimal settings i need to do for a streamlined WCF config in the app.config? The default one is this: <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" byp...

Winform Checklistbox Headers/Columns

Is there a way to implement a new column with a header in a checklistbox in vb.net? I've done a bit of searching, but didn't find much on the topic. Should I just abandon the quest and use a listview or some other control? Thanks for any/all help! JFV ...

Passing Controller a FormCollection and an IList<T>

I have a form which contains a whole heap of data entry fields that will be completed by the user including some elements where the user can dictate how many of the same items they will enter. This is as is being used in Phil Haack's blog entry Model Binding To A List. I am successfully using JQuery to create the extra form elements, co...

Stylecop tells me to add this keyword, but it's redundant - any performance implications?

I use Stylecop for Resharper and whenever I call something in my class, Stylecop tells me to use This. But the IDE says this is redundant code (which it sure is), so why should I use this? Does redundant code mean its not needed (obviously) and the compiler won't even do anything with the this keyword? So I assume the this keyword is ju...

Does assigning objects to null in Java impact garbage collection?

Does assigning an unused object to null in Java improve the garbage collection process in any measurable way? My experience with Java (and C#) has taught me that is often counter intuitive to try and outsmart the virtual machine or JIT, but I've seen co-workers use this method and I am curious if this is a good practice to pick up or on...

How to send http request in asp.net without waiting for a response and without tying up resources

In an ASP.Net application, I need to send some data (urlEncodedUserInput) via http POST to an external server in response to user input, without holding up the page response. It doesn't matter what the response from the other server is, and I don't care if the request fails sometimes. This seems to be operating fine (see below) but I'm c...

What Is Some Beautiful Open Source C# Code?

What is some truly beautiful source code that I can browse, maybe on Codeplex.com? I am in the process of getting as good at C# as I can, and I would love to know what code I can look at and know I am looking at some beautiful code worthy of emulating. Exact Duplicate: Open source C# projects that have very high code quality to le...

print on dot matrix printer in .net

anyone can please tell me the code how to print documents on dot matrix printer in C# windows application. ...