.net

OData and custom WCF WebGet methods

I've created an OData endpoint (using entity framework, WCF data service) and added a custom test WebGet test method like so: [WebGet(UriTemplate = "{text}")] public IQueryable<string> SplitString(string text) { if (text == null) throw new DataServiceException("text not specified"); var result = (from s in t...

Checking for updates at startup

Let's consider a WPF client-server application. What is the best practice to create the client, so that every time it is launched, it checks for updates and if any available, update the client application? ...

Regular expression problem

Hi, How can I search a whole string for a specific match. It'll contain both characters with int or decimal numbers eg A12B32.25C-456D-75.E75 I'll know that this will start with A and ends with E I think I can use "^" and "$" right? but i'm bit lost in other parts to check for character and int or decimal. I'll be glad if you can give t...

Logging to ProgramData folder with Enterprise Library

How do I configure the Enterprise Library Logging Application Block to place the log files in the ProgramData folder? AFAIK it's only possible to use relative paths (from the installation directory) or absolute paths to set the location in EntLib configuration. ...

Which .NET ORM has best support for PostgresSQL database

I'm interested to find out which ORM has best support for Postgres SQL database? Does any mapper have, both, LINQ support and ability to generate model from database? ...

How to check offline for Facebook permissions

Hey all, I have Facebook Toolkit for .NET and I am trying to check whether my application has permissions for a user. I have the userId of the user, and I am trying to do: _facebookAPI.Session.RequiredPermissions = listExtended; _facebookAPI.Session.SessionKey = Resources.FbApplicationKey; _facebookAPI....

Parsing concatenated, non-delimited XML messages from TCP-stream using C#

I am trying to parse XML messages which are send to my C# application over TCP. Unfortunately, the protocol can not be changed and the XML messages are not delimited and no length prefix is used. Moreover the character encoding is not fixed but each message starts with an XML declaration <?xml>. The question is, how can i read one XML me...

How to Set Up Winform Textbox Field Focus so a User Can Go Through Them by Clicking Tab Button?

UI is created in VS 2008. I'm using C# .... I need to let the user move/focus between text fields from top to bottom by clicking tab button. How can i do it? ...

How can I serialize this .NET Collection item?

Hi folks, I'm trying to xml serialize a POCO view data class into xml. It serializes, but incorrectly generates some xml. eg. (current result .. not the one I'm after) <ReviewListViewData> <reviews> <review>....</review> ... </reviews> </ReviewListViewData> I'm trying to get (notice how I've removed the bad r...

w3wp.exe in ASP.NET production app is using 100% CPU. How to find the problem ?

Hi, we have an asp.net app in production where w3wp.exe is taking 100% CPU ( 4 cores - 4 threads at 25% ) and cpu load never goes down until we recycle the application pool ( the app is alone in the application pool ). Our error log has nothing, there is no exceptions being emitted ( or at least we don't catch them ) so we suspect it's ...

JSONP Implications with true REST

From my understanding JSONP can only be achieved using the GET verb. Assuming this is true which I think it is, then this rules out core compliance with true REST in which you should make use of different verbs i.e. GET,PUT,POST,DELETE etc... for different and specific purposes. My question is what type of barriers am I likely to come ...

Microsoft Enterprise Library alternatives

Microsoft Enterprise Library has somewhat controversial feedback. Some developers like it, some say it is overengineered. Are there any alternatives to it? Both free and commercial. ...

mdi child forms slow to draw when visibility changed

My application has the following UI configuration: The main form is an MDI container. Its child forms are attached to a TabStrip. Each user has his set of child forms. Depending on the active user, only that user's child forms are displayed, together with tabs. This is achieved by going through the main form's MdiChildren and setting ...

how to add a string array to a node in xml c#

i have a node <name></name> where i put name, now i want to put array of names there. Thanks in advance ...

Add Reference to a WCF Service Executable

I have 3 projects in my solution. 1 - client, 2 - server, 3 - WCF service library. Server executable exposes the service provided in the library. I need to add a reference to it, rather than to the library directly. When I open "Add Service Reference" and click "Discover", it only lists the library data, and doesn't list the executable s...

WCF configuration file: why do we need clientBaseAddress in Binding section?

Hi, There are three sections in WCF configuration for service client: Look at bindings => clientBaseAddress Why do we need to specify callback address? Is this field required? Why .NET is unable to determine the address of client? Does it mean that i can specify client endpoint that is located on some other machine? <configuration...

XML size limit for XslCompiledTransform.

Is there any limit for XML size for which XSLT is applied by XslCompiledTransform in .NET (3.5)? Also, is there any limitation for a length of parameteres passed to XSLT? UPDATE: I have ment not the amount of parameters, but the length of a string, which is passed as a parameter and length of an XML text, to which XSLT is applied. ...

What is the difference Between String and string?

Possible Duplicate: String vs string in C# What is the difference Between String and string or Double and double? if i use : double s1; or if i use Double s1; can you give pros and cons? ...

What could be the work around for this following issue (specific to IE)?

In IE, when user uses Export To Excel (downloading .xls file) functionality in my SSL website, following error message is popping up:- Internet Explorer cannot download file from server........ This is the exact definition of the issue here:- CAUSE: In order for Internet Explorer to open documents in Office (or any out-of-proce...

Replacement for CAPICOM

Hi, all! Now CAPICOM is deprecated, and MSDN recommends to use .net classes from System.Security.Cryptography. But I have one Lotus Notes application, which using CAPICOM from LotusScript code (very similar to VisualBasic) for displaying certificates to users, and get some cert info (Subject and ValidToDate fields). How can I replace ...