.net

How to monitor incoming/outgoing traffic on windows mobile?

I want to check how much was sent/received by WM phone over GPRS/wifi. Please suggest a freeware utility for this or the way i can manage it in .NET CF. Thank you. ...

.Net: Adding files and folders to SETUP Project programmatically

So, here is the scenario: I want to create a installer which would just dump few files and folders at a location specified by user. But the problem is these files are required to be picked up from a fixed source folder and then the installer is build. Also, these files may change any time and then again a new version of t...

Cruisecontrol .net config file not reading changes (ccnet.config)

Hi, Does anyone have any insight as to why changes to the ccnet.config file are not being accepted by ccnet? We have a ccnet.config file that holds about 30 projects. Usually, if you need the configuration reloaded we can just 'touch' the file and save it, and the ccnet.log shows that ccnet has noticed the config changes and reloads th...

Convert integer to byte

Hi there. I have program in C#. I want to convert an int to HEX and after that convert it to a byte. But there is a problem in the 3rd line: int i = 10; string str = i.ToString("X"); byte b = Convert.ToByte(str); Please help me. ...

301 Redirect in asp.net

I have just uploaded a new website www.tapasya.co.in. When I tried to access, it showing me a blank page. But when I tried using the complete path of the home page http://www.tapasya.co.in/Web%20Pages/Home.aspx , its working. I think, I have figured the problem, which might be occuring. I have to put this page at the root folder, to acc...

How to centralise functionality across an enterprise?

At work, we use/develop a LOT of MS Access apps. Whenever the business has a significantly different problem to be solved, a new MS Access project is started. As such, although these projects are solving fairly different problems, they may actually use very similar code in parts of each project. There are only so many ways you can ext...

Duplicate domain constraints in table

Hi I'm designing a database to hold my domain objects. I have various validation rules on the objects such as string length and if it must be filled. These things are checked in the C# code. Does it make sense to duplicate this rules in the database, such as setting nvarchar(150) instead of nvarchar(max) and setting nullable to false f...

How to catch properly an SqlException: A transport-level error has occurred ...

I am getting an SqlException in the logs of .NET 3.5 app, I am looking for the corresponding number (value of the property SqlException.Number). System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer av...

.NET windows service aborted during system shutdown

My windows service is a data server with substantial cache. During service OnStop I save the cache so that no data is lost. Saving cache may take several minutes so to prevent windows service manager from timeout I use SetServiceStatus Win32 callback: this.serviceStatus.currentState = (int)State.SERVICE_STOP_PENDING; this.serviceStatus....

.net framework CLI standards hosting organization?

Does anyone know what organization is hosting the .net framework Common Language infrastructure (CLI) standards and where you can I go and read them? ...

how do I change the way a DateTime object is displayed in a DataGridView

I would like to change the way a DateTime object is displayed in a DataGridView. Specifically, I would like to have seconds displayed with the time. c# .net 2.0 ...

How to create inheritance based serialization mechanism?

Hey everyone, I whould like to creat a serialization mechanism, to work on a variety of entities, all of which are based on a few base-classes. Now I want to work with DataContractSerializer, so I need to mark all my classes with [DataContract]. but I dont want to do that because that is a big room for error for other members of my tea...

Mixing multiple audio samples into single file with C#

Hi everyone, I'm looking for a library capable of creating an audio file (mp3 or wav). NAudio stands out as a good candidate, but not sure if and how it can do specifically what I need. I want to mix a number of audio samples into a single file, have them play simultaneously with control over each sample's start and end timing when "re...

Debugging managed app crash

I'm trying desparately to debug an application I'm trying to release. It was created on Win7 x64, and also runs fine on Win x32, but not on XP (Don't have Vista to test). I've created a dump file by setting the _NT_SYMBOL_PATH to the directory of the application in XP, then run the debugger with: adplus -crash -pn launchmenot.exe Thi...

How can I manually uninstall .NET Framework Beta 2?

Uninstalled VS2010 Beta 2. Uninstalled .NET Framework 4 Extended Beta 2. On attempting to uninstall .NET Framework 4 Client Profile Beta 2. I get Blocking Issues: You must uninstall the .NET Framework 4 Extended Beta 2 before you uninstall the .NET Framework 4 Client Profile Beta 2. On attempting to reinstall Framework 4 Beta 2 I get:...

Does a StringBuilder initialized with a string contain exactly (only) enough space for that string?

I'm wondering if this code ... StringBuilder sb = new StringBuilder("Please read the following messages."); ... initializes sb with a buffer exactly as large as the string passed to the constructor. On the one hand, this would seem the most logical thing. On the other hand, it seems to kind of defeat the purpose of the StringBuilder c...

Transfering set of points to Bezier curve

In my WPF application I'm working on a drawing mechanism to make annotations on top of images. For now I have functionality to draw paths where my drawn path will consist of the collected points from the drawing. More closely I'm adding StylusPoints to an InkPresenter as I collect them through the MouseMoved event. The InkPresenter is se...

How to automatically resize a Windows Mobile application when the keyboard appears?

I'm looking into Windows Mobile development but there is one thing which I haven't quite figured out yet. In all applications already installed on the device (Internet Explorer, configuration windows, etc) whenever the on-screen (soft?) keyboard appears, the user interface automatically resizes so the keyboard doesn't cover or obscure th...

Session Timeout extend in asp.Net

How to extend the session timeout? I tried entering: Session.Timeout = 720; in formLoad and also tried in webconfig: But still it times out after 10 minutes. Can any one help about this issue? ...

Mocking filesystem

Hi, If my unit tests rely on the file system and I need to mock this, what is the best way to go about this? Thanks ...