We have several VB.NET websites running internal applications. These sites are often modified with minor changes, and are maintained on the server as uncompiled code.
I'm looking for the best way to maintain classes so that we can reference them from multiple websites. Specifically, we're looking to put some common functions (error lo...
I get that error when trying to "view in browser" from an aspx file in Visual Studio 2008. The complication to the problem is that I'm not actually on the server itself, its a project that's been checked out from source control onto my local machine. I've seen the solution for the problem if I were on the server but my computer is not ...
I was wondering if anyone knew how to find what column an entity's property is mapped to using NHibernate and only having the IEntityPersister interface available.
...
I'm trying to have a Windows Forms ContextMenuStrip control display a list of countries, about 200 total. Currently it displays them all vertically which creates for a long wait time to scroll to countries near the bottom of the list. I've tried messing with the ContextMenuStrip.LayoutStyle property but it hasn't gotten me anywhere. M...
I'm working on the licensing component of a commercial product, and I'm trying to make sure all of our complicated licensing modes work seamlessly. I'm considering using a WWF state machine to keep track of the licensing state so we can be sure the software accurately follows the product licensing terms we state to our users. I've alread...
I have a WCF service client and it was generated using the /async argument with svcutil.exe, so it uses the asynchronous programming model. When I make multiple asynchronous requests with a single client though it serializes the execution of those requests.
Here is an example that shows how I am executing the parellel requests.
[TestM...
I'm hosting a WCF service inside a windows hosted service.
When I start the WHS, I get the following error:
The ChannelDispatcher at 'net.tcp://mysecreturl/' with contract(s) '"IClass"' is unable to open its IChannelListener.
System.InvalidOperationException: A registration already exists for URI 'net.tcp://mysecreturl/Indexer/'.
...
Hi,
It is very common to create Dependency Injection container for the ASP.NET application so it lives while the application lives.
I create the DI container in each request and release it at the end of the request.
The main purpose is that any DI container supports Disposing objects when the container gets disposed.
Additional: ...
I have a C# Windows Forms app.
I have a TabControl on it, and depending on user settings, will dynamically use TabControl.Controls.Add to add a specific set of TabPages to the tabs. The TabPages aren't special, they just have buttons and text.
Doing this dynamically, even for small amount of tabs, is slow as hell. Every "Add" call, o...
Suppose I have a WCF service and a method in the contract
<ServiceContract()> _
Interface IThingService
'...
<OperationContract()> _
Function GetThing(thingId As Guid) As Thing
End Interface
where Thing is an ordinary class with ordinary properties, except for one member:
Public Class Thing
' ...
Public Property Photos() As ...
Can having multiply entries for the same assembly in the web.config cause an increase in the initial start time of an ASP.NET application?
For example:
<add assembly="ESRI.ArcGIS.ADF.Web.DataSources, Version=9.2.2.1380, Culture=neutral, PublicKeyToken=8FC3CC631E44AD86"/>
<add assembly="ESRI.ArcGIS.ADF.Web.DataSources, Version=9.2.2.138...
I have a mixed application that has data both in a database and in a physical file store maintained by my application. As I have been developing my application I have, on occasion, run into scenarios where I am moving or deleting a file from the hard drive through my application and for whatever reason something will go wrong and an exce...
I was writing some code today and something was not working as I expected.
Why does the following code execute even though the condition should have evaluated to false?
I have tried putting braces around the two conditions, and switching their position, but the EndedUsingApplication even still executes.
EDIT:
It has nothing to do w...
I need to protect software using a USB key. Can I just query a USB drive with WMI and obtain the PnPDeviceId from Win32_DiskDrive Class, and compare it with one already hashed and hard coded in the application? How secure is this? Can the PNPDeviceID property be modified? Is hardware coded? Any other idea?
Logically the USB drives are g...
I found a couple posts regarding this error on StackOverflow and posts on various forums. There doesn't seem to be any one cause or solution for this error.
So that it might help somebody else, below is the text of an email I sent to DevExpress regarding my experience with this error.
===
A month or two ago I installed an update to the...
I re-asked this question here because the people at ServerFault deemed that this is the appropriate place to ask this.
I am trying to prevent people from multiple login into one single computer and use my application simultaneously. In other words I want to prevent it from running twice on the same computer, at the same time In any giv...
Let's assume type MyType implements interface IMyInterface. How to find type declaring an interface ? For example,
class UnitTest
{
MyTypeBase : IMyInterface { }
MyType : MyTypeBase { }
void Test() {
Type declaration = FindDeclaration(typeof(MyType), typeof(IMyInterface));
Assert.AreEqual(typeof(MyTypeBase), declarati...
Is there a method to globally disable the tooltips in a .net project Visual studio 2008.
We have implemented tooltip in the web apps, but would like to turn it off for testing.
...
Is it possible for a .NET application to leave a trace so that it can be found if the application is re-installed?
Of course, a trace that is difficult to be removed.
...
Hi, I have static class with static dictionary with some informations.
The dictionary has key as WeakReference (i don't want prevent garbage collection of the real key object ).
Code sample:
public static class ThreadHelper {
private static readonly object syncRoot = new object();
private static Dictionary<WeakReference, Thread...