I have a project which requires me to load an HTML document as a string, and parse it. I am trying to determine which HTML node will exceed the height of a page (8.5x11) so I can insert a ‘page-break-after’ before it. This will be done with a .NET dll I am producing.
I have tried using the mshtml dom. It’s not easy to load a string valu...
We have a .Net 3.5 Workflow hosted as a service that sometimes stops unexpectedly. This has occurred at times while it is writing a file and, most recently, when receiving a reply from another WCF service. There are no exceptions being caught, as these all get logged, and there are no messages in the event logs on the server where both...
In my C# application, I have a thread which basically continually reads from a TcpClient until told to stop. I use WaitHandles for this purpose, for example:
private ManualResetEvent stopping;
private void Receive()
{
while (!this.stopping.WaitOne(10))
{
while (this.client.Available > 0)
{
// Read an...
I find it useful to override ToString() on many of the simple DTO/POCO classes I write to show some good information when hovering over instances within the debugger.
Here is one example:
public class IdValue< T >
{
public IdValue( int id, T value )
{
Id = id;
Value = value;
}
public int Id { get; priv...
I can style the contextmenu (.style) containing the items and I can style the menu items fine (.ItemTemplate). But how do I style the submenu that pops out when a menuitem has menuitems?
Like:
<ContextMenu>
<MenuItem Header="Font Style">
<MenuItem Header="Under Line" IsCheckable="true"/>
<...
Here's the situation. I have a PDF with automatically generated pdf form field names. The problem is that these names are not very user friendly. They look something like :
topmostSubform[0].Page1[0].Website_Address[0]
I want to be able to change them so that they are something like WebsiteAddress. I have access to ABCPDF and I have...
My code keeps throwing a DBConcurrencyException ("Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.) when I make a second update to the data table.
The problem actually happens on a table that is linked to a parent table. The two tables, CashReceipts and CashReceiptsApplyTo are displayed on the same winform,...
So, what is a best approach to implement silverlight localization with Reactive Framework (Rx) to achive on-the-fly UI changing? I would be very much obliged for examples.
Here is an example of on-the-fly UI changing. But I can't figure out how it works.
...
I've migrated an ASP.NET web application from Server 2003(x86) to a Windows 7(x64) machine. The web application cannot find registry values that were stored under:
SOFTWARE\SomeApplicationName\SubLocation\SubLocation2
being accesed through the Registry.LocalMachine.OpenSubKey api located in the Microsoft.Win32 namespace.
My question...
I am getting connection timeouts and I suspect they may be caused by a bug that is allowing me to exceed my connection pool limit. Is there a way to progamatically detect this?
...
Hello,
I am just starting with OpenID in an Asp.net MVC application and was wondering what some of the pitfalls are when using OpenID. The reason why I am asking is because I read a lot of warnings when using some OpenID implementations. Mostly it's something like "Don't use that library! You just need to change one word in the url and ...
I'm writing a script to check RSS feeds on regular intervals and need to prune out old articles. I came across this answer which seems really close to what I'm looking for: http://stackoverflow.com/questions/578867/sql-query-delete-all-records-from-the-table-except-latest-n
I need a similar solution that works the same way, except it k...
I'm using FlashWindowEx to flash the taskbar icon of a .NET application. If I run the app from my local desktop, the flashing happens correctly, but if I'm running the application as a RemoteApp, the taskbar icon doesn't flash -- probably because the app is actually running on the server (even if it looks like it's running on your local ...
Here's the background.
We have a few different customers, each with a different backend source database. We want to be back to pick up real time changes to the backend database, then transform the data to a target schema in our target database. After that broadcast a message to other apps alerting the change.
To do this we need CDC s...
How can i give access to IIS_WPG user role in IIS.
I am trying to run .net 2.0 application on windows xp laptop
...
Hi folks, Guids are created using the new keyword which makes me think it's a reference type.
Is this correct?
Guid uid = new Guid();
Are Guids stored on the heap?
...
GC is for managed objects and Finalize is for unmanaged objects thats what I have been reading. Dispose is implicit and Finalize is Explicit is what I have been reading. Can somebody give me one example of one module in which all three thing have been used for different reasons?
...
I'm trying to use fuslogvw.exe on a Win 2008 R2 system. It shows the process started and using CPU but no UI appears. I've tried the 32bit and 64bit version in and not in admin mode but no luck. I don't see anything in the event log as a problem.
...
Hi!
I'm looking for a way to compare a string with an array of strings. Doing an exact search is quite easy of course, but I want my program to tolerate spelling mistakes, missing parts of the string and so on.
Is there some kind of framework which can perform such a search? I'm having something in mind that the search algorithm will r...
How do I convert a string to an integer in C#?
...