Currently, we have an .hta file that employees use to update certain elements of their active directory profile. This alleviates system administrators from having to deal with that issue. The reasoning for a .hta file is obvious. It lifts a lot of the security blockades in place and allows a machine to do things (such as update an ac...
I'm implementing Deflate and GZip compression for web content. The .NET Framework DeflateStream performs very well (it doesn't compress that good as SharpZipLib, but it is much faster). Unfortunately it (and all other libs i know) miss a function to write precompressed data like stream.WritePrecompressed(byte[] buffer).
With this funct...
I am having difficulty in consuming the reCaptcha Web Service using C#/.Net 3.5. Although I think the problem is with consuming web services in general.
String validate = String.Format("http://api-verify.recaptcha.net/verify?privatekey={0}&remoteip={1}&challenge={2}&response={3}", PrivateKey, UserIP, Challenge, Response);
W...
I am zipping files in a folder using the DotNetZip libraries. To identify files that are currently open by other processes I am using 'handle.exe' from SysInternals.com. I do this by calling it with parameters and parsing the output, along these lines.
using (Process handleProcess = new Process())
{
// -- Set up the parameters and c...
Hi all.
I have a folder with some folders in it and some files in those folders. It so happens, that those file may be readonly which is not acceptable for me.
The questions is do I have to write the code to recursively unset readonly on all files? It's not difficult to write but is there any standard .NET way to do it?
My current so...
Before you react from the gut, as I did initially, read the whole question please. I know they make you feel dirty, I know we've all been burned before and I know it's not "good style" but, are public fields ever ok?
I'm working on a fairly large scale engineering application that creates and works with an in memory model of a structur...
I need Highlighter.Net 2.0.0.dll for highlight the text. Anybody help me.
...
Hi Guys,
For my .net application i have a mechanism that creates a special user on the local machine. I then create the Registry / Directory entries and assign this newly created user full access to the appropriate Sub Keys / Folders.
For my test i use Impersonation to setup the enviroment to run under this new user, and then run some ...
Imagine an untrusted application (plugin) that reads from the standard input and writes to the standard output.
How to get the output returned for the specified input by this application preventing any side effects?
For example, if application deletes file on a disk, it should be detected and this attempt should be canceled.
It's some...
Environment:
Visual Studio 2008
Release build
Generate serialization assembly "Auto" or "On"
It fails with
Error 1 The specified module could not be found.
(Exception from HRESULT: 0x8007007E) C:\Path\Projects\Project\Project\ SGEN
if I either use Debug build or set the serialization assembly to "Off" in the Release build t...
Suppose I have some XmlElement; let's call it element. If I want to get all of the child nodes of that element, I can call element.ChildNodes. If I want the text of the element and all its children, then I can go with element.InnerText.
However, suppose I have some XML that looks like this:
<TopElement attr1="value1" attr2="value2">
...
Hi, I'm going to build a web app. I need some CMS that can be integrated with ASP.NET MVC.
The possible solution list is:
1) Oxite
2) MVC CMS
3) AtomSite
4) N2.
Sorry for obvious question, but can the DotNetNuke be used with ASP.NET MVC? TIA
...
I'm having the following problem when using reflection.
The following statement evaluates to false:
object[] attributes = someType.GetCustomAttributes(true);
if (attributes[0] is NUnit.Framework.TestFixtureAttribute)
return true;
However this evaluates to true:
object[] attributes = someType.GetCustomAttributes(true);
if (attr...
I have .net classes
I am using unity as IOC for resolving our dependencies.
It tries to load all the dependencies at the beginning.
Is there a way (setting) in Unity which allows to load a dependency at runtime?
...
Hi,
I was talking with someone and mentioned I was learning IOC and was using ninject to get the feel for things.
He asked me what container I was using? I told him ninject.
Having no idea what he was referring to, I know there is castle windsor products that are more popular.
Can someone clear this up for me? What am I missing here...
In WinForms I could handle the Validated event to do something after the user changed text in a TextBox. Unlike TextChanged, Validated didn't fire for every character change; it only fired when the user was done.
Is there anything in WPF I can use to get the same result, an event raised only after the user is done changing the text?
...
Our company is migrating its entire product line from a C++ codebase to the .NET Framework. We have a very large codebase, and this migration is being done incrementally over the course of many years.
We would like to enjoy some of the benefits of pure managed code, such as Silverlight, but there are many legacy C++/x86 modules that wi...
Guys,
I am trying to concatenate the output of various functions into a textbox, but it all comes up in one biiig line. How can I insert break lines in between the variables? I have something like this:
Me.TextBox.text = output1 + output2
And I would like to have something like this:
Me.TextBox.text = output1 + ENTER + output2
Any...
I recently switched over to C# from vb.NET and within visual studio found that hooking up events is extremely annoying. In VB I could select a control from a drop down on the top left and the event on the top right drop down and the method would automatically be created and attached to the control using "handles". I know that is not su...
When using string.Format(string, object[]) it throws an exception if string contains more format specifiers ({0}, {1:dd-MM-yyyy} etc.) than object[].Length.
I'd like to also throw an exception if object[].Length contains more specifiers. There seems to be no built-in way to do it, so I'm trying to get the number of format specifiers in ...