.net

Are there any classes that can be queried / modified like a DB but is entirely local and internal to the program?

Are there any classes that can be queried / modified like a SQL DB but is entirely local and internal to the program? I am aiming to write a program that needs to have a local data source with all data saved in a file, but I would like to be able to query this information store just as I would a DB; LINQ compatibility would be a huge pl...

run an exe on access of folder

I have a share folder ,which i want to grant access permission to few people only at certain times.i.e. while they try to access the folder ,i should be able to either allow or deny based on my wish.In short its run time access control ,not the static access control already present in windows. Is there a provision to hook a exe as such? ...

Interop problem calling jax-ws service with complex typed parameter from .net - fields received as null by server

I have create a web service in glassfish v3. The method I am try to call from .net using generated client in visual studio 2008 takes a single parameter which is basically a java bean - simple types (Double, String, Date) as fields with getters and setters (Actually it is an EJB entity class). I find that when I call the method from my ...

start process issue

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 to develop a console application. And I want to start an external process (an exe file) from my C# application, and I want current C# application to be blocked until the external process stops and I also want to get the return code of the external process. Any ideas how to implement ...

how to get the list of all printers in computer - C# Winform

hi i need to get the list of all printers that connect to computer how i can do it in C# - Winform thank's in advance ...

MVVM best practice to pass Dispatcher to the ViewModel

I suppose to be able to access the Dispacher that belongs to the View I need to pass it to the ViewModel. Bu the View should not known anything about the ViewModel so how do you pass it? Introduce an Interface or instead of passing it to the instances create a global dispatcher singleton that will be written by the View? How do you solve...

Is it possible to integrate picturebox and labels inside a Listview? as a User control?

I want to create a listview type user control which'll have a picturebox and a label inside each item. Is that possible? ...

How to use code generation to dynamically create C# methods?

In order to define a method in C that is callable by Lua it has to match a given signature and use the Lua API to retrieve parameters and return results. I'm writing a C# wrapper of Lua and I'm interested in being able to call arbitrary C# methods without making them follow these conventions. When wrapping in something like D, one might ...

Are Remoting client-side object thread-safe ?

Can synchronous members of remoting proxy object be called from multiple threads simlutaneusly ? Auto generated proxy, in my case it is .NET1.1 remoting. The server model is SingleCall (but I guess that this is not importantn for client model). Or it is necessary to synchornize access to the proxied object ? I have only ane channel and ...

Grabbing meta-tags and comments using HTML Agility Pack

I've looked for tutorials on using HTML Agility Pack as it seems to do everything I want it to do but it seems that for such a powerful tool there is little noise about it on the Internet. I am writing a simple method that will retrieve any given tag based on name: public string[] GetTagsByName(string TagName, string Source) { ... ...

Large domain model in memory

I'm working on a project which has a large object graph in memory. The domain objects are really 'wide' and contain a whole load of data which is normally extraneous. I'm thinking about implementing some sort of lazy loading model. I'm currently thinking along the lines of having attributes on each of the properties that are lazy. ...

Asp.net: pass client information

I'm building a website with asp.net mvc and there is some data that I need to consult with every browser request. This contains the clients date and its latitude/longitude. This way we can update the users (using a PDA) location. If we assume that I already have the latitude & longitude, how can I pass it to the webserver with every bro...

Do I have to release all the native resource before a GC happens?

We know that .NET has 2 super types. The Value-Type and Reference-Type. As I understand it, after I set all the roots of an Ref-Type object to null, the Ref-Type object is logically deleted from the stack, but remains in existence on the manged-heap. If the Ref-Type object uses some native resources, such as an opened-file, do I have to ...

Paste table name as parameter

I want to paste table name as function parameter and function need to return DataSet, this is the my code for that: Public Function GetTTabele(ByVal tableName As String) As DataSet Dim DAT As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM tableName", nwindConn) Dim DAT As DataSet = New DataSet() DAT.Missin...

Monorail parse URL to routing values

Is it possible to fire up nvelocity routing mechanism outside the context of request (standalone app, or a testing framework) and get an url from action and routing values from url? Here is a test, i need to figure out the routingMethod: var url = routingMethod.ResolveAction<MyController>(c=>c.MyAction("Foo",1)) Assert.AreEqual("/MyCon...

WPF Toolkit DataGrid - rows overlapping (row height problem)

Hi, I have a DataGrid with some template columns that contain another DataGrid. My problem is that if some rows have a lot of content in them their height doesn't adjust so the whole content is visible, but rather it's cut off, giving the impression that the rows overlap. However, as soon as I add a new row to the grid or add a new row ...

Only keep the legal chars in a text using a .NET Regex

I have a list of legal characters and I want to remove all others chars from text. // my legal chars. a-Z, numbers, space, _, - and percentage string legalChars = "[\p{L}\p{Nd}_\-&#x20;&#x25;]*" string text = "[update], Text with {illegal} chars such as: !? {}"; I do find a lot of examples for removing illegal chars. I want to do the...

Deny/Readonly access to removable drives

i want to deny/readonly access to removable drives using ACL. i searched and found that i can be done using setsecurityinfo. i referred Msdn and pinvoke.net but not able to set successfully Help in c# or Vb.net required ...

How is memory used when calling a .NET assembly from an ASP.NET web application, and how it is related to bandwidth?

My web application needs to call a .NET assembly which seems to me that allocates "a lot" of memory for a web application (perhaps I'm wrong, that's why I'm asking). I already call this assembly from my desktop application and, with the help of Task Manager, I realize that it consumes about 60MB when it runs (it is fast though: it take...

Running a WCF Service host and WCF client proxy on the same Windows form

Hi we're trying to build a "web" of connected clients, where each client.exe also provides the service host that remote clients connect to. The idea is that whenever a remote client connects to the local client, a form is used to visually show the connected remote clients. Whenever a new remote client connects or disconnects, the form i...