.net

How to use double quotes in a string when using the @ symbol?

I need to use double quotes in a string that uses the @ symbol. Using double quotes is breaking the string. I tried escaping with \, but that doesn't work. Ideas? ...

Creating a Non-Blocking Process in an MVC 2 Application

I'm faced with setting up a system which will allow users to: Hit a button to initialize a "download & archive" command, which reads file lists via XML, pulls files over HTTP to a local directory, archives them, and stores them away for download. Get a progress bar/indicator telling them their "request is being processed" immediately a...

Monitor Install/Uninstall of Fonts on Windows

I'm kind of shooting in the dark here - searches don't seem to be productive on this. I want to create a .NET program to monitor the install and uninstall of fonts. If something is installed or uninstalled, I want to run a program to do something. I thought maybe a Windows Service, but haven't gotten very far with figuring out how to mo...

How to mock objects using MSTest?

I'm new with MSTest (Visual Studio 2010). Is there any integrated mocking framework that comes with VS2010? Or is there any other good mocking framework that's easy to pick up that I could use? ...

Is it possible to create a reference-cycle using only value-types?

By way of explanation, take this value type in C#: struct ObjRef { public object Value; public ObjRef(object value) { Value = value; } } I can imagine an object graph where there are two boxed instances of this type, each holding a reference to the other. This is what I mean by a reference-cycle with only value-types. My ques...

multi computer map-reduce in C#

Is there a simple Map-Reduce library or implementation for .NET that allows a task to start on one computer and be split amongst multiple worker computers, perhaps using WCF or something else bit more efficient to manage the inter machine communication? I looked at Microsoft's Dryad but from the docs it seems it is more intended for lo...

Create thread just like if it were a separated application in C#

I've been having a bunch of exceptions when trying to use a WebBrowser on a multithread application. COM component, protected memory and other exceptions everywhere I do stuff with the WebBrowser. I just gave up and went back to my single thread version which works fine. I would post code but it's hard to localize the cause of the proble...

best book for bit/binary manipulation

I've looked at some interview questions and they required heavy bit manipulations. Could anyone please recommend a good book that would allow me to polish my skills in bit manipulation ? (from beginner to intermediate/advanced) with good exercises to pratice ? ...

How to create a .dbf file using c#?

I am trying this to make a select and it works just fine string str = "SELECT * FROM FREE RIGHT JOIN TestTest ON FREE.DOCNO = TestTest.DOCNO"; DataTable dt = new DataTable(); OdbcDataAdapter da = new OdbcDataAdapter(str, odbconn); da.Fill(dt); I am trying this to create a .dbf and i get this OdbcException : string str0 = "Create...

clientaccesspolicy.xml in Silverlight

I realise this question has been asked 100 times, but i've looked through the other answers and can't find a solution that works for me. I have a SilverLight 4 project which contains a WCF service. every time i make a request to the service i get this error: An error occurred while trying to make a request to URI 'http://localhos...

.NET Design question

All, I have a very general question regarding a future project. I need to build a piece of engine software that accepts a big variety of inputs (as simple as plain numbers and as complex as multiple arrays of different data). This software will process the input and provide a calculated output. The preference is to make it quite generi...

VIP WCF, Only My Application can see but no else can see any reference at all

There is a WCF I created on the server, running. And I built an application that connects this url. This is an exe that can be run in every PC. The thing that I want, only this app can see this WCF, and can use its utilities, the others can see nothing, no url , no reference, no wsdl of the web service. How can I create this environmen...

How to use identity on a column in .dbf ?

Hi I am using this code to create a .dbf file and it works fine ( i use OdbcConnection ) string TblInventory = "Create Table Inventory (Id int , Date datetime, CreatedBy char(100))"; OdbcCommand cmd = new OdbcCommand(TblInventory, odbconn); cmd.ExecuteNonQuery(); Insert works well: "Insert Into Inventory (Id, Date , Creat...

Can Ebay Finding API search by Category?

Hi, Is it possible to search by category using the Ebay Finding API? If not do I need to use a different API? I am doing this using C# and can't find any examples of searching by category ...

.NET Package Management

What are the current offerings for .NET package management. Which are you using and what are the pros and cons? Some examples out there today are: Nu OpenWrap For the avoidance of doubt, I'm referring to package management systems such as gem, apt-get, and dpkg. ...

Prompt wall publish (Facebook) using Old Rest API

How to prompt dialog to the user, to publish something on user wall (Facebook) using old rest api for C# and ASP.NET??? Because while using Api.Stream.Publish, it directly publishes on the user's wall without asking to the user. ...

Generic Queries with Entity Framework

I have a Entity model that includes a large number of lookup entities. All have just ID and Name properties. I do not want to build large number of DAL classes to simply have something like: IList<Lookup1> lookup1List= ctx.Lookup1.ToList(); and another class (Or method) with IList<Lookup2> lookup2List= ctx.Lookup2.ToList(); and a...

Call to .NET web service timed out (Android dev using KSOAP2)

I'm getting a Java Socket Exception "Operation timed out" when trying to call a .NET web service method. I've followed the many examples out there on the web to get my android to call a .net web service. I'm running the web service using VS2010 in debug mode. The web method I'm calling is very simple -> "string GetVersion()" I've rea...

validation issue

how to make button cause validation for some controls and other not.. i have button .. and i have link button in gridview . i have textbox ..(has required field validator) and i have textbox in the gridview.(has required field validator) what i wanna is : when click the link button is to validate only the textbox in the gridview. a...

Convert Multi-Dimensional Array to String and Back

I have a 2D array that I need to be able to convert to a string representation and back to array format. I would like to create a generci method that will handle any array 1d, 2d, 3d etc. so I can reuse the method in future. What is the best way of going about this? string[,] _array = new string[_helpTextItemNames.Count, 2]; ...