I have a network directory that has a dump of all employee pics here at our company. The images are named FirstnameLastinitial.jpg. I ultimately am trying to build a photo browser of these pics in Silverlight but I thought I would start with how to harvest the Pictures from that location.
I would imagine that I should generate an XML ...
We are working on a solution with various projects inside of it, the bulk of which is inside our Domain class library. This project contains a app.config file with various settings. The stripped down structure of the solution looks like this:
Solution
Domain project
app.config
Integration tests project
app.config...
I have a windows service that is running under the credentials of the system account. The service periodically polls windows for the active console session id, i.e. the interactive logged in windows user, and then retrieves the user token associated with the active console session id by pinvoking the wtsapi32.dll function WTSQueryUserTok...
I've written a class and many unit test, but I did not make it thread safe. Now, I want to make the class thread safe, but to prove it and use TDD, I want to write some failing unit tests before I start refactoring.
Any good way to do this?
My first thought is just create a couple threads and make them all use the class in an unsafe w...
My database tables are as follows:
Users (UserId, Name)
Friends (UserIdFrom, UserIdTo)
I also have an ADO .NET entity data model that describes these tables.
My .NET entity data model has an entity named Users and an association for that entity called Friends that corresponds to the Friends table.
My question is that I want to get a ...
I'm making a Windows Forms application which has a standard DataGridView in it. The DataGridView has several DataGridViewComboBoxColumns in it. And they are a pain to work with. To get one of them to open up (as in, drop down the list), you have to click the cell at least 3 (!!!) times. Seems that the first click ends the editing of the ...
We are trying here to localize our user control basically we want to be able to do something like this :
<in:Banner runat="server" ID="banners" Lang="fr" />
The way we do this is by page level and send it to master that then send it to the control:
protected void Page_Load(object sender, EventArgs e)
{
Master.Lang = "FR";
}
Th...
Hello,
I'm looking for a free .NET (C#) library which i can use in my program and simply draw UML diagrams (especially class diagram). I tried to used Netron Diagramming Library but it is kind of tricky. Thanks in advance.
...
i have several classes in my service layer.
i want to before call methods of these(every class),call they method of a spesific class after the spesific class call them.how is that possible in c#?
example at ASP.NET MVC :
CONTROLLER CLASESES -> A SPESIFIC CLASS -> SERVICE CLASSES
because i need to central logging,exception handling,ch...
Hi all,
While developing & learning with Entity Framework, I'm having a curious problem with inserts when I run the tests for one entity in my model. In concrete, the problem is when running some tests together. I'll explain myself:
I have one entity in my model called "DtoCategoria", with 2 members: id:Int32 and name:string, mapped to...
I'd like to read in the following XML:
<node></node>
And then write it out, minified, like this:
<node/>
Obviously this has the same meaning, but the second file is smaller for sending across the wire.
I'm trying to find a way to do this in .NET. I can't seem to find an option or setting that would drop unnecessary closing tags.
...
In my company I am responsible for the development of a .NET CF application which runs on top of Windows CE. We have invested much time in the development of a GUI framework, a top-level design which handles authorizations and navigation on the device, a IoC customer, ...
Now I was wondering if there are any other projects which show ki...
How do I specify the contract in C# code? I want to remove dependency on config file, and getting error:
Could not find default endpoint
element that references contract
'TFBIC.RCT.HIP.
Components.RCTBizTalk.WcfService_TFBIC_RCT_BizTalk_Orchestrations'
in the Servic eModel client
configuration section. This might be
becau...
As discussed here, I'm trying to add a WCF endpoint-extension; I've got it working, but I need to include the full assembly details:
<extensions>
<behaviorExtensions>
<add name="protobuf" type="ProtoBuf.ServiceModel.ProtoBehaviorExtension, protobuf-net, Version=1.0.0.275, Culture=neutral, PublicKeyToken=257b51d87d2e4d67"/>
...
I seek some insight in creating an application that converts text to speech in ASP.NET. From my initial research, it appears that:
MS SAPI requires the client to download an ActiveX component and can support large amounts of text to be converted. Our clients are not willing to install any components on their systems, so this approach m...
In C#, what's the simplest/safest/shortest way to make a file appear as though it has been modified (i.e. its last modified date) without changing the contents of the file?
...
Suppose I have linq expression q, then I want to add a sort to this query:
q = q.OrderBy(p => p.Total);
but for sort, there is desc/asc option for SQL, how to add it in above linq expression?
...
I'm using BinaryWriter to write records to a file. The records are comprised of a class with the following property datatypes.
Int32,
Int16,
Byte[],
Null Character
To write each record, I call BinaryWriter.Write four times--one for each datatype. This works fine but I'd like to know if there's any way to just call the BinaryWriter.Writ...
We are using a custom API in our project which provide an attribute for class fields/members which lets the interface to present a popup of some range values like "On/OFF" and pass the corresponding values of the choice to our code. The attribute requires a string array to know that values.
We have many enumerations defined for these ra...
Hi all,
Got a .NET/C# question...
I need to parse some input post data thats in a "multipart/form-data" format to extract the passed username and password. Anyone know how to do this without writing my own parsing code?
Note the input post data looks something like this:
---------1075d313df8d4e1d
Content-Disposition: form-data; nam...