I am interested in the design patterns that where used in the development of wcf. As an example of what I am looking for: the ChannelFactory class is used to create the channel between the client and the service; does this represent an implementation of the Abstract Factory pattern or the Builder pattern? Or a combination of the two? ...
I converted my VS 2008 project into vs 2010 but kept it on .NET 3.5 framework. I don't set my locale anywhere within the app.
I've got a couple on computers running windows 7 and XP and both have the region set to EN-AU.
Sometime my app returns the short date format like MM/dd/YY (EN-US). As soon as you quit it and start again it reve...
Is an atomic read guaranteed when you mix Interlocked operations with lock() (and other higher-level locks)?
I am interested in general behaviour when mixing locking mechanisms like this, and any differences between Int32 and Int64.
private Int64 count;
private object _myLock;
public Int64 Count
{
get
{
lock(_myLock)
{
...
I created a control where other developers can create an instance and use. There is a button click in the control. How do I allow developers to plug in their own code in a certain part of my control? I am not sure if or how exactly to use a delegate or event in this scenario. Can someone help in the below example:
public class MyControl...
I'm sure this is a very noob thing to ask but I can't seem to find the information...
I've got some Obejct serialisatino and deserialisation that occurs in my program. The objects have nullable fields one of which is a field called DefaultValue and is an object reference.
When this object reference is null before serialisation, the de...
If I run a process with ShellExecute (or in .net with System.Diagnostics.Process.Start()) the filename process to start doesn't need to be a full path.
If I want to start notepad, I can use
Process.Start("notepad.exe");
instead of
Process.Start(@"c:\windows\system32\notepad.exe");
because the direcotry c:\windows\system32 folder i...
I am hosting a WCF service in IIS. Randomly lately I have been getting an error that takes down the service:
The assembly it is looking for is located in the C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files folder. Im thinking an improper app pool shut down would cause this, but I am not sure. The server is a W...
Is there a way to find all event handlers for a Winforms control? Specifically statically defined event handlers?
...
our C# application has a thirdparty C++ exe which requires Microsoft_VC90_CRT assembly. I have add that assembly in my msi installer which is built by using VS2008. It looks like that assembly is still not available to our application.
Is there any special step I need to do when I build my installer? or it is the wrong version of the a...
I've inherited a pile of code for a web app which contains oodles of hard-coded paths. I've been tasked with trying to get it to run using https://.
Other than detecting "https://" in the URL is there a more inband way to detect that the current context is https?
Looking for something like:
System.Web.HttpContext.Current.Request.U...
I currently have a WCF service which provides an object graph of data on request. I want to have a mechanism where the client can compute a hash on the cached object graph it posses and can then supply this hash value to the WCF service to see if it matches the data the service possesses.
I tried this using a standard cryptographic algo...
Here's the situation: I have a client who's issued me an XML schema, and my software converts their records from tab-delimited to XML.
One of those fields, "file-sequence," is typed as an integer in the schema. However, the client's client (the integration target) wants that integer zero-padded and 4 digits long (EG, <file-sequence>0001...
I'm trying to make a Parallel Helper class (ParallelRunner) that can be used by like in the RequestService class:
public class ParallelFunction
{
public ParallelFunction(Func<object> function)
{
Function = function;
}
public T GetResult<T>() where T : class
{
return (T) Data;
}
public Func<o...
I'm trying to come up with an compiled query using Entity SQL and I'm getting this error on ToList() line:
LINQ to Entities does not recognize the method 'System.Data.Objects.ObjectQuery`1[BLL.Company] OrderBy(System.String, System.Data.Objects.ObjectParameter[])' method, and this method cannot be translated into a store expression.
He...
I'm trying to build a web service using WCF. Since the service will ultimately be consumed by non-.net languages, I've been attempting to test it using "Add Web Reference" or using WSDL.exe instead of the svcutil way. I've been getting the following errors though:
From WSDL.exe
- Error: Unable to import binding BasicHttpBinding_IEchoSe...
I'm creating a WiX-based installer for my .NET-based website.
Part of this website involves the performance counters which I would like to create using the installer (counters require elevated permissions to create, something the website should never have).
I have read the documentation provided by WiX on the subject of installing coun...
I have silverlight problem I'v used two days to fight: a template with a style controls a button. In the concrete button I have a canvas with paths as content. The problem is that I want the paths fill color to bind to the Foreground from the ContentControl in the template.
However, I haven't been able to figure out how to construct th...
Using AJAX to pull data from a dynamically generated XML using .NET. Using simple jQuery Ajax:
$.ajax({
type: "GET",
url: "/test/dynamic.aspx",
success: function(xml) {
var itemTitleSrc = $(xml).find('ItemName').text();
alert(itemTitleSrc);
}
});
In Firefox, Chrome, Safari, the alert brings back all of the strings associate...
Can I develop a control which allows me to do something like this:
<MyRadioList>
<MyRadioButton/>
<MyRadioButtonWithInfoButton/>
<MyRadioButton/>
<MyRadioButtonWithBlueColor/>
</MyRadioList>
That is, I can place my own control-tags inside my radio list.
Can it be done with templated user controls?
...
Hi, see below program.
I start a new thread x with function abc, then I do some longer task.
Why does x only start after end sub? Shouldn't it start right-away, before sleep ?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As New Threading.Thread(AddressOf abc)
...