.net

Securing/encrypting an offline application

I'm developing an "offline" application for a local government that will be used to collect sensitive information. The application will sync back up to the mothership periodically, but it will generally be used offline. It'll be running on Windows, written in .NET/WPF. I'll need a small "local" database, so I'm looking at SQLite. I c...

"Custom" ScriptManager control?

I'm looking to build a control that essentially abstracts a ScriptManager. I need it to look/feel just like as close to a regular ScriptManager as possible. The reason for this is so we can use an "#if not DEBUG" statement to dynamically load the .js files in CompositeScript for release, but also maintain easy debugging in our dev envir...

.net or/and Symfony programmer?

Hello, I am study at last year of bachelor, since 1.5 year I programming at .net platform - C#, ASP.NET, WinForms, now i planning at graduation use Silverlight and WCF. In the meantime at my department will start project to rewrite our site on Symfony. I declare to be one od 2-3 persons who participation in it. But now i have doubt :/ ...

Visual Studio Tools For Dynamics GP - create new Window?

I'm creating my first Dynamics GP integration using the Visual Studio .NET integration. In starting from the programmer's guide, I know how to add my custom form to an existing GP window. what I'd like to do though is create a new form that's not tied to any existing window. i.e. I'd like to be able to let the user add a window shortc...

Do .NET 3/4 Permits Events to be Binary De/Serialized?

In .NET (at least <=2) there's a problem serializing objects that raise events when those events are handled by a non-serializable object (like a Windows Form). Because of the way VB.NET implements events, when you serialize an object, its events get serialized too (because events are actually implemented using hidden multicast delegate...

Windows seems to lose track of .NET application

We have a .NET application that we distribute to our users via an MSI installer package. We have C++ applications that run each morning to see if the user's copy of the application is out of date, and if so, we pull down the new MSI and install it. If the application is running, we need to take it down so we can perform the update. Ou...

How to extract html links from html file in C#?

Can anyone help me by explaining how to extract urls/links from HTML File in C# ...

How to Access/marshall char *variable from dll import in C#

Hi I need to access functionality from win32 dll , for that I am using [dllimport] in C# code. what exact method signature i need to create with [dllimport] for the following c++ methods void GetGeneratedKey(char *code, int len, char *key) pls help in this. Thanks nRk ...

Different ways of type-conversion. What is the difference.

I am trying to get a difference between the type casting methods. eg. Method 1 public byte fun() { object value=1; return (byte)value; // this gives me error } Method 2 public byte fun() { object value=1; return byte.Parse(value.ToString()); // this runs } Method 3 public byte fun() { object value=1; return Co...

How to design autostart application that runs as admin on Windows Vista/7?

I have the need for my application to start and stop Windows Services based on certain events. The thing is that this application needs to run as an elevated normal user (In order to stop services), as well as auto start when Windows starts. Additionally, it need to be in the systray with an user interface. What are my options here? I...

Next Silverlight 4 public release

Does anyone have any idea when Microsoft might be dropping another Silverlight 4 public release? As ScottGu has been quoted many times: "We will be adding VS 2010 RC support for SL4 with the next public Silverlight 4 drop." I've read speculation that there might not even be another Silverlight 4 public release until RTW. It's painful...

Execute multiple SQL commands in one round trip

I am building an application and I want to batch multiple queries into a single round-trip to the database. For example, lets say a single page needs to display a list of users, a list of groups and a list of permissions. So I have stored procs (or just simple sql commands like "select * from Users"), and I want to execute three of the...

vb.net address parsing question

i need to parse normail mailing addresses in vb.net. the requirement is address shall be split in 2 variables. so if address is 12300 euclid st. then it will be "12300" and "euclid st." in two different variables. also if address is 123 B4 euclid st then "123 B4" and "euclid st". Sometimes address is 12008 B2 euclid st Apt 12. In this c...

Visual studio layout and toolbars are all changed

I opened up Business Intelligence Design Studio (BIDS) the other day. Since then my visual studio toolbars and panes have been all screwed up. Commands are missing, panes never stay where I want them, etc. Whenever I install VS, I usually select the Web Developer settings when the first time dialog comes up. I'm pretty happy with the la...

.NET - Check if directory is accessible without exception handling

I need to go through various directories on the computer (via DirectoryInfo). Some of them aren't accessible, and UnauthorizedAccessException occurs. How can I check directory access without catching the exception? ...

Is it safe to signal and immediately close a ManualResetEvent?

I feel like I should know the answer to this, but I'm going to ask anyway just in case I'm making a potentially catastrophic mistake. The following code executes as expected with no errors/exceptions: static void Main(string[] args) { ManualResetEvent flag = new ManualResetEvent(false); ThreadPool.QueueUserWorkItem(s => { ...

How to solve this potentially dispose related file overwrite issue?

I am loading a 50x50 Bitmap file and then filling it a single random color at program startup. Then save the result onto the same file and assign it to a PictureBox, but running into file write problems and "A generic error occurred in GDI+", etc. How to do this properly so that I can continually repeat this, (open bitmap, paint it rand...

How to detect if a message box is visible?

I have 2 forms that are visible. Is it possible to detect if a message box is visible/being displayed on from one of the forms on the other? ...

Is there something like an "Options" library for .NET?

I'm working on a plugin system. Some plugins need user input. I would like them to be able to report to the main application what input they need and have the main application decide how to get it. It seems like there might be some kind of library designed for specifying options like this. So like the plugin could return some kind of Opt...

Patterns / design suggestions for permission handling

We have a rather complicated system of permission handling in our (ASP.NET web) application. Users can have specific permissions on different kinds of objects, some permissions are even packed into groups / roles that are assigned to users. All in all this ends up in a pretty complicated mess where for determining whether a user can do /...