I am having some trouble hosting a WCF service inside a Windows Service.
I can start my WCF service in VS2008 and by navigating to the base address in my app.config
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="WCF.IndexerBehav...
OK I've been playing with Silverlight and ran into something interesting that I hope someone can explain. The MSDN documentation clearly states that it has a WebRequest.GetResponse() Method. I have created some code to get the latest messages from twitter. The code works fine in a console app but I get an error when its in a silverlig...
I have used .Net 3.5 and VS 2008 for more than a month. Like most .Net developers, I have evolved from years experience in .Net 1.0 & 2.0 and VS 2005. Just recently, I discovered the simplicity and power of LINQ and Lamda Expressions, as in my recent questions such as Find an item in list by LINQ, Convert or map a class instance to a lis...
Good Day,
I have some small transparent gif images (under 100x100) and wrote the following code to iterate through all the pixels to give me the RGB values:
private void IteratePixels(string filepath)
{
string dataFormat = String.Empty;
Bitmap objBitmap = new Bitmap(filepath);
int counter = 0;
for (int y = 0; y < objBit...
If an exception propagates all the way up to the top of my application (which, of course, will never happen), I would like to offer the option of sending an error report to me before the program crashes. What I have in mind is wrapping everything in the Main function in a try-catch, and a little class that sends the stack trace and other...
I have to use a method which accepts double[,], but I only have a double[]. How can I convert it?
Solution so far:
var array = new double[1, x.Length];
foreach (var i in Enumerable.Range(0, x.Length))
{
array[0, i] = x;
}
...
When using a ReadWriteLockSlim for multi-threading support, do I need to EnterWriteLock when using AddHandler?
Here are two examples to help illustrate my point:
AddHandler ClassInstance.Event, New EventHandler(AddressOf Me.Method)
-or-
Me.ReaderWriterLockSlimInstance.EnterWriteLock()
AddHandler ClassInstance.Event, New EventHan...
I'm used to add methods to external classes like IEnumerable. But can we extend Arrays in C#?
I am planning to add a method to arrays that converts it to a IEnumerable even if it is multidimensional.
Not related to http://stackoverflow.com/questions/628427/how-to-extend-arrays-in-c
...
I am trying to using PDF Library ITextSharp, in my project. ITextSharp has so many features, i am not using even 5% of it. I am just wondering, why i should ship the complete dll file, when i use only 5% of it.
Is there any way to statically link the library to my project and remove all unused methods,features from the library ?
...
Hello, I am creating a winform application in .net 2 with c#. I need to be able to save user configuration data and I am considering using an XML file for this propose. What is the general feeling for saving user configuration data? I have read that it is not in vogue to write to the registry but rather to a file instead. Please write...
I am working on providers and cmdlets for Powershell 1 & 2.
Which version(s) of the framework should I target for my extensions?
I assume Microsoft.NET 2 will work fine. What about 3.0 and 3.5? Microsoft.NET 4.0?
...
I am using XML serialization to read a large user input file. If there is a semantic error in the input that is not discovered during reading, I'd like to be able to tell the user where (file, line, column) they can find the offending element. Is this possible with XML serialization?
CLARIFICATION: The code in question is an IoC conta...
I'm trying to create a treeview in a VB 2008 project that shows all the elements and attributes of an XML Schema.
The MSDN documentation for XML schemas seems to imply that by loading the schema into an XMLSchemaSet and compiling it I should get access to all the elements and attributes with their values but this doesn't seem to work in...
I have a multi-project .NET 3.5 solution.
It's ASP.NET based with c# code-behind in all projects except one.
I'm attempting to access members from a C# project called "Core" from a VB.NET project.
I set a dependency to the Core solution in my solution properties.
However, Core. brings up nothing.
Furthermore, my other C# project...
I'm having problem with SubSonic 3 and multiple Primary Key columns. It seems like it isn't supported via the ActiveRecord T4 script.
In line 173 of Settings.ttinclude
return this.Columns.SingleOrDefault(x=>x.IsPK) ?? this.Columns[0];
It tries to get a Single Primary Key Column and failed.
Any solutions?
...
I've written a site for my summer internship using ASP.NET MVC. The progress is going well but one thing I have found painful is deployments. Particularly, because we have frequent deployments and I've been doing them by hand.
I'm looking for sort of the "standard" .NET deployment tool that can be utilized with an ASP.NET MVC project ...
I'm using the following code to grab a wmv file through a WebResponse. I'm using a thread to call this function:
static void GetPage(object data)
{
// Cast the object to a ThreadInfo
ThreadInfo ti = (ThreadInfo)data;
// Request the URL
WebResponse wr = WebRequest.Create(ti.url).GetResponse();
// Display the value f...
I use Appfuse in Java to crank out a quick web app pre-configured with the front-end and backend frameworks of my choice. Appfuse used ANT or Maven to build a web application.
Seeing as .net has equivalent frameworks & tools to Java, i.e. ANT and NANT, Hibernate and NHibernate, log4j and log4net, Spring and Spring.Net; Is there an eq...
What I mean is: Imagine we have a 8 byte variable that has a high value and low value. I can make one pointer point to the upper 4 bytes and other point to the lower 4 bytes, and set/retrieve their values without problems. Now, is there a way to get/set values for anything smaller than a byte? If instead of dividing it in two 4 bytes "va...
I'm interested in simulating a number of clients attempting to invoke a WCF service simultaneously and I need to measure the average response time for each client.
Are there any good tools available for load/stress testing WCF services which have multiple end points(wsHttp, netTCP etc). I've heard that SOAPUI is the most prevalent testi...