.net

SUBST and console app vs. windows service

I have used SUSBST command to create mapped drive to a certain folder. In a console application I can access the directory, while I cant access the same directory in a windows service application. In other words the following line returns false Directory.Exists(@"x:\directory") where x: is defined using SUBST as follow: SUBST x: c:\x...

Windows Device Emulator V3, windows 7 + Network

Well im debugging a windows CE application from visual studio in the Windows Device Emulator, now to setup the network i go to File -> Configure -> Network, i enable a network card and press OK, then i get this message: "The required Virtual Machine Network Driver could not be found. Make sure that Virtual PC 2007 is installed. You can ...

CSS not loading up in ASP.NET site when using view in browser

I have this asp.NET web site that for some odd reason doesn't want to load css and script from the plugin I just wrote. This occurs if I use View in browser option in Visual studio. If I preview a sample file in browser directly from file system, it works OK. I have checked source code of ASP site and it contains both files. In Firefox ...

Expose WSDL on Remote Server

Is there a clever way to expose WSDL from a WCF service hosted on one IIS server automatically on another server? Thanks ...

Tab order in .NET Compact Framework

Hi all, In Compact framework application form,If we do tab-out from a datagrid's any cell to some controls outside the grid,next time when grid get focus ,it will point the old cell . Any idea on setting it to datagrids first cell? ...

Does myAssembly.xmlSerializer.dll always get generated?

Hi, I have a web service that does not use any xml attributes for serialization. I just return a string from the web service. In this case, does a serialization dll get created? The reason I ask is I keep seeing c:\windows\temp\xxxxx.dll (where xxxxx is a random sequence of characters) every couple of weeks the web service is running. ...

How to allocate memory in another process for windows mobile

I'd like to read the contents of another process listview control in windows mobile. To do this, I need a pointer to some free memory to that process in order to put the values there (and then read them from my process). This can be done in normal Windows or Win32 with the VirtualAllocEx function. However, this function is not supporte...

INotifyPropertyChanged with threads

I have a BindingList<T> which is bound to a datagridview. One property in my class takes long to calculate, so I threaded the action. After the calculation I raise the OnPropertyChanged() event to notify the grid that the value is ready. At least, that's the theory. But since the OnPropertyChanged Method is called from a differend ...

How to sort DataGridView rows

Hi, In the DataGridView there are rows sorted by priority (first row has the highest priority) and I want to enable the user to change the priority in the user interface. The best way to do it would be to simply drag and drop the selected row but I think the logic to implement this functionality is quite complex. The other possible way...

.Net and mobile devices list

Hello guys. I need to develop an application for mobile devices. I'm good in .Net and have no time/willing/money to learn any other libraries/frameworks. So I decided to create my application using .Net CF (is it good choice?). What most popular devices are capable to run .Net CF application these days? I know only Windows Mobile devic...

Capture Stored Procedure print output in .NET

Is it possible to capture print output from a TSQL stored procedure in .NET? I have a lot of legacy Procs that use the print as means of errorMessaging. An example, is it possible to access the outprint 'word' from following PROC? -- The PROC CREATE PROC usp_PrintWord AS PRINT 'word' // Some C# Code to would like to pull out 'wor...

Refresh form controls with external program output

Hello I have a basic winform, calling an external program (SVN). I want to display the output produced by SVN in a textbox in the form. Here is my code for calling this external program : private void SVNcmd(string args, string workingcopy) { textBoxOutput.Text += workingcopy + Environment.NewLine + args + Environment.NewL...

Need advice on server side logging with log4net.

Dear ladies and sirs. We are using log4net for our server side logging. The problem we are facing is with the FileAppender. Here is our log4net section in the app.config file: <log4net xsi:noNamespaceSchemaLocation="http://csharptest.net/downloads/schema/log4net.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt...

how to sort an array which is mostly sorted

i have an array like this: 1,2,3,5,6,4 it is 99% sorted and has 40K elements. i can put them in an array, list, linked list, ... but i don`t know the fastest way to sort them! ...

Calling a .NET function with variable number of parameters from unmanaged code

Hello, I would like to call C# function with variable number of parameters: void f1(object arg1, params object[] argsRest); from unmanaged, C function with variable parameters that wraps f1. How can this be achived? ...

Tips for working out why my application sometimes 'hangs' during Load

I have a (rather large) application which occasionally gets 'stuck' whilst loading - with controls half painted etc. From what I have managed to work out from logging, this happens after the end of the _Load event. The only time it happened to me when running from Visual Studio, I tried doing a pause, and it just took me to the Applica...

<%= Session.Timeout * 19 * 1000 %>

What is the actual time of session timeout here is it 19 minutes ? <%= Session.Timeout * 19 * 1000 %> <script language="javascript" type="text/javascript"> setTimeout('SessionTimeout()', <%= Session.Timeout * 19 * 1000 %>); function SessionTimeout() { alert(<%= "'Session time out!!'" %>); window.location = "D...

Will multiple Control.BeginInvoke/Invoke calls execute in order?

I need to know whether Control.BeginInvoke and Control.Invoke calls will execute in the order they are called. I have the following scenario: UI thread is blocked WCF thread calls Control.BeginInvoke WCF thread calls Control.Invoke (or possibly BeginInvoke again) UI thread is unblocked ?? The execution order of step 1-4 is guarantee...

Session time out

<script language="javascript" type="text/javascript"> setTimeout('SessionTimeout()', <%= Session.Timeout * 60 * 1000 %>); function SessionTimeout() { alert(<%= "'Session time out!!'" %>); window.location = "Default.aspx" } </script> Does the above code will help in session time out ? If so how many minutes? ...

specify the excel sheet while writing to excel

Hi, I am writing each row data in datatable to client side as a comma separated string using response.write and using the following code to get it downloaded at client side. HttpContext.Current.Response.Clear(); // Clear the Response Object HttpContext.Current.Response.ContentType = "application/ms-excel"; HttpContext.Current.Response....