.net-3.5

Cannot use WCF service from windows mobile 5: no endpoint found.

Hi All, I'm trying to figure out how to call a WCF service from a windows smart phone. I have a very simple smartphone console app, which does nothing but launch and make 1 call to the service. The service simply returns a string. I am able to instantiate the proxy class but when i call the method it throws an exception: There wa...

Does the order of readonly variable declarations guarantee the order in which the values are set?

Say I were to have a few readonly variables for filepaths, would I be able to guarantee the order in which the values are assigned based on the order of declaration? e.g. static readonly string basepath = @"my\base\directory\location"; static readonly string subpath1 = Path.Combine(basepath, @"abc\def"); static readonly string subpath2...

How to keep process running after closing the program?

I am now developing an application on Windows Mobile 6.5 with .Net Compact Framework 3.5 using C#. There is a function in the program that I use it to update the location information periodically from server side, but if I keep running this computation, it would cost too much energe. For this reason, I want to run it in background and I ...

Enum.TryParse with Flags attribute

I have written code to TryParse enum either by value or by its name as shown below. How can I extend this code to include parsing enums with Flags attribute? public static bool TryParse<T>(this T enum_type, object value, out T result) where T : struct { return enum_type.TryParse<T>(value,...

SFTP with .net 3.5?

I need to connect to sftp server to download & upload file using C# in .net 3.5. Is Microsoft/.net 3.5 framework providing any inbuilt tools/mechanism/library to connect to sftp server to download & upload files? ...

C#, Display plain text in a form

I ve made this simple drawing to explain my needs: Plain Text in C# I can only find rather "complex" functions, like RTF Text box etc. I couldn't figure out how to display "plain text" in a Form1.cs (I do not talk about HTML to WinForm) (Search did not return any useful results) ...

InvalidOperationException (Lambda parameter not in scope) when trying to Compile a Lambda Expression

Hello, I'm writing an Expression Parser to make my API more refactor friendly and less error prone. basicaly, I want the user to write code like that: repository.Get(entity => entity.Id == 10); instead of: repository.Get<Entity>("Id", 10); Extracting the member name from the left side of the binary expression was straight forward....

.NET version with 64-bit versus 32-bit assemblies

What version of .NET (64-bit vs. 32-bit) will be loaded if some of the assemblies referenced in an app are compiled with 32-bit only (instead of AnyMachine) setting? Will the app still run as 64-bit or will it be forced to run as 32-bit if at least one of the referenced assemblies is compiled as 32-bit only? The app is running .NET 3.5...

ASP.NET 32-bit machine compiled now trying to run on 64-bit machine

I have an ASP.NET app that was compiled on a 32-bit machine. There are many different assemblies that are referenced. I opened the web site's main dll with ILDASM and looked at the .corflags. It stated it was ILONLY. However, when I run the web site locally on the 64-bit machine (Windows XP Pro 64-bit), I get "is not a valid Win32 ap...

How do i refactor this code by using Action<t> or Func<t> delegates

I have a sample program, which needs to execute 3 methods in a particular order. And after executing each method, should do error handling. Now i did this in a normal fashion, w/o using delegates like this. class Program { public static void Main() { MyTest(); } private static bool MyTest() { ...

ASP.net web page still displaying cached versions

My web page is still displaying a previously cached versions of the page. I have this in the page_load event: Response.Clear(); Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d); Response.Expires = -1; Response.CacheControl = "no-cache"; Response.Cache.SetCacheability(HttpCacheability....

Making a call to a .NET 4 library from 3.5

Hi, I have the need to make a call to the System.Xaml library in .NET 4.0. Is it possible to make a call to this library if your project is targeted to 3.5? ...

HTTP Handlers in Win2008/IIS7

We are migrating our web sites from Win2003/IIS6 to Win2008/IIS7. Our .NET code is in a WAP form with compiled binaries. I do dev work on a Win7/IIS7 box so had to learn early how to set up HTTP Handlers in this newer environment. What I have that has worked fine on my box is: <system.webServer> <handlers> <remo...

How can I convert XML files to one CSV file in C#?

I have a collection of strings that are XML content. I want to iterate thru my collection and build a CSV file to stream to the user for download (sometimes it can be hundreds in the collection). This is my loop: foreach (string response in items.Responses) { string xmlResponse = response; //BUILD CSV HERE } This is what my X...

What is the best approach upgrading from .NET 2 to 3.5?

We've been developing apps since .NET 2 release and now we are planning to upgrade to .NET 3.5. What is the best approach upgrading from .NET 2.0 to 3.5? BTW ... the external components that we use are: 1. EntitySpace - ORM 2. Microsoft Enterprise Library 3. Microsoft ReportingViewer 9.00 4. Telerik ASP.NET Controls ...

partially connected application using asp.net 3.5 (not mobile apps)

We had a requirement to build a ASP.NET 3.5 web application using web forms, WCF, ADO.NET and SQL Server. The users would connect via Internet. Recently we understood that it is possible that users would often remain disconnected and would have Internet access intermittently. I need to understand if we can create occasionally connected...

How late it is to not migrate to .Net 3.5 from .Net 2.0 ?

We have some applications that are being worked upon in .Net 2.0 since long back. I'm recommending my team to move the base from .net 2.0 to .net 3.5sp1 and focus and leverage from C# 3.0 but I'm facing difficulties in doing so. What are the implications of not migrating to .net 3.5 and C# 3.0 ? What are your experiences on this front an...

How to retrive message list from p2p

Hello friends I have a messaging system that uses p2p. Each peer has a incoming message list and a outgoing message list. What I need to do is whenever a new peer will join the mesh he will get the all the incoming messages from other peers and add those into it's own incoming message list. Now I know when I get the other peer info from ...

Web service client receiving generic FaultException rather than FaultException<T>

I am connecting to a Java Axis2 web service using a .NET web service client. The client itself targets the .NET 3.5 framework. The application that wraps the client DLL is 2.0. I'm not sure if that has any bearing. I have been given the WSDL and XSDs by email. From those I have built my proxy class using svcutil. Although I am able to s...

Deployment problems of asp.net 3.5 in iis 5.1

i have microsoft.net 3.5 application and have IIS5.1,,for deploying website do i need to do any thing aother than this 1.In IIS i created virtual directory named SPA and i browsed in to the location where my project is lacated and i added entire project file there( Do i need to add only bin file and login page or i need to add all pag...