.net

Determine the specific fallback ResourceSet/Cutlure used by the ResourceManager when lookuping an object

So I have a localized Winforms application with a bunch languages already. Some of those we localized are neutral cultures we fallback too. Everything is setup and working correctly there. In the field we download new resource satellite assemblies on demand (like a poor mans on demand differed download you get from ClickOnce). For logg...

How to use an .net assembly installed in GAC in my project.

Hi All, i need to refer an assembly installed in the GAC in my project. can any body explain me the steps for using the assembly installed in GAC. thanking you. ...

SMTPClient.Send

Hi All, I have a memory leak when calling SMTPClient.Send. Please help to fix it. ...

Design pattern for a database application that must work disconnected

Hello, I have to design an application is mostly an interface with a database for data entry. The application must be able to work while it is disconnected from the database with cached data and insert that data when it has connection again. There will be two different modes, connected or disconnected, no need to detect disconnection in...

Fastest(performance-wise) way to share data(not objects) between .Net & Java

I know of at least one post which has same words like this. But this is not exactly same as that post. I'm trying to work a way to "share" data between a .NET and Java application. I'm not concerned about objects, but just plain strings if u like. I have a .NET application capturing real-time data and a Java application which has capab...

Convert linq method syntax to query syntax

Not that it would be better, but I'm trying to get my head around turning the following method syntax to query syntax to see the difference. long diskSpace = Directory.EnumerateDirectories(@"c:\") .SelectMany(Directory.EnumerateFiles) .Sum(fileSize => new FileInfo(fileSize).Length); ...

SMS Application

Hi, I just wanted to know is there any free sms gateway for sending SMS. If there is one, how to go on to developing my free sms service/software? Any guidelines please. Thanks ...

DLL Dependancies

I have an C# library file that uses a web-service reference in it. I have referenced Microsoft SOAP type library v3.0 and use Visual studio 2008. When I create a set up project, I get an error that says mssoap30.dll and msxml4.dll have dependancies that have not been determined automatically and the set up procedure fails. What is the r...

How to use embedded resource in ASP.Net?

Hi all, I'm practicing to use embedded resource in ASP.Net. I wrote a javascript file, put it into a C# class library and change It's Build Action Property to Embedded Resource. In my web project, I added reference to the that class library. I want to use that javascript file in my web pages but i don't know how? please help me Thanks ...

Problem with ilasm

I have a quite big program in .net 3.5 SP1 which is compiling just fine. However when I want to obfuscate it with Obfuscator Pro (evaluation for now), Obfuscator stops with the following error: [Build Output] This application has requested the Runtime to terminate it in an unusual way. [Build Output] Please contact the application'...

Create file without opening/locking it?

Hi, Does anyone know of a way to (reasonably simple) create a file without actually opening/locking it? In File class, the methods for file creation always return a FileStream. What I want to do is to create a file, rename it (with File.Move) and then use it. Now I have to: Create it Close Rename Reopen for use ...

VB6 Format function: analog in .NET

There is String.Format function that is referred to in the documentation as the analog for Format function from VB6. There's also Format function from VisualBasic namespace that is provided for compatibility and basically has same powers as String.Format. Indeed, those two format dates and numbers. But VB6's function was also able to f...

Is there a SqlFileStream like class that works with Sql Server 2005?

For the background to this question, see “How to I serialize a large graph of .NET object into a SQL Server BLOB without creating a large buffer?” that now has a large bounty on it. SqlFileStream gives you an IoStream that sits on top of a blob (varbinary) value that is stored in the database. However due to limitations ...

How To Remove Foreign Key Reference In Entity Framework

Hi, I'm updating my model which is built by entity framework. I removed a entity from the designer and then there pops up a error said "Foreign key constraint 'FK_Table1_Table2' ... no mapping specified for the table Table2. Now I really don't want to map Table2 into entities. What should I do to clear the edmx and avoid such error? Can...

Programatically changing the look of Windows Explorer?

Say I wanted to change the font of certain folders in Windows Explorer programatically, can I do that? And if I did it as a plugin application, how can I integrate it with Explorer? ...

How do I block access to files when using the System.Web.Routing.UrlRoutingModule?

I'm using the System.Web.Routing.UrlRoutingModule. With that I'm writing: routes.Add(new Route(@"cart/add", new RouteHandler("~/Order/CartAdd.ashx"))); routes.Add(new Route(@"cart/delete", new RouteHandler("~/Order/CartDelete.ashx"))); ... And I also have one route called: routes.Add(new Route(@"{*url}", new RouteHandler("~/Error/Pa...

RijndaelManaged "Padding is invalid and cannot be removed" that only occurs when decrypting in production

I know other questions have been asked on this but none so far have provided a solution or are exactly the issue I have. The class below handles the encryption and decryption of strings, the key and vector passed in are ALWAYS the same. The strings being encrypted and decrypted are always numbers, most work but the occasional one fails...

Run an encrypted application

I wish to seal a .net application before distributing it to the user. My purpose is to seal the application "app.exe + *.dll" and prevent the user from loading the application except from an application loader "Process.Start(app.exe)", the idea is to prevent the user from loading the application by double clicking on "app.exe". I found...

Shortcut to collapse all documentation headers/comments in Visual Studio

Is there a way to collapse all documentation headers (/// comments) in the current file in visual studio (2008+)? ...

DependencyProperty with TwoWay Binding

I have a highly customized Edit control which inherits Richtextbox. I needed a way to bind a Value to this control, so I registered new DependencyProperty, but have trouble to code it like I need. public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(string), typeof(XliffRichCe...