.net

save sms to database in .net

I want to save any sms that comes to my mobile which is connected my pc,should get save automatically to the database. I want to how can I achieve this using .Net(c#) . Please provide me a solution for this. ...

asp.net Bad Request

Hi, Im using a lot od devexpress controls. I have noticed that sometimes i think mainly while making callbacks on devexpress controlls there is a timeout and nothing happens. Then when I try to klick on another link or something (for example refresh page) there is http 400: Bad Request. I cant do anything till I delete cookies, then ...

Base Class in EntityFramework 4 POCOS

I Have Single Table Inheritance in EF4. when i use POCOs as it , it works will. but if i want to put pocos code in base class then inherit from it i get this Error : Blockquote Mapping and metadata information could not be found for EntityType 'ConsoleApplication2.Service'. this is my POCOs with parent (Solution ) and child ( s...

Convert BitmapSource to Image

Im tying together two libraries. One only gives output of type System.Windows.Media.Imaging.BitmapSource, the other only accepts input of type System.Drawing.Image. I havent been able to find a way to convert a BitmapSource to a Image. ...

How to detect .NET 4 from ASP.NET?

I have a web server that is run by a third party. I don't have direct access to the server but I can deploy ASP.NET code to it. I want to detect if that server is running ASP.NET 4 / .NET 4 or not. What is the easiest way to do that? Is there an environmental property somewhere that would tell me? Or should I try to load a particula...

Public & Private Keys in .NET besides RSA

Hi All, Am I missing something obvious here (I hope I am), besides RSA, are there any other crypto methods in .NET that use a public & private key? Thanks! ...

Why are C# structs immutable?

I was just curious to know why structs, strings etc are immutable? What is the reason for making them immutable and rest of the objects as mutable. What are the things that are considered to make an object immutable? Is there any difference on the way how memory is allocated and deallocated for mutable and immutable objects? ...

Using WM_COPYDATA with Delphi-Prism applications.

Does anyone have a good delphi-prism example of receiving and interpreting a WM_COPYDATA message? I'm particularly interested in how to deal with the message data structure. ...

How can I use a "default branch" inside a pick activity using workflow foundation 4?

I'm using a pick brabch acitivity with two branches. Each branch has a receive action, but when the workflow is paused on the pick activity waiting for a cliente comunication and I call a service method wich is not in those brach activity I got a error. Actually I think the workflow enter in an infinite loop or something like. Is there ...

Windows Service to synchronise with Exchange Server Contacts

I want to write a windows service that periodically synchronises a database with the contacts in an exchange 2007 server instance. Is this possible with Exchange Web Services or can I do this with powershell? If I go the EWB route, does this means that I need the client to set up the Web Service end point and make it pubilc? The cli...

Which functions does EF 4.0 support?

Sometimes I get an exception like this: "This method cannot be translated into a store expression". Is there any list what EF 4.0 supports and what doesn't? I have just googled, but nothing ;(. ...

SQL Server 2008 - Update Query Timeout.

I'm using SQL2008 and .NET 4. The following UPDATE query causes timeout errors. Table Pages has 600,000 records. Error: System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Query: UPDATE Pages SET Checked = 1...

AES 256 encryption in .NET Framework 2.0

Hi, Does anyone know if C# can be used in .NET Framework 2.0 to use AES 256 encryption and decryption? Appreciate if the in-built framework supports this or if we have to use any external APIs for the same? Thanks. ...

How to test lambda functions with Moq?

There is a function: public class MyCacheClass : ICache { public void T GetObject<T>(Func<T> func) { T t; ... t = func(); ... return t; } } public class MyWorkClass : IWork { public Object MyWorkMethod(string value) { return new object(); } } These functions are ...

rearrange string with mixed languages (LTR + RTL)?

Hi guys,I have a text with mixed languages, (one LTR and the other RTL).when sending the string on SMTP the string gets mixed up .Is there any way to recognize the string ? ...

User config settings get trumped by Application.exe.config settings file

Hi all I have an application 'App.exe' which has an 'App.exe.config' file alongside with it. If I make a change to the user.config file that gets copied to my Local Settings folder, that change gets trumped with the values on App.exe.config at runtime. My previous understanding is that the user.config file would have the latest value s...

How to change the TrackBar Tick Color in Winforms?

I have a winforms app using a trackbar. The BackColor property is available for change, but doing so makes the color of each "tick" almost invisible. I don't see an explicit property to modify the color of the "tick". Is there something I am missing or a way to change the color of the tick? ...

Media player refuses valid file when offered through handler

Hi, I'm loading up a JW player (it's an old version 3.16) using the SWF object and passing in a "file" variable containing the url of the video to be loaded. What I want the player to do is connect to a page I've set up to deliver dynamic content loaded from a database (i.e. stored as blobs). However when I pass in the URL of my handle...

F# / .NET null instance oddity

I have this C# DLL: namespace TestCSProject { public class TestClass { public static TestClass Instance = null; public int Add(int a, int b) { if (this == null) Console.WriteLine("this is null"); return a + b; } } } And this F# app which references th...

Cutting down on the number of public classes in my .NET application?

I'm concerned that a lot of the classes in my application are public. I figure that the majority of them don't need to be. Are there any tools that can analyse my project (or the binary) and tell me which classes can safely be made internal? ...