.net

How to share domain classes and business rules between client and server like in RIA Services by writing them only once

In an ASP.NET - WCF application I want to share domain classes and business rules between client and server without rewriting them, just like in Silverlight RIA Services. Collecting these in one assembly and referencing this from client and server can solve the problem, but how: by adding service refence to client will generate these cla...

Scala on the CLR

The Scala homepage says that Scala 1.4 was runnable on the .NET framework - what is the status of Scala on the CLR now? Is anyone working on it? I think it would make a great GUI tool combined with GTK# and Mono... ...

how to use backgroundworker with remote class

How do I report change of the CountValue from this class to a backgroundworker class SomeOtherClass { public void CountUp() { int CountValue; for (int i = 0; i < 100000000; i++) CountValue = i; } } Here is the implemetation of the DoWork function private void backgroundWorker1_DoWork(object ...

.NET 3.0 Text to speech WAV output too big and slow process

I wrote a little application that takes in some text and converts it to an audio wav. now, it works fine except that the wav file produced is too big. I'm looking on ways to make the wav output smaller and make the whole process take less time. Sample Code : public byte[] ConvertText2Wav(string text) { MemoryStream wavAud...

asp.net gridview custom datasource

I have an application that extracts data from some xml that is stored in a database. In the Page_Load event I have the code extracting the xml out of the db, parsing the XML and saving the data I need in a list of Strings. Then I use this code: dataGrid.DataSource = from field in stringList select field; dataGrid.DataBind(); It prin...

Replace or Disable null-value in Datagrid in a formsapplication

I'm working on a formsapplication with a datagrid in it. How can I disable or replace (null)-values in cells when im databinding the grid to a database. When I am in the Designer view and clicking on the little arrow on the grid,I only see the option "Autoformat" ...

.NET Expression SDK LiveJob Authentication

I'm trying to stream a live feed to a Publishing Point but keep getting 'Access is Denied' errors. I can do this just fine in the Expression Encoder application (using a valid username and password). But when I try to use the same username/password in my custom app, I get that error. I've tried pre-connecting without credentials, whic...

Change ToolTipText display duration

I need to show the tooltips over a datagridview cell and that is currently achived using the tooltiptext of the datagridview cell property. I just need to increase the default duration of time that is tooltip is visible any quick ideas please ...

.NET WCF ServiceHost - startup arguments

I am creating a remotable object using WCF. This is a snipped of how I create the remotable object ... ServiceHost service_host = new ServiceHost(typeof(MyObject), new Uri[] { new Uri("net.pipe://localhost") }); service_host.AddServiceEndpoint(typeof(IMyServer), new NetNamedPipeBinding(), "MyServer"); service_host.Open(); return service...

How can I extract the code repetition here?

I am trying to extract out the common code pattern here in an extract method, but am having trouble finding the proper type for the type of Presenter. Any help? public bool CanGotoHome { get { return !(CurrentPresenter is IHomePresenter) && IsLoggedIn; } } public bool CanGotoImportanceOfAimsAndObjectives { get { return...

(VB.NET)Syntax Error in INSERT INTO statement - MICROSOFT JET DATABASE ENGINE

I need help, I developed a simple Access database and I create a VB .Net user interface. I can't INSERT data into the Table here's my sample code... I'm only a beginner in VB.Net i hope you could help me with this one Dim con As New OleDbConnection Dim cmd As New OleDbCommand Dim da As New OleDbDataAdapter Dim ds As New Data...

FBA Display Name with custom membership provider, WSS 3.0

I have a WSS 3.0 site (no MOSS) that uses a custom forms authentication membership provider and role manager, authenticating users against a remote web service (although at the moment it works against moq data). My problem is this: users when logged in have their name shown as being their login name, not their full name. I set up my pro...

How do i connect to a remote mysql server in .NET?

I am using ubuntu in VMWare. I installed mysql and have it running. I can login with the user root and a password. I have the IP of the VM box. In my code i wrote using MySql.Data; return new MySql.Data.MySqlClient.MySqlConnection("username=root;data source=192.168.100.129,password=xyz"); instead of data source i also tried server. I g...

Is there any logical problems in my code, anything required to optimize?

Is there any logical problems in my code, anything required to optimize? In this code I am fetching value from registry. Here I created one property. I am fetching that property in different file. Do we need set accessor here though? The value is fixed in the registry. public class Agent { public string version { get {...

Setting a C# project to always compile in Release mode and vice versa

How do I set a single C# project to always build in either Release or Debug mode regardless of the solution target mode? ...

set System.Threading.Thread.CurrentThread.CurrentCulture on .net compact framework

I need to show a Hijri Date time picker in windows mobile. .netcf 2.0 System.Threading.Thread.CurrentThread.CurrentCulture is not defined in .net cf 2.0 I have set the controla panel regional settings correctly but the date time picker still shows gregorian dates. How can I get a Hijri date time picker in windowxs mobile. Thanks. ...

How to add manifest to a .NET DLL?

I have a c# class library project that uses a COM dll registered on the system. I now want to deploy the COM dll as a side-by-side assembly, so I don't have to register it, or interfere with other applications that might use a different version of the dll. I have added app.manifest to the c# project using the add new item menu, but I'm ...

debugging error -- error attaching to w3wp.exe

Hello everyone, I am using VSTS 2008 + .Net 3.5 + C#. And I developed a custom Forms authentication module for IIS 7.0 and I attach to w3wp.exe to debug this module. During the attach process (I just select Tools -> Attach to Process, no further operation performed on the computer I am debugging -- I just wait for the attach to be compl...

Convert WAV bytes to MP3

I have a WAV file in bytes array form. I need to convert those bytes to an mp3 file using C# .NET. how could I accomplish that ? P.S: I need to be able to use bytes array instead of files. ...

.NET syntax of responsestring to match JS-callback function with multiple parameter

Hi, i would like to pass multiple parameters in my callback function and don't know who to do this... This would be the C# code: Response.Clear(); Response.ContentType = "text/plain"; Response.Write("content of param1"); Response.Write("content of param2"); Response.End(); and the JS code: ...