.net-3.5

Unable to use 80 as a HTTPS port in IIS6 when .NET Framework 3.5 is installed

After upgrading to .NET Framework 3.5, I can't set 80 as a HTTPS port in IIS6. Only when I uninstalled .NET Framework 3.5, IIS accepts 80 as a HTTPS port again and operate normally. The question is whether this behaviour is by design or a bug results from unexpected interaction between IIS and .NET Framework 3.5. To my understanding, D...

Is it a good idea of offer to install Framework 3.5

I would like the next update of our C# application to be the last one targeting the 2.0 Framework, and the following one to target framework 3.5. The application will be installed on a share on the client's server and accessed from a load of client machines which will need to have Framework 3.5 installed, hence all the users will receive...

DataGridViewCell Background Color Change Without Losing Focus

In VB .Net 3.5, is it possible to change the color of a DataGridViewCell (unbound) to a different color and have the cell visibly change before losing focus or leaving the cell? I have a timer that's running that queries with the data present and I'd like for the colors to change immediately instead of after the user leaves the cell. I'...

When does the DataContext will open a connection to the DB?

I am using L2S to access my MSSQL 2008 Express server. I would like to know when the DataContext will open a connection to the DB? and will it close the connection right after it opened it? For example: var dc = new TestDB(); // connection opened and closed? dc.SomeTable.InsertOnSubmit(obj); // connection opened and closed? foreach...

Windows Explorer-like search box on Aero glass frame with WPF

I'm extending the Aero glass frame into the client area and want to place a search box on the extended frame, just like it Windows Explorer does: The default WPF text box has a grey/blue border though, and not the dark, white glowing border that can be seen on the screenshot. How do I change the WPF text box to use the same style as ...

How can I make a WPF element resize after rotation, rather than before?

I have a simple, horizontal <Line> element. This line has a RotateTransform applied to it, which slants the line at whatever angle I choose. The problem is that the rendered length of the line is calculated before the transformation is applied. The result is that the line no longer fits its parent element after it is rotated. My curre...

How to register form for WM_DEVICECHANGE message in windows mobile

Hi.. i am using c# .net 3.5 compact framework to write code.. please can any one tell me how do i register a form for WM_DEVICECHANGE and how to handle that message in windowproc.. if i do this i get intimation of device hardware change.. i m not getting how to write please tell. Thanks ...

How to get the bound

Hi, i have an image list, i am drawing it on form list-control. i will get image bounds when the images gets added to list. and it will come to draw-event there i get bounds. instead how to get the bounds width and height at form-load.. i mean before drawing. how to calculate it?. i am using .net3.5 CF framework ...

check if value is entered for datetimepicker?

How can I validate that a value has been selected in a datetimepicker control. The control is bound to a bindingnavigater so when the save button is clicked I want to ensure a date has been selected? ...

Unable to modify ACL Perms in C# on CommonAppDataPath directory

So I am trying to modify the permissions for the BUILTIN\Users group to at least have the Modify file system access right. Unfortunately, my attempts at using the below code produce unchanged ACL. SecurityIdentifier usersSecurityIdentifier = ntAccount.Translate(typeof(SecurityIdentifier)) as SecurityIdentifier; ...

.NET WebTest Custom ValidationRules - How to unit test?

I'm creating custom ValidationRules for a .NET webtest. Is there some easy way to create unit tests for these validation rules? ...

Is it advisable to use HashSet as a static global on a webserver?

I want to create a "temporary cache lookup" to speed up a file lookup on my webserver. What I have now is a folder full of images, and if a user requests an image I use a File.Exists(...) to check to see if the image exists. If it doesn't, download it from another server, and either way, redirect the user to it. The problem with this ...

Inline functions in dotNet 3.0+ with C#?

I am looking for a trick in newer dotnets where I can use inline functions that return a string value. Here's what I have: var split = new[] { " " }; var words = SearchTextBox.Text.Trim().Split( split, StringSplitOptions.RemoveEmptyEntries); var textQuery = /*inlinefunction that operates on words array and r...

Am I getting left behind by not using the new features of the .NET framework (.NET 3.0 & 3.5)?

Where I work I see a lot of otherwise very talented C++ developers produce ugly C# code, purely because they are not as familiar with the .NET framework and the features of C#. Now I only started programming relatively recently, but already wheras I am very familiar with .NET 2.0 I find myself rarely (if ever) using any features of .NET...

How can I trigger a control event when a ListViewItem is selected?

I have an image that I want to show only when a ListViewItem is selected. The code I have isn't working, but I think it illustrates what I want to accomplish. <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <Image Height="20"> <Image.Style> <Style TargetType="{x:Type Image}"> ...

Programicatlly visit (all) ASP.Net page(s) in a website?

In the Security model for out ASP.Net website (.Net 3.5) we store the page name: page.GetType().Name as the primary key in a database table to be able to lookup if a user has access to a certain page. The first time a page is visited this record is created automatically in the database. We have exported these database statements to i...

Changing Currency Symbol location in System.Globalization.NumberFormatInfo

I created a CultureInfo object using new CultureInfo("fr-FR"). Now I have a number that I want to call .ToString("C", FrenchCultureInfo). The resulting string puts the € AFTER the number. Why? CultureInfo french = new CultureInfo("fr-FR"); double value = 1234.56; string output = value.ToString("C", french);//output = "1 234,56 €" F...

How to deploy a COM

I just finished building my new COM project (C#, .NET 3.5). This project will be called by a VFP application. It's working great on my development machine, but now I need to know how to deploy it on the user's machine. Click Once isn't available for this kind of project, so I guess I'm stuck with manually distributing the DLL. So, where...

How can I apply a GradientBrush to multiple consecutive objects in XAML?

I have a TextBlock and a Line sitting next to each other in their own exclusive StackPanel. I need to spread my LinearGradientBrush across the two objects, rather than shading them individually. My project currently looks like this: <StackPanel Orientation="Horizontal"> <TextBlock VerticalAlignment="Bottom"> SomeT...

.NET Framework Namespaces?

What is a really good book that lists and explains all the namespaces of the .NET framework. version 2 (3/3.5 is a plus)? ...