.net

HttpWebRequest, known problems with canceling requests?

Are there any known issues with canceling HttpWebRequest HTTP requests? We find that when we cancel 4-5 requests, the next request hangs indefinitely. If there are no known problems with this, then I'm probably doing something wrong... where is a good resource example that shows how this works (a complete solution, not a couple of code ...

Validation controls for Windows forms?

Are the validation controls available in Visual Studio 2005 for Windows Forms like they are for Web Forms? I don't see them. ...

Generate classes from XSD

You are doing contract first development of web services in a SOA world. After editing an XSD file, what is the best way to automatically (re)generate .net classes from the XSD files? ...

How do I create a Popup Dialog box in Silverlight ?

I'd like to create a popup dialog box in silverlight in which i can manipulate controls, enter data, and return a value. I want it to be modal, so that when it is open, the page "Below" is inaccessible. I havent found an easy way to do this yet. Any suggestions? ...

LINQ to Array in Silverlight 2

There's something wrong with my code or I'm just not understanding this fully. I have the following code that runs a query that MAY contain more than one RIGHT attribute and want to store each within an array for later fetching: var members = from myList in o_data.Descendants(bp + "Reaction") select n...

Is there a way to create an desktop application with that office2007 toolbar for free?

I found several controlsets for that nice looking ribbons (DotNetBar, DivElements, ...), but all require a license for at least 100 USD. Is there a free controlset that looks quite as nice as the commericial ones? ...

How do I use LINQ to Entities in Visual Basic?

I've created a .NET solution with two projects: ToyData (Visual Basic Class Library) ToyOne (Visual Basic WPF Application) The ToyData project contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy. The ToyOne project contains this Window1.xaml.vb file: 1 Imports ToyData 2 3 Class Window1 4 ...

How do I extend ADO.NET Entity Framework objects with partial classes?

I've created a Visual Basic WPF Application project that contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy. Its Window1.xaml.vb file looks like this: 1 Class Window1 2 3 Private Sub Window1_Loaded( _ 4 ByVal sender As System.Object, _ 5 ByVal e As System.Windows.RoutedEventArgs...

Using WebServiceHostFactory Pros & Cons

When hosting a WCF service on IIS you have an option of manually configuring the endpoint or declaratively by means of WebServiceHostFactory. It doesn't seem to be that difficult to manually create the endpoint so I figured I would ask. What are the benefits of using WebServiceHostFactory? Are there any performance implications to dyn...

In .Net, what's the better choice to code key presses in keyboard, key-up or keydown?

Are the two events the same or are there differences that we should take note when coding the keyboard presses? ...

How to create an aspect checking for null references on all methods in a class in postsharp

How to create an aspect checking for null references on all methods in a class in postsharp. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace test { [MethodParameterNullCheck] internal class Class { public Class() { } public void MethodA(int i, ClassA a, C...

WCF behind load balancer - how to setup

We have a couple of web servers using load balancer. Machines are running IIS6 on port 81. Externally, site is accessable using port 80. External name and name of the machine are different. We're getting System.ServiceModel.EndpointNotFoundException: The message with To '<url>' cannot be processed at the receiver, due to an AddressFil...

How do I set an image for some but not all nodes in a TreeView?

I have a TreeView windows forms control with an ImageList, and I want some of the nodes to display images, but I want the others to not have images. I don't want a blank space where the image should be. I don't want an image that looks like the lines that the TreeView would draw if it didn't have an ImageList. How do I get it to draw ...

Generate kerberos ticket using .NET

I want to generate a Kerberos ticket using .NET with auth credentials supplied through a login form on a web page (this will authenticate user against in a sql db) and then use this ticket to authenticate the user as a single sign on across several other web apps. Is this possible? I have had a look at WSE and it seems to assume you alr...

Passing Windows Token to WCF then from WCF to another server in the AD domain

This may be a doozy, but does anyone have an idea how to: Pass the users windows token (authenticated from domain) to the wcf service that is called - the service would then perform an action based on the users windows credentials that made the call. ie: Client -> WCF -> SOME 3rd PARTY REPOSITORY THAT INTEGRATES WITH ACTIVE DIRECTORY. ...

Obtain max length for a "string" column using LINQ To SQL

Is it possible to obtain the maximum column length for a VARCHAR, CHAR etc? ...

How do I change the URL of my web service?

If I change the url in the web.config file will the change be reflected in the .disco, .discomap, and .wsdl files that are in the WebReferences folder? [Edit] I'm using asp.net 2005 ...

Addicted to LINQ

Ok, the more I use LINQ, the more I like it! I recently found myself working in some legacy code at work. It is your classic DataSet and DataTable rich application. Well, when adding a bit of functionality I found myself really wanting to just query the rows of a DataTable for the results I was looking for. Let me repeat that... instead...

How can I know if a process is running?

When I get a reference to a System.Diagnostics.Process, how can I know if a process is currently running? ...

How do I put business logic in my ADO.NET Entity Framework classes?

I'd like to use the ADO.NET Entity Framework for data access, extend its objects for my business logic, and bind those objects to controls in my UI. As explained in the answers to another question, I cannot extend ADO.NET Entity Framework objects with partial classes and use my custom methods in LINQ queries. I don't want methods sho...