|
For a beginner don't you think this is a bit complicated? Connect both apps to a database, plenty of examples and easy for a beginner to understand
only two letters away from being an asset
|
|
|
|
|
Until race conditions come into play, and he has to use either IPC or mutexes to stop one application reading as the other is writing
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Computafreak wrote: Until race conditions come into play
Explain where and how this senerio would occur. Are you saying the database wouldn't be able to deal with concurrency issues? How would using a webserive or writing to a file lessen this risk?
only two letters away from being an asset
|
|
|
|
|
I've thought about it a little, and looked into it a bit more. You're right, race conditions don't seem to happen here. I got the roles backwards in my head. Sorry about that
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
My code is really basic using an Http channel to send a client activated object and it works fine when I run the client and the server from the same pc.. But when I try to run the server on one pc and the client on another, the client just shuts automatically. The 2 pcs are not connected in any way, but they both are using wifi.. and my code uses an http channel, so they can connect through the internet.. right? Do I need their IPs for them to find each other, or is the shared Http channel port enough? Sorry.. I'm a beginner.. any help would be amazing...
modified on Saturday, June 27, 2009 9:52 AM
|
|
|
|
|
Maybe you could post a piece of the code of client and server? Could be helpful...
|
|
|
|
|
My server is:
public static void Main()
{
HttpServerChannel channel = new HttpServerChannel(9000);
ChannelServices.RegisterChannel(channel,false);
WellKnownServiceTypeEntry remObj = new WellKnownServiceTypeEntry
(
typeof(ProcessActivator),
"ProcessActivator",
WellKnownObjectMode.SingleCall
);
RemotingConfiguration.RegisterWellKnownServiceType(remObj);
Console.WriteLine("Press [ENTER] to exit.");
Console.ReadLine();
}
My client has:
HttpClientChannel http_channel = new HttpClientChannel();
ChannelServices.RegisterChannel(http_channel,false);
IProcessActivator.IProcessActivator process_activator1 =
(IProcessActivator.IProcessActivator)Activator.GetObject
(
typeof(IProcessActivator.IProcessActivator),
"http://localhost:9000/ProcessActivator"
);
process_activator1.Run("IExplore.exe", @"http://www.codeproject.com");
There's also a library called ProcessActivator and it just has the run command... I included the remoting references.. The code runs fine when i run both the server and the client on the same machine... but they won't work with each on a separate pc...
|
|
|
|
|
Nevermind.. I figured it out..
I was making a call to the local machine instead of the remote machine(IP address)
"typeof(IProcessActivator.IProcessActivator),"tcp://localhost:9000/ProcessActivator"
Solution:...
Pass the IP address of the remote machine to the client application
"typeof(IProcessActivator.IProcessActivator),"tcp://192.168.0.104:9000/ProcessActivator"
|
|
|
|
|
I would like to write a picture viewer app that outputs the image over the entire screen, not just the desktop. I can't seem to find the solution to write over the taskbar. Any help would be appreciated.
Thanks
|
|
|
|
|
You need to set the window state to be set manually, and you set the coordinates of the window so that the Top and Left are 0. You can use Screen.PrimaryScreen.Bounds to work out what the width and height of your screen is. Obviously, you'd need to do more work if you wanted to cover other screens in a multi monitor setup, but the Screen class provides access to the other monitor information in AllScreens .
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks Pete, but this will only cover the desktop, not the taskbar.
|
|
|
|
|
Set TopMost=true; on this window.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
So simple... Thanks a lot Pete
|
|
|
|
|
So simple - that's me.
xax wrote: Thanks a lot Pete
You're welcome.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
dataview dv=new dataview();
dv = dtCompanyForm.DefaultView;
dv.Sort = "ID";
dtCompanyForm.DefaultView = dv;
but last line is getting error
|
|
|
|
|
swetha_insoft wrote: dtCompanyForm.DefaultView = dv;
you can use:
//to sort dataview
DataView dv = new DataView(dtCompanyForm, null, "Id", DataViewRowState.CurrentRows);
//to assign dataview to datatable
dtCompanyForm= dv.ToTable();
|
|
|
|
|
datatable dt=new datatable();
"dt" is having some values.
i wnat to sort these values using dataview....
can anyone help me
|
|
|
|
|
//Assume that my column to sort is "Id"
//Temp is my datatable
DataView dv = new DataView(Temp, null, "Id", DataViewRowState.CurrentRows);
GridView1.DataSource = dv;
GridView1.DataBind();
|
|
|
|
|
Hi Experts
i am using SQL Server 2005 and VS 2005
i Have Database in SQL Server 2005 in My db 120 tables ,35 SP,s ,30 Function i want to create whole database at run time using C#.NET.pls suggest me how many possiable solutions are and How To Create it.
tell me the example if possiable.
Thank u
Dinesh
|
|
|
|
|
Sharma Dinesh Kumar wrote: Database in SQL Server 2005 in My db 120 tables ,35 SP,s ,30 Function
Doesn't really matter in this case, what is the structure of your database.
Sharma Dinesh Kumar wrote: How To Create it
Have a look here at MSDN[^]. This only creates database, but you can enhance it further to execute your whole script.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
there are too many ways to do it, if you wish to use Linq to Sql Classes (.Net3.5), you simply create database with dbObject.CreateDatabase(); method call. or you can generate the create script with Sql Management Studio and then execute it with a sqlconnection object, otherwise there is tool named SQL_Packager[^] it makes these generating scripts and writing codes to execute it steps with simple wizarded UI.
|
|
|
|
|
|
i need help, suppose i have aspx page and inside aspx page one gridview,one dropdownlist and one print button.I have fill gridview onselectindexchanged event of dropdownlist.i want to take print of gridview on client side as well as datasave in database when i click on print button
sudhir kumar
|
|
|
|
|
Do not repost same question.
|
|
|
|
|
Make the "print" button a submit, when you click on it you submit form to page that stores this data in database, and then you redirect to a page which will re-render all this informaiton in gridview and call over JavaScript page print command which is called this way: window.print()
Maybe someone else has better suggestion, you could submit data over "AJAX", but, it's same thing, anyhow he need to submit this data, only if you would save it over ajax you would save some time re-rendering gridview.
|
|
|
|