.net

.Net Inconsistent Font rendering

I am creating an .Net 2.0 SP2 windows Forms Application. The form fonts looks fine in my machine, when i tried in another machine, it looks bigger. (This is not because of resolution difference, fonts are bigger relatively to other icons etc.) I tried to debug the problem and found following code returns different sizes on different mac...

NETCFSvcUtil and asynhcronous methods in output proxy

We are using NETCFSvcUtil for generating WCF services proxy. The proxy class contains only methods that calls the web services in synchronous way, but we need to call the web service methods asynchronously. Can someone tell me how to generate service proxies for .NET CF that calls WCF Services asynchronously? ...

.NET widget to convert RTF to HTML

I want a .NET widget that can convert RTF to raw HTML and vice-versa. Any suggestions? Edited: Free Tools only. ...

Any URL Routing Debugger in ASP.NET MVC

Any URL Routing Debugger in ASP.NET MVC ...

Is there no scope for a Windows application now?

My boss has asked me to write a CMS for a web-application. A place from where the user can customize all the necessary details, upload images etc. I know PHP but not JQuery. So things became difficult for me. I am proficient in .NET Windows applications, but my boss says it;s an end to Windows-based apps. He is right I know, but I want...

How do you build extensible data model

Hi, I'm thinking of building a ecommerce application with an extensible data model using NHibernate and Fluent NHibernate. By having an extensible data model, I have the ability to define a Product entity, and allow a user in the application to extend it with new fields/properties with different data types including custom data types. ...

Why can't we use sealed classes as generic constraints?

Can you guess what is the reason to not allow sealed classes for type-constraints in generics? I only have one explanation is to give opportunity to use naked constraints. Sorry, for editing. I think you need to rephrase the question title. It should be "Why we can’t use sealed classes as generic constraints?" – this.__curious...

IList<T> where T is a generic class

Hello there.. I need to create a generic IList where T would be a generic class with various interfaces. For example ChannelFactory<IService1> or ChannelFactory<IService2> and etc .. ...

How to go back to a clean user interface code ?

I am working on a winforms project containing some forms and controls. Each one is translated in 4 languages. There is one form called "PropertiesForm" which is a nightmare to maintain : it has a tab container with 6 tab pages, and more than one hundred controls in it, with dirty code trying (and often failing) to keep the whole thing co...

How to have different instances of the same application log to different files with log4net?

Dear ladies and sirs. My question is similar to this one, but with a somewhat simpler context. In my case I have a single application which may be run twice (at most) simultaneously with different command line parameters, so each instance knows its context. The app.config file defines a log4net section to configure logging. Here it is:...

sending and receiving data to a CGI page from ASP .net webservice

How can I send data from my .net web service to a CGI page and collect response? It is an integration project. One side (Client A) is collecting service requests in windows application + Sql server. another side (Client B) provides the services however they can accept the request from a cgi url http://mysite.com/cgi-bin/process.cgi (fa...

Is there a way to decrease xbap application size?

My question is how to decrease deployed xbap application size? ...

Why do casting to (int?) work while (string?) doesnt in LINQ queries

Hi, I'm writing a simple LINQ to XML query. As often, the some elements might be missing for some nodes in the XML document. To solve this issue, I tried to use nullable types and the coalesce operator as proposed by Scott Guthrie. Whan effect that I noticed is that casting elements to (string?) dit not work while casting to (int?) work...

Invoke Action Method from Clicking a button in ASP.NET MVC

I want to know if I can call a method in the controller when a button is clicked. I have a view called home and when the view is loaded, it invokes the Index action method in the controller. I have a Button (HTML or ASP.NET) called LoadData. When I click the button, I need to load some data in the same view called Home. How do I do th...

Sending an email attatchment increases the attatchments file size in .net

I am currently working a piece of code which needs to send an attachment in the email it generates. The attachment is a PDF document. Due to requirements I am unable to save the PDF and send it, so I have had to create a memory stream attachment. The issue I have with this is that the file size is _500KB. However save the file on my ma...

Invoking a http post URL from iphone using .net web service

Hi all, I need to call a url from my iphone when i tap on a button. The url is taking a value from the UITextField as argument, also it is using a POST method to invoke the webservice. how do i use the URL in my iphone. I had done the same with GET method. but for that i created a url string with the value from the textfield. it cant b...

Should a class with a Thread member implement IDisposable?

Let's say I have this class Logger that is logging strings in a low-priority worker thread, which isn't a background thread. Strings are queued in Logger.WriteLine and munched in Logger.Worker. No queued strings are allowed to be lost. Roughly like this (implementation, locking, synchronizing, etc. omitted for clarity): public class Log...

Which tool is Prefered to design a GUI .? Java or .net C# WPF

Hello , I want to know which is the best tool which can be used to make GUI . Currently I'm working on VC++ 6.0 and I can't give a good look(Vista Look) in that. So can anyone help me which one will be more suitable for GUI .. Java or any other tool(.net WPF) and if you can give the reason then it is very helpful. Thanks ...

Is there a way to see the native code produced by theJITter for given C# / CIL?

In a comment on this answer (which suggests using bit-shift operators over integer multiplication / division, for performance), I queried whether this would actually be faster. In the back of my mind is an idea that at some level, something will be clever enough to work out that >> 1 and / 2 are the same operation. However, I'm now wonde...

MVC futures async operations

I could not find a way of displaying a please wait page while doing an async operation; What I am trying to implement is a search page which displays 'please wait' animation while the search operation is being done by an async thread. I am pasting the simple test code I implemented below. The initial "Searching" view is never displaye...