I know you can use a .net reflector to view code created with .net but if i put something in the comments for my own personal reminder is that compiled in the exe as well.
I don't intend to release the source code for my application and i know the 100% safe bet is to just remove everything i don't want out but i was just wondering if so...
.NET code access security has been around for a long time, yet it seems to hardly ever be used in the real world.
To my way of thinking, this seems like an excellent concept, and one I had not seen prior to .NET. (Does it exist in other languages?)
I would like to know if anyone is proactively using it in their projects and why?
For t...
I know how to write the basic c# code to send emails, but I'm wondering about any larger issues involved. Are there things I should avoid? Best practices? etc
Thanks!!
...
I have to implement a IExceptionHandler for the Enteprise Library 4.1. In my particular case I want to use it to log the exception to Fogbugz but the inner details is not what I am asking about. What I need is how to - best practicies - implement it, How to get the config for a app.config or web.config. etc.
I have code This so far:
...
I've got a Visual Studio Excel Workbook project. When I publish the workbook and examine the source of the workbook (I open WinZip and check custom.xml), I see the tag _AssemblyLocation, which corresponds to the publish path.
Is there a way to read _AssemblyLocation from my .NET code?
I'd like to be able to read the publish path and de...
I'm currently using the validation code listed here in an application. I'd like to selectively validate a page. What I mean by that is this: I have a form that's databound with validation rules attached. I also have a checkbox that, when checked, disables and clears the values of several bound textboxes. Is there a property I can set on ...
I have an application that posts a large file to a vendor's API and gets a response. It does so thusly:
HttpWebRequest webRequest = BuildWebRequest(..., requestParams.Data, ...);
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
I would like to measure the elapsed time of only the response itself (excluding the...
Hi
I am having a trouble during impersonating a user. I have a method declared like this:
[PrincipalPermission(SecurityAction.Demand, Name=@"DJPITER-PC\Test", Role="LocalTestGroup")]
static void LocalTestGroupOnly()
{
Console.WriteLine("Inside LocalTestGroupOnly() - {0}",
WindowsIdentity.GetCurrent().Name);
}
The calling...
MyDataSource.SelectParameters["startDate"].DefaultValue =
fromDate.SelectedDate.Date.ToString();
As you can see I am setting the default value of a parameter in my .Net SqlDataSource. I don't think the string is outputting the correct format though. What is the correct format so a T-SQL Datetime wil...
Here's the deal: I'm in the process of planning a mid-sized business application that absolutely must support Win2k. AFAIK, official .NET support for Win2k was scrapped a while ago (IIRC, it stopped at version 2.0).
Now, I already wrote (ages ago) libraries in C++ that allow me to accomplish the end result (i.e., finish this project) ju...
I'm trying to serialize a type using the DataContractSerializer and am getting the exception below. This isn't for an SOA service, but I would still like to use the DataContractSerializer if possible. I am using .Net 3.5 SP1.
Type
'System.DelegateSerializationHolder+DelegateEntry'
with data contract name
'DelegateSerializatio...
interface I { int J(); }
class A : I
{
public int J(){return 0; } // note NOT virtual (and I can't change this)
}
class B : A, I
{
new public int J(){return 1; }
}
B b = new B();
A a = b;
I ib = b, ia = a;
b.J(); // should give 1
a.J(); // should give 0 (IMHO)
ia.J(); // ???
ib.J(); // ???
I know I could just try it but I...
I am having difficulty using a thirdparty library registration function to register a callback. I am writing in C++ CLI, and accessing a library written in C or C++.
What does the above compiler error mean?
this is the registration function as defined by the vendor:
MYCO int WINAPI MyCo_Device_Register_CallbackFunc(LPVOID func, LPVOI...
I am designing some immutable classes but I have to have some variables like say .Count to have the total count of the instances. But would having a static variable affect multi-threading?
Because methods like Add, Remove, etc have to update the .Count value. Maybe I should make it lazy property?
...
I am downloading files with the WebClient class in .NET 3.5. I would like to be sure that on the server side, the files requested appear to be downloaded with a IE client. What do I have to change exactly?
Do I have simply to copy the header information generated by IE to the Header property of the WebClient object? Is there anything e...
How do i reduce flicker in a vb2005 panel?
Inside the parent panel i have 2 other panels that im am using.
The outer most panel contains a background sprite and the two innermost panels are overlays that change to fit the places in the background sprite.
When i change the overlay sprites i would like to reduce the flicker and make it a...
This one is a real head scratcher for me...
var matches = Regex.Matches("<p>test something<script language=\"javascript\">alert('hello');</script> and here's <b>bold</b> and <i>italic</i> and <a href=\"http://popw.com/\">link</a>.</p>", "</?(?!p|a|b|i)\b[^>]*>");
The Regex is supposed to capture any HTML tag (open or cl...
I'm normally developing web apps, and a surprisingly large amount of my work time is spent doing "Ctrl + Alt + P", sorting by Process Name, and picking w3wp.exe to attach my debugger.
To make matters worse, I'm working on an app that spans several application pools, so I normally have 2 or 3 instances of w3wp.exe, and it's impossible to...
I know how to get the user that last modified a file, but does Windows track the process that made the modification as well? If so, is there an API for looking that up?
...
So I'm using WCF, and want to document my interface(s) and services to give to another company for an internal app. What's the best way to document those interfaces? I'd prefer having the documentation inline with the code, and then have something prettify to output HTML, but am not sure if there's a recommended way to do it.
Thanks....