.net

Remote debugger seems to have stopped working.

I had remote debugger working. I have a set of computers on a private network. I could VPN to that network and debug by launching Visual Studio with the same user name and password as the user on the box I was debugging. This seems to have stopped working. I get an error now about the other machine not being able to connect back to me. I...

Adding menu items from a separate thread.

I'm creating menu items in a separate thread and adding them to the menu created in the main thread. I'm using Invoke for that. Getting "Value does not fall within the expected range" exception. //creating new thread Thread thread = new Thread(LoadRecentTasks); thread.IsBackground = true; ...

Binding redirect problem in .net

I have a class library called "MyAssembly" that is internally referencing a.dll, b.dll of version 3.1.1.0; I have build the project which outputed MyAssembly.dll. On a different system (box) I have created a web application project and referenced the MyAssembly.dll. the new system has new versions of a.dll and b.dll 4.0.0; I used binding...

Linq Query Returns Incorrect Result Set

I have a very complex Linq to SQL query that returns a result set from a Microsoft SQL Server database. The query is created using syntax similar to: Dim db as MyDataContext = MyGetDataContextHelper() Dim qry = From rslt in db.MyView Select ColumnList If userParam1 IsNot Nothing Then qry = qry.Where(lambda for the filter) End If e...

What background colors for pre-2007 toolbars in Office applications should I use?

I am building an app that has a toolbar for Excel 2003 (and earlier). The toolbar requires BMPs which means not transparencies. How does this work? Do I pick a grey or blue that matches most of my installations and let the rest suffer? Or do I set it to an arbitrary color and indicate that color as a transparency for the toolbar? I am...

vb.net dataTable/DataGridView search/sort

So I have a dataGridView and a textbox on a form. I want to be able to search through the dataGridView and sort it compared to the string in the text box. ex: I type "acv" in the text box and all strings containing "acv" are sorted to the top. I'm accomplishing this with a bunch of gymnastics involving datatable.select and some clearin...

.Net side by side in process setup.

I have a .Net 4.0 application that needs to call a .Net 2.0 assembly. The .Net 2.0 assembly WILL NOT RUN in a CLR 4.0 runtime (it causes the process to freeze when it tries to load the assembly), it NEEDS to run in a 2.0 CLR runtime. Is there any way to utilize the in-process side by side feature in .Net 4.0 to enable this? The 2.0 ...

How to create a master detail insert form

i'm using the Northwind database and I want to create a C# .Net Framework windows form to generate an order input. I already linked the tables in my dataset and the binding source and used the binding navigator to be able to view each one of them The thing is i'm unable to find a way to add the order details to an uncreated order becau...

Is there a .NET port of Drupal?

Is there a .NET port of Drupal? I love Drupal... I love the idea. I want it to be .NET because we are a Microsoft shop and have resources to create .NET components. ...

WIF manually generate federationmetadata.xml

I am playing with windows identity foundation and I am trying to create an MVC.NET based Security Token Service and use it as the Single Sign On application. My only problem is that I don't know how to generate the federationmetadata.xml file. Is there any tool to generate this file manually? ...

Windows Mobile application icon

Is it possible to specify the application icon for a windows mobile app from a resource file or other configuration besides the .csproj? The reason I would like to do this is because I have an application that can be configured to run in several different ways. We would like to build out three unique .cabs based on these configurations...

Using TCPClient with RAW FTP to retrieve file

I get the following message back when trying to retrieve a file using TCPClient and RAW FTP: "425 Failed to establish connection." I connect using : using (TcpClient client = new TcpClient("ServerName", 21)) using (NetworkStream stream = client.GetStream()) using (StreamReader reader = new StreamReader(stream)) ...

Accessing GPS Data From a .Net Winform Application

Does anyone out there have any experience programatically retreiving the lat/long from a GPS attached to a mobile PC? A team I'm on is currently looking at hardware options--as the programmer who will eventually have to live with whatever is selected I was wondering if anyone out there has had experience writing .Net programs that inter...

C# testing to see if a string is an integer?

Hi, I'm just curios as to whether there is something built into either the c# language or the .net framework that tests to see if something is an integer if (x is an int) // Do something It seems to me that there might be, but I am only a first-year programming student, so I don't know. ...

How to create a shared object across all controls that appears at the bottom of Visual Studio Winforms designer?

I want to create an instance of an object that has to be set to each control's specific property. As is VS designer just creates a separate instance for each control. How do I do this so that my shared object shows up at the bottom of the VS designer window, like a timer, or a imagelist. ...

Visual Studio Panels

As a .Net developer I spend a large portion of my day working in Visual Studio (2008). While there are a lot of useful functionality inside the IDE, there are many things that I find frustrating on a daily basis. One of those things are the windows docking and pinning. There are many different windows types (debugging, pending checkins...

How to throw an exception on a web service in .net with custom message?

How do I throw a custom exception in a C# web service so that flex reads the error on fault? I tried simply throwing an exception like this throw new Exception("invalid key"); But FaultEvent couldn't decode the message in flex. Edit: What I really want to do is for flex to differentiate exceptions in the web service, for example to ...

What data structures can I use to represent a strongly-typed 2D matrix of data in .Net?

I'm trying to represent a scoreboard for a competition and am struggling with the best data structures to use. I have a list of Player objects, a list of Round objects, and for each combination, I need to store a RoundScore object (there are various parts to the score for a round). What I'd like is some overall Scoreboard object where ...

Displaying a date with time using region settings formating

I expected this to work: Public Shared Function ToShortDateTimeString(ByVal dateIn As Date) As String Return dateIn.ToShortDateString & " " & dateIn.ToShortTimeString End Function The date gets formatted according to local settings, but not the time. I seen API examples but, dangit, this should be easy and built into the framewo...

How risky is development against SQL Server 2008 with production on SQL Server 2005

My dev environment has SQL Server 2008 installed. I have an asp.net 1.1 site in production using SQL Server 2005. I'd rather not install SQL Server 2005 on my development environment. How risky would this be? What kinds of things might cause problems? ...