I have some code like this:
EventLog.CreateEventSource("myApp", "myAppLog");
EventLog.WriteEntry("myApp", "Test log message", EventLogEntryType.Error);
Now, unless I'm missing something having read MSDN, this should cause a new log 'myAppLog' to be created in the event viewer, and an entry should be added to that new log with the sour...
I am helping a company with a software package that will flexibly support multiple deployment scenarios. The package is written with .NET, has a well defined BLL, and utilizes SQL Server for the database.
The design calls for a clear delineation between data access and services (BLL) and UI. There are at least two UI front ends at thi...
When I create a user control in WPF it would appear that all the children of this control are declared as internal? I've not been able to verify this, nor finding any resources discussing this matter at all.
I can access the controls in the same assembly, but not in a project referencing the assembly where the user control is located. I...
Hello everyone,
I am installing VSTS 2008 SP1 on Windows Server 2003 R2 32-bit, which has already installed with VSTS 2008 successfully before. I met with the following error (from install log, at almost the end of install progress from progress bar), any ideas what is wrong?
(IronSpigot::MsiExternalUiHandler::InstallMessageErrorHandle...
im trying to insert data into my oracle database but i am getting "invalid month" error as
it seems that i cant convert the datetimepicker value of my form into oracle date or timestamp(7) please help!
my code
dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = " dd MM yyyy ";
string m = "insert into ...
Suppose I have xml like this:
<Products>
<Product name="Liquid Oxygen">
<Manufacturer name="Universal Exports" country="UK" />
</Product>
<Product name="Hydrazine">
<Manufacturer name="ACME Inc." country="USA" />
</Product>
<Product name="Gaseous Oxygen" obsolete="true">
<Manufacturer name="Universal Exports" count...
I am implementing a website search and am trying to highlight the words the user searched for using the below code:
data = Regex.Replace(data, Model.SearchCriteria, "<strong>" + Model.SearchCriteria + "</strong>", RegexOptions.IgnoreCase);
However if data is "I went North towards Canada" and the user has searched for "north" the resul...
Hi guys,
I intend to keep few dll's in a folder other than the bin folder for my .NET 3.5 Windows application. I am unsure of how would I use the codebase element or the probing element to specify the right path. This is what I have in the app.config file now,
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity na...
My plan is to create a single event that will go:
"Ok, the mouse entered a registered pictureBox, load X picture onto it according the name of sender."
What is the best way to handle this?
Should I create a dictionary with the name as key, and the location of the picture resource as the value?
Here's what I have so far:
private void...
Is there anyway to change the dropdown button of the datetimepickers color to look like the attached image? If I have to use WPF I will, but I was hoping there would be a way to do it through code.
Thanks
...
What is the easiest way to load up an assembly, instantiate a class from it, but do so in a way that the assembly has limited privileges (sandboxed)? The code should not be able to communicate across the network, write to the file system, or execute processes.
UPDATE
I just stumbled upon Assembly.LoadFrom(string assemblyFile, Evidence...
I am trying to execute a sql query as another login using the 'Execute As' command. I am using Linq to SQL, so I've generated a Data Context class and I am using the ExecuteQuery method to run the 'Execute As' SQL command. I then call a Linq to SQL command that is successful. However, every subsequent query fails with the following err...
I have been told to add “logging” to my code using log4net, the problem is no one can travel in time and see what real world problems the logging will need to be used to solve.
Therefore is there a set of guidlines anyway as to what to log so as to get a reasonable cost/benefit trade off?
Therefore:
What kinds of logging should one...
What is the best strategy for making changes to a specific file within a C# .NET project and a DEV server and then moving that file to a different environment, say server B? I noticed it always wants me to recompile on the destination server and I figured I was doing something wrong because I didn't think I would have to (plus the server...
I am creating an app with a XML data store. One of the tables in the data store is "Parameters".
There are many parameters to one master record. I have the master record bound to a WinForm and am able to add edit records.
I want to be able to let users edit "parameters" which I have a DataGridView for them to edit/add/delete them with...
Hello,
Please help...
I have this form
<form method='POST' action='1.php'>
<input type='hidden' name='min' value='24'>
<input type='hidden' name='max' value='27'>
<input type='hidden' name='do_some' value='1'>
<input type='image' name='do_some' class='image cmd' src='images/1.png' alt='1'
onMouseOver="doIm...
We are wanting to add support for fingerprint authentication in a .Net 3.5 application.
We currently are only using the sdk from Griaule. But this only supports like 5 usb plug-and-play devices. We are wanting to support most readers included with laptops, tablets, etc.
Is there a universal way to support many devices? I know there ...
Currently i have no way to test my code with SQL Server. I know nothing about it and have been using SQLite. What should i know while switching? My app is programmed in C# .NET
...
I am trying to make an Http POST to an Apache web server.
I am finding that setting ContentLength seems to be required for the request to work.
I would rather create an XmlWriter directly from GetRequestStream() and set SendChunked to true, but the request hangs indefinitely when doing so.
Here is how my request is created:
priva...
Hello
I have already asked a somwhat similar question here but I now have a follow-up question.
I need to launch the external program several times in a row, but I have several problems with it :
It tried to simultaneously launch all the operations. I have put an empty "while (bgwkSVN.IsBusy) { }", it kinda works, but I'm pretty sure...