.net

Socket server crashing with unhandled exception

We have a c# (3.5 framework) socket server which is a console app, after about 3000 connections (or less, it's quite random), we get an unhandled exception which crashes the app completely. We're really struggling to find out what's happening and where, the only info we get is below, can anyone shed any light? It should be noted that EV...

Using .net 3.5 assemblies in asp.net 2.0 web application

I have an .net assembly build against 3.5 framework. This assembly has a class Foo with two method overrides: public class Foo { public T Set<T>(T value); public T Set<T>(Func<T> getValueFunc); } I'm referencing this assembly in my asp.net 2.0 web application to use first override of the Set method (without Func). But on buil...

How to get the updated version in click once deployment

Hi , I have an application deployed with ClickOnce .Now when i rebuild the application with some changes , and put it in the share folder from where it is installed and launch the appluication it doesnt takes the latest version instead it just launches the old version. How should i check (which file) for new version. is there any sett...

Performance impact of calling HttpContext.GetGlobalResourceObject

Hi, I'm wondering what is the performance impact of constantly calling the following methods: HttpContext.GetGlobalResourceObject() HttpContext.GetLocalResourceObject() The current implementatino iterates through the list of strings and translates them by reading the values from the global resource files. On average there are 50-100 ...

RegCode.dll version 2

Is the RegCode.dll (version v1.1.4322) compatible to register dlls built with .Net version 2.0? ...

NHibernate query with Projections.Cast to DateTime

I'm experimenting with using a string for storing different kind of data types in a database. When I do queries I need to cast the strings to the right type in the query itself. I'm using .Net with NHibernate, and was glad to learn that there exists functionality for this. For the example I'm using this simple class: public class Foo...

Feeling insufficient while looking for a programming job ...

Hello everybody It's really dream to be programmer for me.So i always wanted to be .I had so small knowledges from commodore basic which i couldn't figure out anything in it .Then i tried to learn Visual basic 6 by myself and result wasn't good as i expected because i even didn't understand classes.Then i left to learning programming an...

Records fetch for DataTable

Hi, I have added 1000 records into DataTable using C#.Net. This data table contains TimeStamp column for specified data stored time. Data stored into 10.00AM to 11.00AM every 10 seconds once. Here i want to fetch only 10.15AM to 10.30AM records using C#. Thanks ...

Deploying WPF applications with SQL Server

Ok so I'm developing a WPF application that makes heavy use of SQL Server. I've been asked to create an installer package that checks whether the client already has SQL Server Express 2005 already installed, his operating system (64bit Vs x86) and install the required SQL Server instance if needed. I'm then required to automatically map...

IL short-form instructions aren't short?

Hi. I was looking at the IL code of a valid method with Reflector and I've run into this: L_00a5: leave.s L_0103 Instructions with the suffix .s are supposed to take an int8 operand, and sure enough this should be the case with Leave_S as well. However, 0x0103 is 259, which exceeds the capacity of an int8. The method somehow works, bu...

How can I reuse my javascript code between client and server?

I have some javascript code that includes an ANTLR-generated lexer and parser, and some associated syntax tree evaluation functionality. This code runs in the browser in my web app to support users who author code snippets which process scientific data. Now I'd like to do some additional background processing on the server using the sa...

TextBox data binding validation

*Is it possible to get validation errors(produced by the binding source through IDataErrorInfo or INotifyDataErrorInfo) *without accessing data source? The point is to get the error message which is going to be displayed. Thank you in advance. EDIT: "without accessing data source" means that I don't want to get the error messages thro...

Designing WCF interface: no out or ref parameters

I have a WCF service and web client. Web service implements one method SubmitOrders. This method takes a collection of orders. The problem is that service must return an array of results for each order - true or false. Marking WCF paramters as out or ref makes no sense. What would you recommend? [ServiceContact] public bool SubmitOrders...

cant login using System.Diagnostics.Process.Start

i am tying to login using System.Diagnostics.Process.Start private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("iexplore","[email protected]","password","http://www.gmail.com"); } but visual studio gives me these 2 errors: Error 1 The best overloaded method match for '...

DataReader - hardcode ordinals?

When returning data from a DataReader I would typically use the ordinal reference on the DataReader to grab the relevant column: if (dr.HasRows) Console.WriteLine(dr[0].ToString()); (OR dr.GetString(0); OR (string)dr[0];)... I have always done this because I was advised at an early stage that using dr["ColumnName"] or a m...

Unsupported Type Exception in .net

Wondering what is the most appropiate Exception to throw when there is some case where I get an implementation of in interface that I dont expect Is there such a thing as UnsupportedTypeException in .net that I m not aware of? Cheers ...

Best architecture for highload system

Hi to all! I can't choise between Microsoft stack and Java stack. I'm start to develop highload system. Over 500 000 transactions per day. Best choice is Java stack or Microsoft ? ...

Where should you put 3rd party .NET dlls when using git submodules to avoid duplication

I have two .NET library projects in Visual Studio 2008 that both make use of the MySql Connector for .NET (MySql.Data.dll). These libraries are then in turn both used by a .NET command line application which also uses the Connector. The library projects are pulled in to the application's solution as git submodules and referenced by proje...

In iTextSharp, can we set the vertical position of the pdfwriter?

Hello, I've recently started using iTextSharp to generate PDF reports from data. It works quite nicely. In one particular report, I need a section to always appear at the bottom of the page. I'm using the PdfContentByte to create a dashed line 200f from the bottom: cb.MoveTo(0f, 200f); cb.SetLineDash(8, 4, 0); cb.LineTo(doc.PageSize.W...

Convert graphic that is created on a specific control to Bitmap

How can I convert a graphic, created on a PictureBox, to Bitmap? ...