Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Programming » .Net Framework   (RSS)

How to Give Authenticated Users or Everyone Access to Your Share Programmatically

Another follow-up from my previous article, Programmatically Configuring Permissions on a Share , David B asked a question, how to share a folder to Everyone, instead of to a specific users. This article will answer that question, based on the code on
Posted by HelloWorld | 0 Comments

How to Programmatically Modify the IIS Virtual Directory

If you have more than a dozen web servers in a cluster with identical setting, and you need to update the virtual directory, it is much more convenient to write a simple program to update it. This example shows how to do it. In this case, this snippet

C# 3.0 Automatic Property

C# introduces a number of syntactic sugar, including Automatic Property link . A question was asked, why is this useful, what is the advantage of this approach compared to exposing the field as public field? The advantage of the automatic property is
Posted by HelloWorld | 10 Comments

Writing Fast Code (Resources)

This article is intended to help me remember where can I find these resources, also kind of helpful should I need to forward this to someone. Hopefully, this post will be continuously updated. Managed code is very fast in allocating memory, the problem

When Building Multi-Threaded Applications using ThreadPool, Make the Number of Worker Threads Configurable

Just a simple thought, when creating a multi-threaded applications, make the number of threads configurable. ThreadPool has this behavior that it will immediately set the minimum worker threads equal to the number of logical processors in your machine,

String.Split has High Cost on Performance

One application had a memory issue, it just consume too much resources. The application performed well, but it is very obvious when we saw the performance counters, something can be done to make it better. Reviewing the code did not reveal something significant,
Posted by HelloWorld | 0 Comments

How to Create Custom Event Log for Windows Service

When you created a Windows Service, you usually add a Service Installer to allow this service to be installed using InstallUtil or installing it programmatically like this post shows you. The service installer will create the Event Log for the service,

How to Get IIS Web Sites Information Programmatically

I needed to get the location of IIS log files on my servers, after doing a quick investigation, I am quite amazed on how much information are exposed via managed code. This snippet will return the name of the sites and the location of the log files. foreach

In God We Trust, Everybody Else Must Bring Data

One day, I was presented with a problem, that the finalizer was not called during application pool recycle. I was busy, so I did not have chance to respond. Later on, I checked the code, it was modified to inherit from CriticalFinalizerObject class, and

The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error

I am playing around with WCF, and I got that error message above. Searching did not really help in defining what was going on. And yes, it was working on my previous test environment. :) Luckily, I still had one of my test method, which just ping the
Posted by HelloWorld | 0 Comments

Editing Share Permission

In my previous post, I have shown you how to set up permission on a share . The thing with Win32_Share, when you set the permission, you basically overwrites the existing permission. If you want to edit permission on the share (grant a new user access
Posted by HelloWorld | 1 Comments

Common AccessMask value when Configuring Share Permission Programmatically

In my previous post , I have shown you how to modify share permission using .Net framework. Access Mask is quite granular, most likely you will need to assign a particular user as 'Full Control', 'Change', or 'Read'. In Vista or Server 2008, it will be
Posted by HelloWorld | 0 Comments

Programmatically Configuring Permissions on a Share

I was asked this problem on how to set up permission for a share programmatically using .Net Framework. Well, I am not aware of any API that can do that. Searching does not return any good result. There are lot of resources on how to configure permission
Posted by HelloWorld | 27 Comments

WCF Webcast

Michele Leroux Bustamante made fifteen great Webcasts, hosted by msdn. If you are learning WCF, I highly recommend these Webcasts and her book, Learning WCF. http://www.dasblonde.net/2007/06/24/WCFWebcastSeries.aspx
Posted by HelloWorld | 0 Comments

CustomActionData and User Defined Path

When designing a setup project, you can define text boxes dialog to input a file system path. To process the input that the user has entered, usually a custom action is created to handle the user input, and the user input is passed through CustomActionData
More Posts Next page »
 
Page view tracker