.net

Paging Support - ADO.NET Entitry Framework and LINQ

What kind of paging support is offered through ADO.NET EF and LINQ? What does a "first 10" Select look-like? A "next 10" Select? ...

Which characters are allowed in a VS project name?

Does anyone know which characters are allowed in a VS project name? Is there a reference somewhere? ...

Assembly DLL management in .Net

What is the safest way to make sure IIS picks up changes to a recompiled DLL? 1. Just copy the DLL in the /bin folder? 2. Clear the application cache? 3. Restart IIS? 4. Reboot the server? Note: I'm pretty sure options 3 & 4 would work, but they might be a tad drastic in a production environment ;-) ...

Retain form data while paging through a GridView - ASP.NET

I have a GridView control on my ASP.NET page that binds to result set when the user executes a search. I create an additional TemplateField column with a CheckBox control to allow the user to select a sub set of records from the result set. I have implemented paging in the GridView control and when the user checks the checkbox control ...

What is the difference between the Visual Studio Options: ASP.NET Web Service and WCF Service

I see that there are two options that I know can be used in web services... WCF obviously, and ASP.NET Web Services. What's the difference? I just started picking up WCF recently and had a little exposure to web services in the past, but I'm certainly not an expert. ...

Posting using POST from C# over https

Hi, After wasting two days with this question (and trying to make it work), I've decided to take a step back and ask a more basic question, because apparently there's something I don't know or I'm doing wrong. The requirements are simple, I need to make an HTTP post (passing a few values) over https from C#. The website (if given the...

How to get name of windows service from inside the service itself

I have a bunch of win services written in .NET that use same exact executable with different configs. All services write to the same log file. However since I use the same .exe the service doesn't know its own service name to put in the log file. Is there a way my service can programatically retrieve its own name? ...

ActiveX Flash component in C# .NET 2.0 Application causes memory leak?

We have a C#/.NET 2.0 WinForm with an ActiveX ShockwaveFlashObject control on it. The program loops through a schedule of content and displays it over and over on the control, fullscreen, like this: axFlash.BringToFront(); axFlash.Movie = scheduleItem.FilePath; axFlash.Show(); axFlash.Play(); This works great, but after a couple of da...

How to set various properties of an object at runtime?

Say I have an xml file like: <Filters> <Blur Name="Blur01" /> <Sharpen Name="Sharpen01" Amount=5 /> </Filters> How do I set the properties of Blur, Sharpen, etc without a performance hit? I thought reflection would work, but the number of nodes and properties will be in millions, so the reflection cost would be very high IMO. ...

How to access batch files ?

I am developinga text editor for java with features like syntax highlighting and intellisense.. I am facing two problems. one i dont know how to read a line at a required index. and other how to use the batch files of java package so that the code written can b compiled. I will be grateful if anyone can help me. Thanx in advance. ...

Naming convention for Embed Resource DLL?

I have never used an embedded resource DLL before. I would like to start right so that I'd not have to rename DLL later on. Suppose that, I have a Main Exe file named "Demo.exe", how would you name embedded resource associated with it? Demo.Resource.dll? Resource.Demo.dll? etc? ...

Best and Easiest Method for inter-process communication in large project

What is the best and easiest method that can be used for inter-process communication in a very large project? My requirement is to communicate between a normal Windows Forms Application and Windows Services. Methods that are easy to maintain and implement are preferred. Thanks ...

Atomicity of File.Move

I want to rename a file in a directory as an atomic transaction. The file will not be changing directories. The path is provided as a UNC Path to an NTFS file system, probably on either Server 03 or 08. Is File.Move() atomic for these purposes? As in, it either completes successfully or fails such that the original file is still intact?...

What exceptions should be thrown for invalid or unexpected parameters in .NET?

What types of exceptions should be thrown for invalid or unexpected parameters in .NET? When would I choose one instead of another? Follow-up: Which exception would you use if you have a function expecting an integer corresponding to a month and you passed in '42'? Would this fall into the "out of range" category even though it's not ...

In what cases are detaching from events necessary?

I'm not sure if I'm entirely clear on the implications of attaching to events in objects. This is my current understanding, correct or elaborate: 1. Attaching to local class events do not need to be detached Examples: this.Closing += new System.ComponentModel.CancelEventHandler(MainWindow_Closing); public event EventHandler OnMyCust...

Why doesn't my custom control receive drag/drop events?

I've written a custom control (an immediate child of Forms.Control) in C++/CLI that will offload most of its processing and all of its painting to a separate legacy-ish MFC control. I'm wrapping this control in a C# application. I need to be able to drag items onto the C++/CLI control from a UserControl on the same form in the applicat...

http based filesystem with seek and lock support

Hi - I'm building an application that needs to use a web server like a file system. Specifically, the ideal solution would be: A server side component that would allow, via HTTP, opening (locking), reading, writing, seeking and truncating one file. I need to be able to lock multiple files simultaneously. I need this to run on any o...

What is the easiest way to clone a webservice?

I'm working on a project where we will be connecting to a Oracle webservice using .NET (c#). The only thing is that we will build our client from our office location, but our customer will not give us remote access to their web service (company policy, etc). So our solution was to visit our customer on-site and 'clone' their webservice ...

Setting CLS compliance for a .NET assembly

Setting CLS compliance for an entire .NET assembly is possible. But how is it actually done? E.g. with Visual Studio 2008? ...

Why this code is not working while it worked fine for almost a year.

Does automatic software update causes some of the module property not to work? I am really scratching my head over this function that I have posted here. They are basically the same function that reads image logo from the currently executing assembly. Function named "Get2LogoImageStream" is different from "Get1LogoImageStream" by just Cu...