 |
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

November 28th, 2005, 03:01 AM
|
Registered User
|
|
Join Date: Nov 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problem with Runtime
i have made an application using .NET runtime classes. Now when i run the client and server on my PC, it works absolutely fine. As soon as i try to run the client from some other system....it gives an exception.
In server..i have registered the channel using HttpChannel.
Yagyesh Agrawal
Systems Executive
KPIT Cummins Infosystem Ltd
Ph:9890252515
|

November 28th, 2005, 03:39 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
|
|
So many details you left out. Most important of them is the error that you are getting. Any application that you make using .NET is made using .NET runtime classes only (with the exception of VC++ in some cases) so that information is not of immense use. I would assume you are trying to get a remoting app running.
Post a few more details about the problem and you may get some help.
Regards
Ankur Verma
|

November 28th, 2005, 04:12 AM
|
Registered User
|
|
Join Date: Nov 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes i m trying to run a remoting app, that has a client and a server.
Actually the application is like...that at client user will request for a "Thought of the day" and the request will come to server. The server opens the local file and gets a "thought" from it and sends it to the client.
Now on my comp where i have develpoed this application its running absolutely fine. But as soon as client is run on some other system it gives System.IO.FileNotFoundException.
Yagyesh Agrawal
Systems Executive
KPIT Cummins Infosystem Ltd
Ph:9890252515
|

November 28th, 2005, 06:36 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Yagyesh, .NET is being kind to you and telling u all you need to know. I dont know where the thoughs of the day are comming from but seeing this error its not hard to imagine that your server app is reading these thoughs from a file and returning them to your client (please verify if this indeed is whats happening). Now at your comp you have this file that has the thougth of the day in it, just copy the file to the other comp as well. Like if in your server app's code you are opening the file from C:\"THofDay.txt", look for the file on your comp at this path and create the same path on the target machine and copy the file over there.
Regards
Ankur Verma
|

November 28th, 2005, 08:10 AM
|
Registered User
|
|
Join Date: Nov 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
This is true that the file is stored at server's local disk. But if i save the file at the client end, then there will be no need of the server. Client can get the thought from its own comp.
What i want is client request server for a 'thought' and server read a 'thought' from that thoughts file from its machine and send a thought back to client.
Yagyesh Agrawal
Systems Executive
KPIT Cummins Infosystem Ltd
Ph:9890252515
|

November 28th, 2005, 11:11 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Buddy i didnt mention any where to store the file at the client end. I dont want the very rationale of having such an application thwarted. Please, try to understand, what i meant with my last post is that if you are trying to run the server from some other location you need to have the resources the serer needs to run at that location as well. The file in question, is one such resource. So if you are running the server from some other locations you need to have that file over there as well.
Regards
Ankur Verma
|

November 29th, 2005, 12:04 AM
|
Registered User
|
|
Join Date: Nov 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Oh dear, it seems that i have to explain the scenario in detail.
I have built a runtime application that has a client and a server. Now as i have developed the application i tested it on my comp only. It means the server and client both were on the same PC.
Now my application is like, server is a program that is always running on my comp.I m not running server anywhere else. Now client is given a GUI where one can ask for a "thought of the day". Whenever client request for a thought, the request comes at the server that is running on my comp. The server then opens a local file from where it picks up a thought and send it to client.
Now the problem is when client and server both are on my computer, the application works perfectly fine. But when i run the client application form some other pc, the client application gives a System.IO.FileNotFoundException at their end. The server is always running on my comp.
Hope this post makes it very clear what the problem is.
Yagyesh Agrawal
Systems Executive
KPIT Cummins Infosystem Ltd
|

November 29th, 2005, 03:11 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
|
|
OK, now I see where the problem could be. U need to run the client from your development environment, I mean you need to Debug the client running server from some other location, and see (applying break points on locations where you are opening any external file) exactly where you are gettting this exception. Now that you have explained your problem at length, I would say that the possiblity cannot be ruled out that it is some other file than the thought of the day file that your app is not being able to open. It could be some support file- a dll or somethomg- and usually when you are debugging you also get the name of the file that couldnt be opened. Just see what file it is and I think that will you some idea as to where the things are going wrong.
Regards
Ankur Verma
|
|
 |