I have a website that occasionally needs to have a handful of the tables in its database updated. The updates come from another system that exports to comma delimited text files. I can then either FTP the text files to the web server, send them in through an admin upload page, or manually log in to Remote Desktop to download the text fil...
Possible Duplicate:
Re-entrant locks in C#
I've looked here on StackOverflow and on MSDN, and can't believe that I couldn't find this question lingering out there on the internets.
Let's say I have a class with a private member that I want to access in several public methods. These public methods will be called by different ...
Having started porting my VB6 code to .NET, I find .NET doesn't allow me to use the COM interface for the base program: "The ActiveX type library xxx.tlb was exported from a .NET assembly and cannot be added as a reference"
The problem is that the interface to the .NET assembly doesn't work, but the standard COM interface does. Is there...
I am creating my very first larger ASP.NET MVC application. After thinking about the application architecture for some time, I thought I would hear some other opinions.
I am using LINQ-SQL for my data layer. However, I am not planning on using the LINQ objects throughout the application, since I would like some more specific data types ...
I want to get the default values of all columns of a table so I can display them in the data-entry form, is there a way to do this using ADO.NET ? I know I can query the information_schema database for this info, I'm just wondering if there's a built-in way to do this in ADO.NET
...
i just want to see all the report on a pdf format on button click.
i use ...
protected void Button1_Click(object sender, EventArgs e)
{
//Create Document class object and set its size to letter and give space left, right, Top, Bottom Margin
Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
//Writ...
What's the easiest way in .NET to check what status code a web server replies with to a GET request?
Note that I do not need the body of the response. In fact, if possible, only the header should be requested. Having said that, however, if requesting that the body of the response be omitted significantly increases the complexity of the ...
I have a WCF service written in .net 4, and exposed over net.tcp. Any time I try to set the MaxConnections property of the binding configuration to something higher than 10 I am AddressAlreadyInUseException.
Why would that be getting thrown on the MaxConnection setting?
(if it matters, I am on Server 2008 R2 Standard with a 4 core CPU ...
Hey guys, I'm coding a C# program to "Install" itself on the PC and run at starup to manage some scheduled tasks I have. I already have most of it done, including prompting the user, adding to startup, and such. But I want to copy the EXE when they run it after download, to C:\Program Files\Company\Program.exe
Is there any easy way to ...
I'm currently working with ASP.NET and about to start learning ASP.NET MVC (2).
So before I open the first thick book and go through the first lengthy tutorial, what are the most important (new) concepts to keep in mind? What are the main new features I should be aware of?
Thanks a lot.
...
Hi Everyone,
I am hoping someone out there can give me help with this. So I need to be able to run Microsoft Dynamics AX test case in C#. Now I was going to try and do something like
Process.Start("ax32.exe", "-StartupCmd=RunTestProject_<name of test>");
But I am hoping there might be a way to run it by importing some Dynamics AX DLL...
I'm reading a binary file into a bindinglist of (t); to be bound to a datagridview.
Each line in the file represents a single transaction but I need to consolidate and or filter transactions that meet certain criteria.
I know how to do this from a mechanical standpoint (looping the list while adding each item, and adding a new item, o...
My application consists of main message loop (GUI) and threads (Task.Factory).
In the threads I call some 3rd party applications with var p = new Process();
But when I invoke Application.Exit(); in the message loop - I can see that the processes, that were started in the threads are still in the memory and are being executed.
So the q...
I'm adding buttons to form with loop and i noticed adding click event handlers slowing down application too much. Later i tried mouse click event instead click event and it is working instantly.
This screenshot showing my test result:
Source code: http://pastebin.com/qVewNm1u
Results for 1000 event handler:
Click: 2892ms
MouseClick: 1...
I have a Windows Phone 7 application (Silverlight-based) that sends a web request and receives a web response. It works fine - I am using BeginGetReponse and an AsyncCallback to call EndGetResponse.
However, I need to wait for the response to be fully received, so that I can fill a collection with the data from the response.
What woul...
Hi All,
I've got a multithreaded C# 2.0 app where each thread writes some results into a SQL server 2000 database table. There is only a straight INSERT command and no other logic.
My question is - do I need to put a lock around the methods that writes the results to the database? There is a lock at the moment but I suspect that it's s...
Hello, I am faced with this strange problem:
In an .net web application, there is some code equivalent to this:
if (Directory.Exists("config"))
{ ... }
It basically checks to see if C:\Windows\system32\inetsrv\config directory exists, why the code is written like this is beyond me and this question.
What confuses me is the above co...
Hi,
This is a simple question: How do I access Windows' registry with PHP and the DOTNET class? What I want to do is to read a value that another program wrote.
Googling did not reveal much. I appreciate any answer!
...
I have two lan cards installed in my pc. One is for internet connection and another for share the internet to client machines. I am getting my IP with this code:
IPHostEntry HosyEntry = Dns.GetHostEntry((Dns.GetHostName()));
foreach (IPAddress ip in HosyEntry.AddressList)
{
trackingIp = ip.ToString();
textBox1.Text += trackingIp...
Hello
I'm very new to silverlight and I'm thikning which way to go. I'm in planning phase of my new project which should be built on silverlight. The problem is that I want to have my own DAL -> BLL on server side, and WCF service, which will talk to Silverlight should be consumable by other applications too, including other technologie...