.net

.NET 3.5 (C#) Named pipes over network

I'm struggling to get a .NET (NOT a WCF) named pipe to communicate across the network. The MSDN documentation implies this is possible, nay trivial. But my code: using (NamedPipeClientStream pipeClient = new NamedPipeClientStream(servername, "myPipe", PipeDirection.InOut, PipeOptions.None, TokenImpersonationLevel.Impersonation)) ... ...

WinDbg/SOS: Explanation of !SyncBlk output

Hi! I am looking of a description of the output generated by the !SyncBlk command of SOS. Particularly I found no useful explanation on the column "MonitorHeld". This column shows high values in a series of crash dumps. Example: 0:000> !SyncBlk Index SyncBlock MonitorHeld Recursion Owning Thread Info SyncBlock Owner ...

Get Jira Tickets from .NET to create release notes?

Some background: I would like to automatically create a readme.txt or release.txt file for my project from Jira. For that I would like to know if there is a way to retrieve all closed tickets starting a given ticket Id for project X? I was thinking to do that from my nant script or maybe from my c# code. Is this is a good way or are ther...

Difference between PayPalAPIAASoapBinding and PayPalApiSoapBinding

In .NET - standard web services (.NET 2.0), I see the following: PayPalAPIAASoapBinding PayPalApiSoapBinding Ok so the API methods are split between the two. I want to know what's the termonology here. Why is it split? What's AA vs. just Api in context to PayPal termonology? There has to be a reason that .NET splits it like this. ...

Accessing dynamically created elements from inside of a repeater.

I need to create a series of dynamically created buttons inside of a repeater. These buttons names are coming from a database. When a user clicks a button, some hidden text beside the name appears. And disappears when clicked again. The text will have to be either defined in the html or the code behind. Here is some code to demonstrat...

DLL Hell - Need to have C# assembly (DLL) link to C DLLs from a specific location

This problem of mine has me pulling my hair out. It's related to the issue I had earlier with needing to write a Mutex that will get destroyed when going out of scope. It turns out that I was stupid and didn't need the Mutex -- the things I needed to lock out wouldn't observe the lock because they were actually being called from the sa...

Building an ASP.NET MVC Master Page Menu Dynamically, Based on the current User's "Role"

I've seen some similar questions, but none that look like what I'm trying to do. This is my current implementation w/out any security: <div id="menucontainer"> <ul id="menu"> <li><%= Html.ActionLink("Main List", "Index", "AController")%></li> <li><%= Html.ActionLink("Product List", "Ind...

.NET Regex for "not this string"

I'm a regex newbie and need a single expression that: matches the "an" and the "AN" but not the "and" or "AND" and matches the "o" and the "O" but not the "or" or "OR" in this predicate: 1and(2or3)AND(4OR5)an(6o7)AN(8O9) Basically I can't figure out how to convert the expression: var myRegEx = Regex("[0-9 ()]|AND|OR") into a "ever...

What the negative impacts of setting ImeMode to Off

I've got a Winforms application that I am in the process of translating into Chinese. I've got a numeric text box that validates the input with a regular expression. When the user is entering text with IME, numeric digits don't seem to come in as numeric digits. On possible work around I have found is to set the ImeMode property of the...

Built in .NET function for unescaping characters in XML stream?

So, I have some data in the form of: &lt;foo&gt;&lt;bar&gt;test&lt;/bar&gt;&lt;/foo&gt; What .NET classes/functions would I want to use to convert this to something pretty and write it out to a file looking something like this: <foo> <bar> test </bar> </foo> Be specific on the functions and classes please, not just "us...

Distributed computing with different random number generators

I have a computation/simulation system with one master server and (potentially) many clients (workers). All of them are working with the same data but need random numbers for the computation. What would be the best PRNG and the best way to seed it to make sure that two clients aren't using the same cycle and computing the same results t...

Click-Once Deployment Overwriting User Settings

Click-once deployments are suppose to maintain user settings, but on this one application we have the user settings are overwritten to the Visual Studio default every time we publish an update. Any ideas of what might be happening? ...

Missing line number in stack trace eventhough the PDB files are included

This is running me nuts. I have this web service implemented w/ C# using VS 2008. I publish it on IIS. I have modified the release build so the pdb files are copied along with the dlls into the target directory on inetpub. Also web.config file has debug=true. Then I call a web service that throws an exception. The stack trace does not...

SQL CE ORMs for .NET CF

Hopefully this isn't a duplicate, but does anyone know of any (good) ORMs that work with SQL Compact Edition, and can run in the .NET Compact Framework (e.g. Windows Mobile 5->6.x)? ...

.NET GZipStream, and out of disk space exception

I am using the following code to write to a compressed file that I create new everytime. using (FileStream fs = File.Open(sortOrderFileName, FileMode.Create,FileAccess.Write, FileShare.ReadWrite)) using (System.IO.Compression.GZipStream gzip = new System.IO.Compression.GZipStream(fs, System.IO.Compression.CompressionMode.Compress)) usin...

How to deal with malicious web requests

In our .NET app we get requests for files like _vti_bin/owssvr.dll (which can be hack attempts). I'd like to handle them by doing something like adding the following code to Application_BeginRequest: if (HttpContext.Current.Request.Url.ToString().Contains("_vti_bin/owssvr.dll")) { HttpContext.Current.Response.Clear(); ...

What does setting Thread.Priority = Lowest really mean?

In an effort to speed up the startup of my resource-hungry app, I've moved various startup tasks to background threads and marked those thread with 'Thread.Priority = Lowest`. However, those low priority threads still execute pretty much in parallel with the application (as it loads its UI), as evidenced by the timeline on the ANTS Prof...

WPF: Why would this cause a stack overflow exception?

When I add this style, it breaks my application with a StackOverflowException. <Style TargetType="GroupBox" BasedOn="{StaticResource {x:Type GroupBox}}" > <!-- <Setter Property="Background" Value="{DynamicResource WindowBackgroundBrush}" /> --> </Style> In case it matters, I'm using the ShinyBlue theme. Any ideas what would cause thi...

When overriding a method from a parent class; what does NotImplementedException() mean?

Here's an example: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SharpLibrary_MediaManager { public class Picture:BaseFile { public override void GetFileInformation() { throw new NotImplementedException(); } public override void GetTh...

Any hack/workaround to get silverlight with RIA services with VS2010 with .NET 3.5 framework?

Realized that VS2010 Beta2 has separate WCF RIA installation package which only works with .NET framework 4.0. Searching the google did not give me any pointer as of now. Is there anyway to get WCF RIA in VS2010 working with .NET 3.5 as the targeted framework? I am even fine with VS2010 not able to work with .NET 4.0 on that machine if r...