.net

What GPS Dongles work with Windows 7 and the .Net 4.0 System.Device.Location Namespace?

Hi, I want to add full GPS support into my application. The .Net 4.0 System.Device.Location namespace information here is perfect for my needs. When this was first announced and the Beta release was out, I got a GPS dongle, but I could never get Windows 7 to see it as a sensor and therefore make use of System.Device.Location. After many...

Eazfuscator: How to obfuscate public types?

Hi, How can I obfuscate public types and methods with Eazfuscator in an .EXE file? I've read the help file and tried this attribute, but it didn't work: <Assembly: ObfuscateAssemblyAttribute(True)> Thanks. ...

How to get username in global asax?

Hi there, I am trying to check if the user belongs to someone's friendlist from the database and redirect him accordingly. I am doing this in a routehandler called by Global Asax. I just want to know how to get the username (from the login information) in the route handler class (or Global asax) I used this: string username = HttpC...

MVC 2 ModelState - Show all Errors

My asp.net form is throwing errors relating to an incorrect model, but on the page it's not showing me what model field threw the error. I'd like to Debug.WriteLine all errors in the ModelState but am unsure how to go about it. Any ideas? ...

MEF Global CompositionContainer in existing applications

I'm researching MEF as a solution to plug-in resolution in our existing .NET Application. In all of the examples that I can find, the main application creates an instance of the CompositionContainer and calls container.ComposeParts(this). The problem is, my application is not entirely built on MEF, so there is a hole in the object grap...

Is there a .net solution for sending/receiving json other than IIS

What I basically need is a small console application that listens on port 80 and is capable of putting json objects around. Receiving value types, objects and List<T> (or array) from a JSON client and converting them to .net classes Sending value types, objects and List<T> to the client Outputting some info to the console Performance...

Luntbuild for .net

Is it possible to use Luntbuild to build .net projects? ...

Get path for user settings from another application

I have the following situation: - Need to check manually for updates (Can not use clickOne i suppose) for several of our applications. So i need a master application which can launch for example 5 applications. This master application can check for updates of his child applications. So what i did is empty the folder with the old applic...

Template to include Title, CreateDate, ModifiedBy, Author etc in C# Class file

Hi, Is there any template available which inserts xml comments on the class file(before/after using statements) to include ClassName, Author, File CreateDate, ModifiedBy, BugFixes etc. So any developer adding a new class file should be able to provide these information before writing the code. Thanks ...

c# inter-thread communication

hello i want to threads to collaborate a producer and a consumer. the consumer is rather slow, and the producer is very fast and works in bursts. for example the consumer can process one message per 20 seconds, and the producer can produce 10 messages in one second, but does it about once in a long while so the consumer can catch up. ...

Get the username that runs the executing AppPool

In ASP.NET or WCF is it safe to use ServiceSecurityContext.Current.WindowsIdentity.Nameto get the current username that executes the current thread? I want to ensure that the correct user is impersonated in my WCF Service. ...

.Net Read Stream Segment from a Stream

I am trying to find a way to read part of a stream. I have a stream with 40000 bytes and need to read only from position 8000 to 15000, problably something easy but I can't seem to find an easy way to get a stream segment. ...

C# TCP listener

Hello all, I don't want to reinvent the wheel with another TCP server wrapper, so are there any good out of the box open source TCP server wrappers for .NET C#? Indy C# is kinda dead, and I cannot find any other packages that are atleast a bit maintained.. ...

Export of binary data (for example binary files) into a string with .NET ?

How can I convert/export binary data (for example binary files like excel- or word-documents) into a string (into text format) in .NET, so that it can be imported somewhere else (e.g. in another application, which was written in another programming language (not in .NET)). Are there universal concepts to achieve this goal ? ...

Reading wrong value from dataset

Hello All, I have a question related with dataset. I wonder why am I reading wrong value from a dataset? The field that I want to read has the value of: 2010-06-28 21:00:00 However, when I'm trying to read the first row using: DateTime endShift = Convert.ToDateTime(ds.Tables[0].Rows[0]["rep_time_to"]); I get: 04/07/2010 9:00:00 PM ...

DataTable to XML and ViceVersa in C# .Net

I am having problems to write DataTable to XML document and read back the same XML document to the DataTable. The Following is the Code, please help. Thanks in advance. //TO READ A FILE if (openFileDialog1.ShowDialog() == DialogResult.OK) { myDT_For_DGV.ReadXml(@openFileDialog1.FileName); ...

SQL server reporting: subreport doesnt handle page breaks properly when exported to excel

I am running into a problem where I have a main report which calls sub report; the sub report contains data in matrix control. I am trying to export each week's data on a separate sheet on Excel, but excel only displays 1 week's data instead of 4 weeks. The same sub report, when exported to PDF, shows data weekly on separate pages, but i...

Is there some library to help me to write Javascript code in C#?

I'm looking for something to help me to write C# code that would be automatically converted to javascript. The advantage would be code-completion and type-safety. Some features that I'm looking for are the following: Auto creation of prototype equivalents to C# classes. Auto generation of javascript code based on C# code (property set...

Backup SQL Server Database with progress

Does anybody know how to backup SQL Server 2005/2008 database with C# and get the database backup progress? ...

Microsoft Based Touch/Stylus Input

Disclaimer:It's my first time developing an app that will be on a tablet style pc. The app needs to allow a user to write notes with either a tablet pen or by touch. This must be a .net app and may be on either Windows XP and/or Windows 7. I am mainly tasked with capturing written notes from the user interface, but I am sure I will be ...