.net

How to synchronize updates at different sites? .Net

I need to synchronize 2 sites content. Every post in first should be mirroring at second and vice versa. What is the best way to do it using .Net - just simple web service which check every time interval updates and post it, or maybe smth else, like sync framework? can't find good example to do it. ...

How to add a shortcut to the exe file in the setup project?

How to add a shortcut to an exe file in the setup? I've created an app and a setup project for it. I've followed the steps here but it doesn't work - it creates shortcut to the original file (C:....\Visual Studio 2008\Projects...") so it works only on my computer. It doesn't point to the real output file. ...

Setting the i-th value of a SortedDictionary

I need to set the value of an element in my sortedDictionary, accessed by index. I.e. sortedDictionary.Values[index] = value; // compile error Note that the following is incorrect because it's accessed by key, not index. sortedDictionary[index] = value; // incorrect I came up with the following solution, but intuition tells me it'...

Convert Actionscript date string

I'd like to convert a bunch of date strings like the following Mon Aug 7 15:32:52 GMT+0900 2007 to C# datetime objects. Is there anything built in to the .net framework to do this or will I have to parse the string into date parts? Many thanks, ...

what should be done for elements of the same name

Hi, I have a small issue with one of my projects, I have an entity called Image which is used to stored information about uploaded images in a CMS system I have created. This hides the system.drawing.image this was not an issue until I needed to start doing image manipulation on a page which uses both classes. At the moment in the dec...

Regular expression to check the string containing Only alphabets,numbers 0-9 but maximum only 2 digits,spaces are allowed,and upto 1 hyphen,1 comma are allowed?

The string can have Alphabets [a-zA-Z] It can have numbers [0-9] but min 0 and max 2 spaces are allowed And for special characters max 1 hyphen, and max 1 comma ...

Java or mono for a new project

Hi, I need your advice about framework selection (Java vs Mono) for a new large scale web project which will be developed for linux hardware. Which platform do you prefer and why ? Best Regards, Sirmak ...

[IDesignerHost/DesignSurface] Catching mouse move.

Hello, Situation : I'm currently working a project where the aim is to develop a VS-like IDE, where users can drap/drop new controls to a design surface, and modify properties of these controls. So i implemented IDesignerHost, IServiceContainer, IContainer, IComponentChangeService, and some others useful interface, made to design that...

multi threading a web application

I know there are many cases when it's best to multi thread an application but when is it best to multi thread a .net web Application? ...

PKCS11 certificate

Does Dot NET supports PKCS11 certificates for HSM devices. If not, are there any other third party utilities available which supports pkcs11 certificates? ...

Unauthorized on access to WSS spsearch.asmx

Hi, I am running an ASP.NET web application that connects to the WSS 3.0 search web service (spsearch.asmx). The WSS site itself is configured for anonymous access: site search works with chrome, firefox and so on without the need of an authorization. I also set anonymous rights for the spsearch.asmx, but I get an Unauthorized when try...

Syntax error when calling a stored procedure. I can't see what the problem is

I am having trouble calling the following stored procedure. When I call ExecuteReader, I am getting the error 'Incorrect syntax near 'GetAverages2'. I can create the stored procedure and call it from TSQL. I can't seem to get it working from ADO: CREATE PROCEDURE GetAverages2 @CompanySize INT, @Q1 FLOAT OUT, @Q2 FLOAT...

VS2008 on Win7 64-Bit: Debugging a Windows Service

Hi all, I'm trying to debug a Windows Service using VS2008 on Win7 64-Bit. The problem I'm having is that none of my breakpoints are being hit, regardless of which build configuration I choose: x86, x64 or AnyCPU. Using "Attach to Process" after the service has started, none of the breakpoints are hit - yet the IDE doesn't inform me th...

Making Infragistics UltraGrid Columns have "Spring" Behaviour

Oout of the box the Infragistics UltraGrid control allows you to make the last column in a grid spring to fill the remaining unused portion of the grids bounding rectangle. ____________________________ | Col1 | Col 2 | Col 3---->| | | I have searched but cannot find a method of making a column that is not the ...

Date and time library with period support for C#/VB.NET?

I am looking for a library doing set operations on time periods with support of weekdays and time of day. I have started to roll my own, but it seems like a error-prone job so I would like a tested solution for this. I don't mind spending money. If I have a set of two time periods (this can be several) Setup: // [period 1]: TimeSet.Ad...

Best way to seed Random() in singleton

I have a method in a singleton class that need to use the .NET System. Random(), since the method is called in a multi-threaded environment I can't create it only once and declare it statically, but I have to create a Random() object each time the method is called. Since Random() default seed is based on the clock ticks it is not random ...

Linking from a https page

This sounds like it should be a common problem but I can find little solutions to it. Basically relative links on a https page (often found within controls and the master page) will obviously link to non-secure pages as https which is undesirable. A possible solution was to use the base tag in the head of the page to root all relativ...

Unhandled GeneratorExitException thrown while importing library in embedded IronPython

I have IronPython embedded inside a C# application. I let users write IronPython scripts, in which they can import a set of the standard libraries shipped with IronPython. In these scripts when a user imports the "random" library or the "filecmp" library, an unhandled GeneratorExitException is thrown. Other libraries like math, re, str...

operator overloading .net

What scenarios would you consider operator overloading in .net? ...

VB.NET: end-of-line identifier?

What end-of-line identifier should I use (e.g. for output to text files)? There are many choices: vbCrLf ControlChars.CrLf ControlChars.NewLine Environment.NewLine A static member in some C# class in the application (requires mixed-language solution): public static string LINEEND = "\r\n"; What is best practice? ...