.net

Automatic .NET code, nhibernate session, and LINQ datacontext clean-up?

Hi all, in my goal to adopt better coding practices I have a few questions in general about automatic handling of code. I have heard different answers both from online and talking with other developers/programmers at my work. I am not sure if I should have split them into 3 questions, but they all seem sort of related: 1) How does .NET ...

Why doesn't interface inheritance work when writing shell extensions in c#?

According to this article about writing shell extensions in .Net, inheriting the shell interfaces as you might naturally do when writing code doesn't work. I've observed this in my own code as well. Doesn't work: public interface IPersist { // stuff specific only to IPersist } public interface IPersistFolder : IPersist { // st...

How do i make formatted json in C#.NET

I am using .NET json parser and i would like to serialize my config file so it is readable instead of {"blah":"v", "blah2":"v2"} to something nicer like { "blah":"v", "blah2":"v2" } my code is something like using System.Web.Script.Serialization; var ser = new JavaScriptSerializer(); ...

C# and Metadata File Errors

Hi All I've created my own little c# compiler using the tutorial on MSDN, and it's not working properly. I get a few errors, then I fix them, then I get new, different errors, then I fix them, etc etc. The latest error is really confusing me. --------------------------- --------------------------- Line number: 0, Error number: CS0006...

How can I Unescape and Reescape strings in .net?

I need a textbox on a WPF control that can take in text like "Commit\r\n\r" (which is the .net string "Commit\r\n\r") and convert it back to "Commit\r\n\r" as a .net string. I was hoping for a string.Unescape() and string.Escape() method pair, but it doesn't seem to exist. Am I going to have to write my own? or is there a more simple w...

Wordpress using .NET?

Have anyone seen or tried Wordpress.NET? I read an article about it before, but it is now nowhere to be found. Any similar open source where I could get one? ...

Algorithm for Source Control System?

I need to write a simple source control system and wonder what algorithm I would use for file differences? I don't want to look into existing source code due to license concerns. I need to have it licensed under MPL so I can't look at any of the existing systems like CVS or Mercurial as they are all GPL licensed. Just to give some back...

Looking For Free Licensing solution for .Net solutions

I am looking for free & good licensing solutions for my own projects - like using a trail version for the product, or a time limit or features limit. If there isn't anything free available, please guide me to a good one that I can purchase. ...

Hiding Command Prompt with CodeDomProvider

Hi All I've just got my own little custom c# compiler made, using the article from MSDN. But, when I create a new Windows Forms application using my sample compiler, the MSDOS window also appears, and if I close the DOS window, my WinForms app closes too. How can I tell the Compiler? not to show the MSDOS window at all? Thank you :) ...

Using NHibernate's HQL to make a query with multiple inner joins

The problem here consists of translating a statement written in LINQ to SQL syntax into the equivalent for NHibernate. The LINQ to SQL code looks like so: var whatevervar = from threads in context.THREADs join threadposts in context.THREADPOSTs on threads.thread_id equals threadposts...

Can I ran 2 or more Tcp Sever applications on one computer?

Hi all. I have a client-server Silverlight application, which is use Socets. I have server appliaction on may computer(Win Form application) and client applucation as web site(Silverlight application). I use policy server which open port 943. Everything works fine on this application. But now I need to write another client-server applica...

Anybody else using MonoDevelop?

I'm starting a new project in MonoDevelop, and I want to see how other projects are using it. I tried searching through SourceForge, code.google.com, etc., but mostly I was just finding things like add ins or something related to MonoDevelop itself. So is there anyone else using MonoDevelop, especially open source? ...

[Flex 4 and .Net] Retrieving tables from SQL database

Hi everyone, As the title says, I want to retrieve tables of data from a SQL database, using Flex 4 and .Net WebService. I'm new to both Flex and DotNet. Please tell me a proper way to do it. This is what I've done so far: Retrieving an array of string: (this works) .Net: [WebMethod] public String[] getTestArray() { String[] ...

XML and .NET: How to replace specific node with many other ones loaded from raw xml data

Let's suppose we have an element like this one in the main xml file: <group name="gr1" filename="groups/gr1.xml"/>. The second file gr1.xml contains something like this: <item name="i1">Item one</item> <item name="i2">Item two</item> <item name="i3">Item three</item> Note that there is no XML declaration in gr1.xml, just plain items w...

Which architectural certifications are available to a person having 12+ years of experience in programming + Architecture.

I know Microsoft Certified Architect (too costly) and Sun Certified Enterprise Architect. But I have Microsoft Technology background. So am looking for something except these two. ...

Sending lots of mails using SmtpClient (C#) takes very long after a while

I'm using this piece of code to send a mail: SmtpClient client = new SmtpClient(); client.Host = smtpServer; client.Send(mailMessage); If I trigger this code ten times/second, then after some hundred mails, sending a mail takes 10 seconds... Could there be a queue involved here? Shouldn't this be asynchronous? ...

Benifits Of Using WPF to Develop Softwares

Hi All What Is Benefits of Using Wpf? WPF Software Is Speed Or Windows Form or Not Different? ...

.NET Remoting memory leak?

I have a Remoting Class as a Singleton <configuration> <system.runtime.remoting> <application> <service> <wellknown mode="Singleton" type="PTSSLinkClasses.PTSSLinkClientDesktopRemotable, PTSSLinkClasses" objectUri="PTSSLinkDesktop" /> </service> ...

Improving the performance of an nHibernate Data Access Layer.

I am working on improving the performance of DataAccess Layer of an existing Asp.Net Web Application. The scenerios are. Its a web based application in Asp.Net. DataAccess layer is built using NHibernate 1.2 and exposed as WCF Service. The Entity class is marked with DataContract. Lazy loading is not used and because of the eager-fetch...

Authenticating model - best practices

I come into ASP.NET from php so the reason why i ask my question is because it's totally different nature of how application works and handles requests. well, i have an exists table with user creditians, such as: id, login, password (sha hashed), email, phone, room i have built custom membership provider so it can handle my own databas...