.net

ASPNETCOMPILER : error ASPRUNTIME: Target Directory not empty

I have a web application that needs to be built using a nant script. All the projects in the solution build fine but for this error that crops up each time at the end of the build. I couldn't find much useful information on resolving this error. Has anyone encountered and fixed this kind of issue before? Any help would be much appreciate...

WPF ComboBox SelectedIndex changes when IsEnabled is set to false

I am creating an application using the MVVM pattern and somewhere I have a view which contains a ComboBox. <Controls:SettingsComboBox x:Name="Setting" SelectedIndex="{Binding SteeringIndex, Mode=TwoWay}" IsEnabled="{Binding SteerAttached, Mode=TwoWay}"> <ComboBoxItem Content="{Binding Path=on, Source={x:Static Localization:C...

how to check if the click is Performclick or not

Hi i have a requirement to check for a button click is a performclick or not . some thing like if(click is button1.performclick()) {do something } else {do something } can any one help ...

URL rewriting with UrlRewritingNet fails with a + char in the URL

I'm using UrlRewritingNet in Umbraco to do some basic URL rewriting of product and category URLs. Everything is fine on my local machine (Visual Studio dev-webserver) and on our internal development server (Window Server 2008 with ISS 7, 32 bit). But it fails on the production server, which is Window Server 2008 R2 with IIS 7 (64 bit). T...

ThreadPool Parameters

I am testing a simple threadpool solution before I put it in my application, but the results I am seeing do not make sense for me. I have a simple form with one button on it. This button starts the following loop: private void button1_Click(object sender, EventArgs e) { MyTestThread oTask = new MyTestThread (); MyThreadInfo oTa...

How to specify digits and decimal places with NumberFormatInfo

I need to format a number like "1.2452" to show "452" So I don't want to see all numbers. The thing is, I am not able to control the display number directly, I can only format it by setting a format string of type according to the NumberFormatInfo Class. Is this possible, and if so how? cheers EDIT: I found out I could subscribe to...

Crystal Reports .NET - Multiple Subreports - Table [name] could not be found

Using VB.NET on VS2008. I'm having trouble getting this report to work when using different data tables for some subreports. The thing that throws me off the most is that if I SetDataSource only once I don't get any errors but if I use two or more tables from the xsd the "Table [name] could not be found" error shows up. This works (com...

Determine Solution Path During Test Execution

How would I determine the solution path from within my test code? I'm trying to write tests for a plugin architecture. I have some fake classes that implement my plugin interface in a separate project within my solution. After these build, the dll is copied into a 'plugins' folder using a post-build event: copy "$(TargetPath)" "$(Solut...

asp/php communication to local service/application

Hi, I have a local application which parses data. What i need is to develop a web interface to query statistics and set configurations for the application thats running at all times. Since I am the developer of both applications I have full access to both source. My main goals here are: - have a service or app running at all times on...

Where are .NET local variables stored?

In IL, you can define local variables using the .locals directive. Where are these variables stored, stack or heap? ...

How to save date of last application run-time?

My current approach is to store date in .settings file and update it at the end of program, but it doesn't work. code: Settings.Default.RunTime = DateTime.Today; Settings.Default.Save(); how to fix it? ...

How can you get the first validation error on a property only using Validation Application Block?

If I have two validators, a NotNullValidator and a StringLengthValidator, is there a way to get only a Null Validation Error and not both. For example: public class Test { [NotNullValidator(MessageTemplate="Name is required"), StringLengthValidator(1,50, MessageTemplate="Name must be between 1 and 50 characters")] public str...

How to create a .NET library to be used by MS Access 2007's VBA?

I have used .NET 3.5 with C# to create functions to gather data from a product's web service. Now we have a need to be able to get at that data in a Microsoft Access 2007 application. I am not particularly familiar with VSTO et al, and I don't want to have to fuss with anything on the MS Access side--I'll leave that to our VBA expert. B...

How do I programmatically change a .lnk to change its target?

Is there any way to open a windows shortcut (.lnk file) and change it's target? I found the following snippet which allows me to find the current target, but it's a read-only property: Shell32::Shell^ shl = gcnew Shell32::Shell(); String^ shortcutPos = "C:\\some\\path\\to\\my\\link.lnk"; String^ lnkPath = System::IO::Path::GetFullPath(s...

.NET tracing not working with Diagnostics.TraceSource, only Diagnostics.Trace

I’m trying to set up .NET tracing. I’m able to get basic tracing to work via System.Diagnostics.Trace, but for complicated reasons I have to activate tracing via System.Diagnostics.TraceSource objects (the new way of doing it, since .NET 2.0) rather than using System.Diagnostics.Trace. I've tried everything but it just doesn't want to ...

How to enable MS-SQL Compact Database encryption on first program run when using it with the Entity Framework?

OK, here is the szenario: I'm coding a .NET 3.5 WPF-Aapplication, using the Microsoft Entity Framework to use a compact database file (.sdf) for storing data. On my first program start a computer-based encryption key is calculated and saved into the registry and my sdf-File should become encrypted with this key (or rather with a somehow...

CRUD-style data driven distributed .NET application architecture questions

Context: Building a smart client application on the .NET platform where you have a complex database model with a high number of columns involved. The natural application style is a typical data driven CRUD. There’s also a fair bit of server side logic in some cases, and somewhat complex validations. You have full control of client and se...

IObservable in Silverlight 4

Where can I find this class? I have included the Rx extensions. I have made sure the version I'm compiling to is Silverlight 4. My VS2010 IDE still has no idea what the type IObservable is. I didn't see them in the System.Collections.Generic namespace like this thread suggests http://dotnet.uservoice.com/forums/4325-silverlight-feature-...

How do I copy an array of integers between two Delphi Prism applications using WM_COPYDATA?

I'm trying to use WM_COPYDATA to copy data between two Delphi Prism applications on the same computer. In the sender application I have the code: type [StructLayout(LayoutKind.Sequential)] CopyDataStruct = public record var dwData: IntPtr; var cbData: System.Int32; var [MarshalAs(UnmanagedType.ByValArray, SizeConst := ...

T4MVC problems with MVC 2 under VS2010: cannot convert from 'method group' to 'System.Web.Mvc.ActionResult'

Just added the T4MVC templates to my project, built and then tried to use the cool new features it introduces. I tried to update RedirectToAction("NotFound", "Error"); to RedirectToAction(MVC.Error.NotFound); I get the following error at build: Argument 1: cannot convert from 'method group' to 'System.Web.Mvc.ActionResult' Also, i...