I'm trying create a ASMX webservice that can perform a HTTP GET request. I have the following simple snippet of code to illustrate what I've already done.
using System.Web.Script.Services;
...
[WebMethod]
[ScriptMethod(UseHttpGet = true)]
public string HelloWorld(HttpContext context)
{
return context.Request.Params.Get("userId").ToStr...
Hello all,
I am a .net web developer. I have several years of experience in this field. Lately, I have received a job proposal for developing .net embedded code on .Net Arm Microprocessors.
I wanted to know, what overhead or problems should I expect in developing on microprocessors? I know that developing for the web and for hardware a...
Hi,
I have a scenario where I have multiple classes implementing one interface.
When at runtime the resolution is done I want some rules to execute to give me back the required instance.
I am thinking of writing some extension for Unity which can accept the configurations like this:
<unity xmlns="http://schemas.microsoft.com/practices/...
I am getting checkedListBox values from database. Based on my checkbox selection it will perform some operation.where i have to write the code for checked items.
...
We have many questions here about stack traces and analyzing exceptions that have been thrown.
I am using RedGate Reflector to examine the workings of some .net classes. In particular, I am looking at the ConnectionString property of the System.Data.SqlClient.SqlConnection object. Reflector indicates that this property may throw an Ar...
I'm working on a VB6 application that consumes .NET objects via COM Interop. The application is working well, but I feel like I'm taking a performance hit each time I instantiate a .NET object from within VB6.
For example, I have VB6 code that loops through a recordset and instantiates new .NET objects for each item in the recordset an...
Hello
Is there a way to detect whether we are running on emulator or real device from .NET CF code?
Thanks
Dominik
...
Consider the following code snippet within a class
private static Object _syncroot = new Object();
public void DoSomeWork()
{
// do some processing code
lock(_syncroot)
{
// process some shared data
}
// do some processing code
lock(_syncroot)
{
// do some further processing of shared data
}
}
If this cod...
I am learning how to use the .NET Tracing framework, and I am stuck trying to enable some fairly simple logging.
I'd like to log all messages that are at "Warning" or above to a text file, using the MyApplication.exe.config file. I would like to enable this for all sources in the application, without having to specify them all in the c...
I've tried looking at the Microsoft site and Googling this but nobody seems to have an answer aside from the < and the >. There's more to it than that though. I've noticed that the HTML entity starter of &# is invalid. Is there anything else? Does anyone have a complete list?
Thanks!
...
I’m looking at ways to improve the consistency, brevity, and readability of some code in the application I’m working on. The starting code looked something like this:
context.GetGraphType<Bar>().Subscribe<Fizz>(
(instance, evt) => e.Execute((Bar)instance.Instance)
);
There are a number of nearly identical lines of code like the ...
I'm working on a project that normally uses SQL Server 2005; however, there is an additional requirement that the system needs to be able to run without a database - using data from serialized objects saved to disk.
Are there any .Net ORM frameworks can do this natively, or can fairly easily be modified to do this?
...
I've created a custom filter for my MVC application, [LogAttribute]. Action methods are decorated with this and it has the responsibility to create a LogEntry object to pass into some type of provider - ILoggerProvider.
My question is, where should ILoggerProvider and it's implementations sit (I'll be wanting to use a DI technology on i...
I'm writing a search engine in C#, retrieving rows from a SQL database. I'd like the search to also include similar words - for example, if a user searches for "investing", the search will also return matches for "investment", or if the user searches for "financial", the search will also return matches for "finance".
How can I retrieve ...
Here's the development environment we're looking at:
Primarily .NET (C# mostly)
Development in Visual Studio 2008
Source control in SVN (VisualSVN server, Tortoise client)
Deployments with MSBuild/MSDeploy controlled by Rake scripts
What we'd like to start having is some kind of tracking of version numbers in deployments. The main r...
Hello,
I am looking for the most efficient way to take repetitive desktop screenshots in C#.
I am currently using copyfromscreen but it is a little bit too taxing on the CPU.
I would like to know if there is other alternatives.
Thank you
...
I envisage the ability to write fluent code that adds meaning to numbers within codebases. Say you wanted a number to represent a distance in miles. You'd have something like:
Usage:
var result = myMethod(100.Miles());
I think this would be much more readable than simply passing in the int, plus you could presumably apply bounds chec...
I want to copy a file that's in the same directory as the installer file to the application directory. I can't include the file in the installer.
the scenario:
I create an installer for my client.
the client will distribute the installer to an unknown number of third parties,
these third parties will need to change an aspect of the c...
Is there a one-stop shop for determining which .Net types/attributes to use, given a native type?
Example would look something like this:
Native Type | .Net Type
---------------------------------------
int | Integer
int* | IntPtr (or is it ref int?)
LPCSTR | [MarshalAs(Un...
Is there any NAT Traversal open source app\tutorial written in .Net C# using some open source lib\API or native .Net libs?
...