.net

WCF Named Pipes within WPF application

How would you run a WCF named pipe service in the background of a WPF Windows application? I can't seem to find any samples of running the WCF server within a WPF application. Any ideas? I am currently using the following code in the Application_Startup. Does this need to run with it's own thread? Using Host As ServiceModel.Serv...

When was System.Windows.Threading.Dispatcher.Invoke(System.Delegate, System.Object[]) added?

Some people using my app seem to be getting System.MissingMethodException: Method not found: 'System.Object System.Windows.Threading.Dispatcher.Invoke (System.Delegate, System.Object[])' Does anyone know in what version of the framework this overload was added, is it safe to use?(its not marked deprecated). ...

How can I get the number of bytes downloaded in WebBrowser component

Hi I am using the system.windows.controls.webbrowser component, I need to display in a different component the amount of bytes downloaded from the moment the component was started, any idea how this can be done? ...

xbap custom loader in internet explorer

I have a xbap application, which works fine. But the problem is that I've nested the xbap app within an iframe. The site`s background color containing the iframe is black. I want to change the xbap application loader (downloader) background color to fit the site appearance. Any ideas? ...

Auto-update of my view

Hi all, I have created an application which has the following: A database created in VS2008, LINQ to SQL A view of the database: XAML part <CollectionViewSource x:Key="CustomerView" Source="{Binding Source={x:Static Application.Current}, Path=Customers}" /> C# part public IEnumerable<Customer> Customers { get ...

Can I use Interface for CAO in Remoting?

In CAO there is no URI, so specified type has to be registered on the server side. But if my client and server interact through the same interface (remote object implements interface) then how can I call CAO remote object from client side. It gives me exception if I try to call Acitvator.CreateInstance using interface type. for e.g. Re...

mex binding error in WCF

Hello everyone, I am using VSTS 2008 + C# + .Net 3.0. I am using self-hosted WCF. When executing the following statement, there is the following binding not found error. I have posted my whole app.config file, any ideas what is wrong? ServiceHost host = new ServiceHost(typeof(MyWCFService)); Error message, Could not find a base addr...

ADO.NET Entity Framework does not allow gridview clicking sort columns?

I am using the ADO.NET Entity Framework data model. I send data from SQL to a GridView via ADO.NET Entity Framework. But how can i sort gridview'columns click if i use EF ...

Html To Doc(Word) Or RTF Format

Hi, What would the best possible way to convert a html page (with css, tables, images etc.) to be converted to word or rtf format. I already know about adding the content-type = application/word header and that's not an option because we need the images embedded in the document so that it can be viewed without an active internet con...

clickonce deployment issues

I'm working on a project deployed with clickonce, and i'm running through several issues. There are 2 components in my software solution : a desktop client which needs .Net framework 3.5 to run, and a server (asp.net application) which lists available documents and provides a way to install the desktop client with clickonce. My first p...

WPF Canvas Button?

Hi All I'm learning WPF at the moment. I have a vector graphics canvas that I'd like to use as the background for a button, but I can't seem to find a way to do this in the documentation. I thought this would be an obvious thing to want to do. Regards, Mark ...

How can I build XmlDocument with many xml namespaces in a single node?

I'm trying to build XmlDocument so that after serialization I could achieve something like this xml: <?xml version="1.0" encoding="UTF-8"?> <wnio:element xmlns:wnio="somuri" xmlns:xf="abcd"> <xf:nestedelement>somtext</xf:nestedelement> </wnio:element> The things is that XmlElement allows to specify ONLY ONE namespace via NamespaceU...

Retrieving Terminal Services Session ID In .NET?

Can anyone please help me discover the .NET equivalent of the following C++ code: DWORD session_id; ProcessIdToSessionId(GetCurrentProcessId(), &session_id); I'm trying to find the current terminal services session number to uniquely name a named pipe that two programs inside the same session are using to communicate with each other. ...

Should Guid.Empty Result in ArgumentException or ArgumentOutOfRangeException

Imagine that you have a method with the following signature: public void DoSomething(Guid id) If Guid.Emtpy represents an illegal value, which Exception type would it be most appropriate to throw? ArgumentException or ArgumentOutOfRangeException? I'm leaning slightly towards ArgumentException, since I don't think that all Guids excep...

Exposing .NET WebService to Other Platform (Java)

I wanted to develop a Web Service in .NET and wanted this Web Service to be consumable in Java. What are the steps I need to follow. I have written couple of web service but client for all was .Net. Please let me know the Steps that I should follow. Also My web Service is going to take a Binary File as the Input, please let me know how...

How can I prevent focus change when ShowDialog exits?

I'm trying to implement an alt-tab like behaviour for our application. When the user presses ctrl-tab, a form pops up (using ShowDialog); when they press it again, it focuses the next control in the app's main form. When they release ctrl, the form is hidden. Unfortunately, when that happens, focus is sent to a different control to th...

count-down timer

My main problem is that I don't know how to search what I'm looking for in google,because I get different results(probably its not count-down timer). I want to calculate how much time a function takes to be executed.The instructions take a long time in seconds to be executed(seconds,not miliseconds). How to do it in C#/NET,example? ...

Is it possible to monitor the time on a linux server from a .net app on windows?

I'd like to monitor the time on a couple of servers. Ideally I'd do this in an app running on a windows machine. Is this possible and where might I start? I know next to nothing about Linux. ...

Why does wordconv.exe randomly return -14 when called from a .NET windows service

One of my coworkers wrote a .NET windows service that converts .doc to .docx files. In order to accomplish that goal, he uses wordconv.exe which comes with the office 2007 compatibility pack. Most times everything works fine, but under certain circumstances wich we weren't able to reproduce yet, wordconv.exe doesn't convert, but retur...

Resolving a namespace using the keyboard

When writing code in .NET, if you use some function in a namespace that has not been included in your page, you get a tooltip-like popup [e.g. System.Data.Sql?]. If you click it, it adds the namespace to your page. Is there a keyboard short-cut to add the namespace? (I know you can use the right-click button on the keyboard, go to Res...