.net

How do I draw a graduated border on a polygon using GDI+ via C#/WinForms?

I have polygons of various shapes and sizes. They have a solid fill and currently a solid border. I would like to give the polygons a gradient on their edge to soften them. So far I've tried using a Pen with a LinearGradientBrush and whilst the effect it produces is very interesting it's most definitely not what I want ;) I've looked ...

.NET Object Dump

Hi all, I have a question about the dump of an objet. 0:000> !do 0x012817b8 Name: blabla.Union2 MethodTable: 009231ac EEClass: 00921548 Size: 16(0x10) bytes Fields: MT Field Offset Type VT Attr Value Name 790fd0f0 4000003 4 System.Object 0 instance 00000000 o 7912d7c0 4000004 8...

Access Expression methods in IronRuby

This code works fine in C#: Expression.Lambda(LambdaBody); But none of the methods for building AST seem to visible from IronRuby. I required Microsoft.Scripting.Core and Microsoft.Scripting libraries. Do I need something else? Here is the IronRuby code: require 'C:\reorganize\software\ironruby-1.0rc3\ironruby\bin\microsoft.scripting...

Android to .NET - XML-RPC or KSoap?

We are designing an internal system that will have a .NET PC base station and many Android mobiles, communicating over WiFi. Can't decide between SOAP or XML-RPC protocol. Primary concerns are maturity, compatibility, and the minimizing of coding/integration, in that order. Which is best? Ben ...

NCover couldn't create a coverage report. 0 Passed, 0 Failed, 0 Skipped

Hi, I am using Visual Studio 2008 Professional with TestDriven.NET 2.14.2190, Windows XP (x86). When i right click on my unit tests project, test with - Coverage, I obtain the following output: NCover couldn't create a coverage report. and the result: 0 Passed, 0 Failed, 0 Skipped I have no other versions of NCover installed, jus...

Can I use Bind Variables with odp.net and Oracle 8i?

Hello, due to the lack of an testing environment I need to know if the following scenario will work: I have installed the Oracle Data Provider for .Net version 9.2.0.4. In production I'll have to communicate from my C# application with two Databases, an Oracle 8i and 9i. Does Oracle 8i support Bind Variables in this scenario? I'm li...

Create an Xml file from an object

I work as a web developer with a web designer and we usually do like this : - I create the system , I generate some Xml files - the designer display the xml files with xslt Nothing new. My problem is that I use Xml Serialization to create my xml files, but I never use Deserialization. So I'd like to know if there is a way to avoid fix ...

Wcf transaction

Is there a way to know in a wcf operation that a transaction has committed? Ok, second attempt into being more specific. I got a WCF service with an Operation with Transaction flow allow. Now when a client call my wcf service it can have a transaction. But my service is also interested in the fact that the transaction on the client ...

Does WCF make the consumption of Restful web services trivial?

I have an ASP.net application that currently consumes SOAP web services. This platform is targeted at .net 2.0 and I use Visual Studio Professional 2005 to maintain it. I now have a requirement to consume a number of restful web service within the same application. Is the consumption of Restful web services with WCF so trivial, compared...

How can I use satellite assemblies in ASP.NET?

I love the idea of breaking out culture-specific resources into separate assemblies, but am confused as to how this can be done for an ASP.NET application. Can someone give me a quick rundown, or perhaps point to a tutorial on the subject? ...

persist vsx package settings in project configuration file

I developped a Visual Studio 2008 package that adds some menu/commands to the IDE. I have settings related to this package that I would like to save for each VS project where I use the package. How do I get the current selected project (assuming I have either a solution with several projects) using DTE2 methods. How do I programmatica...

"Row not found or changed" Problem

Hi there, I'm working on a SQL CE Database and get into the "Row nor found or changed" exception. The exception only occurs when I try to update. On the first Run after the insert it shows up a MemberChangeConflict which says, that my Column Created_at has in all three values (current, original, database) the same. But in a second attemp...

Need help with creating PDF from HTML using itextsharp

I'm trying to crate a PDF out of a HTML page. The CMS I'm using is EPiServer. This is my code so far: protected void Button1_Click(object sender, EventArgs e) { naaflib.pdfDocument(CurrentPage); } public static void pdfDocument(PageData pd) { //Extract data from Page (pd). string intro = pd...

C# Threading and Sql Connections

I have a method that attempts to update a sql server database in an ASP.NET application. If the update fails, it catches the exception and then queues the update in MSMQ, and then spins up a new thread that will later de-queue the pending update and try again. When the thread starts, it fails to open a database connection because it is a...

c# binary writer delete some portion of text in a file

Hi I am writing the below structure in to the file using Binary Writer. File Structure: Num of Employees {employee num & name, employee1 num & name, employee2 num & name...}. I will get a command with employee num to delete that particualr employee details and update Num of employees feild accordingly. What is the best way to do the a...

Why is ServerVariables["HTTP_REFERER"] skipping a page?

Here is my situation: Page1.aspx redirects to Page2.aspx which does some processing (does not display to the user) and then redirects to Page3.aspx which checks the ServerVariables["HTTP_REFERER"] or Request.UrlReferrer. I understand that the referring information can sometimes be blank and can't be entirely relied upon; however the Se...

Problem building proxy class for SOAP web service

I'm trying to build the proxy class for a web service using the wsdl Executing this cmd wsdl [http://WSDL_URL] I'm getting Warning: This web reference does not conform to WS-I Basic Profile v1.1. R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for the use attribute in all soapbind:body, soapbind:fault, soapbind...

How do I validate a RadioButton on MVC?

I am using a client side validation and it is starting to get messy, considering I am making a form. With all the textbox and radio button validations, the controller will be overwhelmed. How do I validate and display the error Message for Radio Buttons and multiple textboxes in MVC on the MODEL side? A simplified version of what I ...

Running Java, Python, Ruby and Perl programs in .NET

I've .NET framework 3.5 installed in my laptop. Just .NET alone, no Visual Studio. How can I run Java, Python, Ruby and Perl programs from the console? Do I need to install something else also, for running these language files? In case there is a need for something extra to be installed and after i have all of them, what are the comma...

LitJSON specify which object properties need to be mapped to Json

I'm using LitJSON. I have a List of objects that I need to convert to Json but I don't want to map all the properties of the object just a select few. Is there a way to specify which properties I want to convert to json? ...