.net

localhost and 127.0.0.1 not the same?

I have a socket app that passes data between 2 processes. It works fine on a number of computers with the 2 processes running on the same computer. A person in my office visited a government office where they made some unknown changes to her laptop so she could get on their network. When she left the app no longer works. If she tri...

How to use XMLSerializer with a Castle ActiveRecord containing an IList<T> member

I am trying to use the XMLSerializer with a castle active record class which looks like the following: [ActiveRecord("Model")] public class DataModel : ActiveRecordBase { private IList<Document> documents; [XmlArray("Documents")] public virtual IList<Document> Documents { get { return documents; } set ...

Another OOP Question in Asp.net

Hi, now i'm hoping the following is possible although I'm not entirely certain it is so here goes... Below is the setup of what I'm hoping is possible (in VB.net, feel free to answer in C# and I should be able to work it out): Public Class A Private _name As String Private _s As SearchA Public Property Name() As String ...

ADO.NET Entity Framework, Northwind, and Employee.Orders > 0

So I'm trying to work on a sample app. Trying to dig into ADO.NET Entity Framework. I get an employee back using a method with LINQ like this: public IList<Employee> FindByLastName(string lastName) { IList<Employee> emps; var e = from emp in _ctx.Employees where emp.LastName == lastName select emp; em...

Conversion to .Net 3.5

I recently started maintaining a .Net 1.1 project and would like to convert it to .Net 3.5. Any tips to share on reducing code by making use of new features? As a first attempt, I would like to convert a bunch of static helper functions. Update: The main reason why I am converting is to learn new features like static classes, LINQ et...

.Net 3.5 Windows Service hide WCF Service Host

I got a Windows service installed on my development machine (that I made) and I want to interact with it. For a reason I don't know, each time I start the client, a WCF Service Host pop and said that the address is already in use ... which is true ... but how can I do to NOT start that Windows ? Is it because my two projects (server and...

Setting GridView's DataSourceId to "", causes GridView to lose...

Hello, If I bind GridView to SqlDataSource, then the first time page will be created, GridView will display columns retrieved from data source. But if on postback I set GridView.DataSourceID to null or to an empty string protected void Page_Load(object sender, EventArgs e) { ... if (IsPostBack) ...

why I don't see generated IDs for server side controls?

Hello, I'm little confused here now. Let me explain: I've seen people talking about adding a button or some other control to the page in asp.net (3.5) and when the control renders it changes the Id of that control, eg. Button1 becomes Button1_somethingsomething which prevents them from using jQuery and what they end up using is somethin...

Going fullscreen on secondary monitor

How can you program a dotNet Windows (or WPF) Application in order to let it going fullscreen on the secondary monitor? ...

Where can I write my log4net log file to under ClickOnce?

When I run my application locally it writes my log4net log to the location I've configured (i.e., <file value="${LOCALAPPDATA}\TEST\Logs\debug.log" />) without a problem. However, when I deploy my application via ClickOnce, the log file is not being written. I know ClickOnce applications are limited in terms of where they can write t...

Learn .NET 3.5

What are the best resources for a C#/.NET 2.0 developer for learning .NET 3.5? I'm struggling to learn ASP.NET MVC and I feel that a lot of my stumbling blocks have to do with not ever having explicitly studied 3.5. Note: I know there are already these questions, but they both seem to focus on ASP.NET http://stackoverflow.com/question...

How should I configure WCF security for an internal service between two Domains?

Here's my scenario: I'm planning on running a Windows Service hosted WCF service on a server that is outside of our domain (in it's own workgroup). I need to access it securely from a client that is inside our domain. There is a firewall between the two machines that we are in control of. The service does not need to be accessible by a...

ConnectionString Configuration Error

Hi everyone I am trying to make an RSS Feed with asp.net,sql and xml. I am getting an error Compiler Error Message: CS0103: The name 'MyConnString' does not exist in the current context" on line 22 "SqlConnection objConnection = new SqlConnection("MyConnString"); My web config contains <connectionStrings> <add name="...

Can i write a file on the client's PC using silverlight

I need to write a web application that allows the client to download a file from the server, so far so good, but the file must be kind of encoded, so i need to decode it on the client and write it on a file on the client's PC. Can i do this using Silverlight? and how? If it is not possible, there is another way to do it?. Any suggestio...

What is the best way to convert between a Media.Matrix to a Drawing2D.Matrix

I have the need to convert from the WPF Media.Matrix to the Windows Forms Drawing2D.Matrix and so I did the following: public static System.Drawing.Drawing2D.Matrix ConvertToDrawing2DMatrix( Matrix matrix) { return new System.Drawing.Drawing2D.Matrix((float)matrix.M11, (float)mat...

Is there an equivalent to Groovy in C#?

What is the closest thing to groovy/java combo in the C# .net world? If I am writing an app with static and dynamic parts, what's the dynamic part like groovy on the .NET runtime? ...

How to catch exceptions from a ThreadPool.QueueUserWorkItem?

I have the following code that throws an exception: ThreadPool.QueueUserWorkItem(state => action()); When the action throws an exception, my program crashes. What is the best practice for handling this situation? Related: Exceptions on .Net ThreadPool Threads ...

Is the "loband" version of MSDN preferable?

I don't know about you, but for me MSDN online walks the narrow line between "unusable" and "painful". Every click leads to a page of 1 line of human content and 500 lines of auto-gen garbage, a reload of the table of contents, code examples in 8 languages, mouse overs begging for attention. It was so bad that I had started writing my ow...

Why does the updatepanels reload controls outside the updatepanel

I have several UpdatePanels on a page and they have been set with a mode of Conditional. I see a flicker in the controls outside of the UpdatePanels when there is an event that occurs within the UpdatePanel (Say a button click). The page doesn't post back but the user experiences a "Flicker". Any idea what might be going on here? ...

Autosizing ComboBox dropdown to content in Silverlight.

I have this ComboBox in my Silverlight UserControl: <ComboBox AutomationProperties.AutomationId="cmbProjects" Grid.Row="0" Grid.Column="2" ItemsSource="{Binding Projects}" SelectedItem="{Binding SelectedProject, Mode=TwoWay}" Style="{StaticResource Defau...