Hi,
How can i call custom method on a windows service:
public class TestService:ServiceBase
{
public TestService()
{
// constructor
}
protected override void OnStart(string[] args)
{
// do some work here
}
protected override void OnStop()
{
// do some work here
}
public void TestMethod(int arg)
{
...
I'm using .net remoting, with asynchronous function calls to handle the ipc of my current project.
I'm running into an issue where I'd like the client to:
ASynchronously request information
Continue loading the GUI
When the ASynchronous call is complete, load it into the gui
I do this with the following code
GetFileTextDelegat...
I have come across the following code in C#.
if(condition0) statement0;
else if(condition1) statement1;
else if(condition2) statement2;
else if(condition3) statement3;
...
else if(conditionN) statementN;
else lastStatement;
Some of my colleagues tell me that this is an else if statement. However, I am convinced that it is actually a ...
I need to be able to call .NET 3.5 managed code in a DLL from native C. I was not provided with .h or .lib files.
I've tried making a C++ DLL to expose a C-compatible interface but I don't seem to be able to include the DLLs I need to use in my project.
Is there any way to call .NET managed code from native C?
...
In .net the AggregateException class allows you to throw an exception containing multiple exceptions.
For example, you would want to throw an AggregateException if you ran multiple tasks in parallel and some of them failed with exceptions.
Does java have an equivalent class?
The specific case I want to use it in:
public static void r...
I was reading an .aspx file to see how it works. In a few places I saw things like:
<%# GetName( Container ) %>
I was wondering what this does. Thanks
...
I'm not sure exactly what I'm doing wrong here.
I have an action which returns a partial view:
public class SharedController : BaseController
{
public ActionResult StudentPoll()
{
WAM.X2O.FuelUpToPlayContext db = new WAM.X2O.FuelUpToPlayContext(WAM.Utilities.Config.ConnectionString);
WAM.X2O.StudentPoll ...
Is there any way you can speed up XSL transformations? I am using the XSLCompiledTransform class to transform my XML files. My XML files contain around 3900 records with roughly 100 fields within each record. The transformation file for this is around 10 KB in size.
It takes about 25 - 30 minutes before I see the transformed file.
I a...
I'm convinced this has been asked before and have found quite a few resources on this topic but I'm still very confused and not sure how to proceed.
I have a textarea whose data I need to send to a server and I need to capture the result which is a string. Here is my attempt:
$(document).ready(function () {
$('#output-box').hide(...
When it comes to creating a new Service running on SharePoint 2010, people seem to usually use the Sharepoint MultipleBaseAddressBasicHttpBindingServiceHostFactory.
However, I would like to use the standard .net/WCF WebScriptServiceHostFactory instead because this gives me JavaScript code by calling the Service URL with /js.
My Service...
There's two options for dealing with LINQ to Collections that are populated with SQL (I'm using an Oracle provider, so no LINQ without an ORM).
1) Do one big SQL query, dump the results into some sort of collection and do LINQ queries on the collection, so you have one big draw on the database, but not much slowdown after that.
2) Do s...
Can anyone guide me with a suggested means of testing a private field in a class that is modifed via a public method. I've read a lot of comments from people suggesting that testing private members is not advised as they are internal to the implementation, however this scenario seems to be different from most other answers.
I was thinki...
Hi!
I'm implementing a webservice based on a wsdl that is provided by another company. I need to implement a webservice-stub for testing purposes. So I used wsdl.exe to generate the client and serverside interfaces and implemented them. When I do a webservice call I get an exception saying The methods method1 and method2 use the same SO...
As many of you know, .NET 4.0 incorporated the chart control, which is awesome in that you can pretty much build all the chart types you see in Excel directly into your .NET application.
After a bit of digging around, I finally got the control to work in my application (mostly Web.config additions). However, when I try to rewrite my cod...
Strong typing is fine and dandy when you know what your schema is going to look like at compile time. But what if you're working on an application that lets the user define their own schema?
Is there a reliable relational LINQ provider out there that operates at the same level of abstraction as LINQ to XML?
Example:
var whoIsJohnGalt ...
It is necessary to move 'standard' assemblies out of the xap-file (Silverlight 4 application). I had a similar problem (http://stackoverflow.com/questions/3329731/silverlight-how-to-handle-standard-assemblies) and got a good link with deep explanations. But not all is clear there.
After I've switched on the 'Reduce XAP size by using app...
Hi
I was wondering if there were any free libraries for .net for producing a 3D scatterplot, I haven't been able to find any using google.
...
I recently learned about kayak, an HTTP server written in C# (i.e. not through IIS). I'm wondering if anyone has tried hooking up IronRuby to run Rack through this platform?
...
Can .NET or one of it's many languages enforce the cleaning of untrusted data... or prevent accidental variable use in the wrong locations?
One example of this is when a user POST's data and the "raw" response is used within a SQL transaction. This could cause anything from a client-side scripting vulnerability to the entire server bei...
I am new to .NET, and I want to create a simple application in .NET using VC++. I have to run this application in other systems. Do I need to install .NET framework on the other systems to run this application?
If I need to install, is there any other way to create and run the application without .NET framework?
...