|
sorry I should also say this will be done on a freebsd based platform also
I shall steal all the kittens.
|
|
|
|
|
I have a .NET server application on a machine with a static IP address who publishes a singleton object:
MyServerObject obj = new MyServerObject();
RemotingServices.Marshal(obj, "TheServerObjectIsHere.remote");
The client publishes his listener object to the server, and connects to the server:
MyClientObject obj = new MyClientObject();
RemotingServices.Marshal(obj, "TheClientObjectIsHere.remote");
MyServerObject serverObj = RemotingServices.Connect("tcp://someStaticIpAddress/TheServerObjectIsHere.remote");
serverObj.Hello();
However, the server needs to connect to the client object, who's published object is on some network outside the LAN. Since the client object is not on the server's LAN,
RemotingServices.Connect("tcp://someLanAddress/TheClientObjectIsHere.remote")
will not work, because the server isn't on the same LAN, therefore a client address like "tcp://10.10.10.1/Client.remote" means nothing to the server.
So my question is, how does .NET remoting work over a WAN or the internet? Or, if you specifically have knowledge in this area, how can I connect to a MarshalByRefObject when it is on a different network?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
the only way to do this is to grab the ip from the client on the outside.
also, I havent used the uri the same way you do. I see you have TheClientObjectIsHere.remote. Shouldnt that be TheClientObjectIsHere.rem?
Maybe it doesnt matter, just looking over my code and comparing it.
but to answer your question you would need to put the ip where someLanAddress is. Also, make sure you have access to their machine and there is no firewall to hamper it. You might need to provide credentials when you connect. At least I did on mine.
Hope this helps alittle.
Steve Welborn
Software Architect
|
|
|
|
|
I am having trouble passing a string that has special characters in it as an argument in a program. To be specific
Method Signature: methodName(string)
I need to pass the following string: QTextPrint("TestMessage")
methodName("QTextPrint("TestMessage")"); Doesn't work
methodName(""QTextPrint("TestMessage")""); Doesn't work
methodName("QTextPrint\(\"TestMessage\"\)); Doesn't work
methodName(@"QTextPrint\(\"TestMessage\"\)); Doesn't work
Even attempting the same type of action in a stringbuilder doesnt work.
Any ideas would be appreciated.
Regards
Bob Robey
|
|
|
|
|
try this...
methodName("QTextPrint(\"TestMessage\")");
I Hope this should work.
If not give this a shot
string param = "QTextPrint({0}TextMessage{1})";
param = string.Format(param, "\"", "\"");
Hope this helps
Regards,
Sidhu
IF YOU DON'T HAVE ANYTHING TO SAY, WELCOME TO THE CLUB
Dotnet @ Work Where Dotnet works...
My Blog
|
|
|
|
|
It's really quite simple:
In C/C++/C# a string is delimited by "
If you want to use " _inside_ a string you have to prefix this " (and only this one) with \
So #1 won't work because the first string ends before TestMessage,
#2 won't work because you start with an empty string (""),
#3 won't work because \( doesn't have to be escaped and
#4 won't work because the @ will mess up all your \'s.
Use methodName("QTextPrint(\"TestMessage\")");
This will work.
Regards,
mav
|
|
|
|
|
Thanks to both of you for your help.
I selected the option of building the string using formatting since there were many segments that need to be concatenated.
Problem Solved.
Best Regards
Bob Robey
|
|
|
|
|
I'm currently making a (not as simple as i previously thought) game, and i want to know how to make a savestate for it to save the game, if you dont know what a savestate is then its where you press a button to save your game, then when you load it, you are exactly where you where, doing whatever you where doing when you left, as though you had never left.
If this isnt possible, then i guess that i'll have to save all of my vars in a file and read them back in when you load the game, and you wont be in the middle of falling or whatever either
If you need to know about the game for whatever reason, here it is. And dont worry about any crazy stuff happening, its probably supposed to
http://www.freewebs.com/csharpprojects/GameRPG.zip
Enter brings up the start screen, space is the action button, talk to people, press A to attack them.(attack may run slow)
|
|
|
|
|
Have you heard of something called "Serialization". This saves the state of the objects. For more info check Code Project
Hope this helps
Regards,
Sidhu
IF YOU DON'T HAVE ANYTHING TO SAY, WELCOME TO THE CLUB
Dotnet @ Work Where Dotnet works...
My Blog
|
|
|
|
|
Hi everyone
I have a solution based on Secure Conversation using a Security Context
Token Service (which is just a web service) that gives out SCT's, a client
program gets the issued SCT. But the problem I have is can this client then
hold Secure Conversations with one or a number of other web services.
I have another web service the client signs and encrypts the message and
attempts to send the response to the web service but I get the following
error.
Error "System.Security.Cryptography.CryptographicException: WSE523: The
CipherData contents are invalid"
I have read that much between blogs and MSDN, im all read out lol, BUT! I
can call a web method within the SCTS web service from the client. From my
understanding from what I have read when the Security Context Token is cached
it is cached in the AppDomain for the SCTS web service now that explains why
I can call the Web Method from the client and it works but when I call the
second Web Service it cannot access the AppDomain cache to check the SCT.
THEREFORE through WS-SecureConversation does all your Web Methods which the
client will call and sign and encrypt messages have to reside in the SCTS Web
Service.
Or can the client call as many other Web Services that are required of
course that reside on the same Server (have seen the implementations for web
farms).
So please please put me out of my misery can a client have a
SecureConversation with more than one Web Service and if they can how?
Thanks in advance
|
|
|
|
|
I have made a SnippetDB application like CodeLib Access version that fish made it
http://myweb.hinet.net/home4/s630417/
My problem is i want to use multiple access databases and I don not know how to store my connections or how to use it or simple how to start
For only one db is easy and my app is working but i can not figure how to do it for more.
Creating a db programaticly is not hard so pls help me with code if possible thx...
(o)(o)
|
|
|
|
|
I might be missing something here, but have you tried making each connection its own object? Instantiating several database connections as their own objects is the way that I get to multiple database connections.
I apologize if I am missing something and this is a stupid answer.
Bob Robey
|
|
|
|
|
Just store the different connection strings, and create a connection every time you need it. .NET connection pooling will find out if there's already another "closed" open connection (when you close it, it's not actually closed until some time later) and reuse it. The connection string must be identical for a connection to be reused, but if you have 5 different databases, you'll have 5 pools.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
"connection string must be identical for a connection to be reused"
Eaven the db names should be the same?
The thing is that I have a app with a TreeView and the treeview is populated with all db names and then in each db node with some info from the db, and when i click a node the app will use to get info from the selected db...
Until now this is the method I have used changein the string but when I create a new DB and try to insert it in the tre view i do the .clear() thing from the tree and the try to rebuild it again... and some errors apear i will be back with code and error text...
Sorry for my BAD BAD english...
Thx
|
|
|
|
|
Well, then just make sure that everytime the same node is selected, the same connection string is built. You'll have connection pooling working for each different connection string, but in you scenario, I think that's the best you can do.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hi,
I have to create an attendentee-list in Crystal Reports.
Vertically I summarize the student-data (name etc). This is OK, but know I have to summarize horizontally all the dates for the classes and every cell of the grid you get needs a code.
I was thinking cross-tabs or subreports, but I still can't figure out how to do that.
Can anyone help me?
tnx!
(example: )
session1 session2 ... sessionn
student1 code code code code
student2 code code code code
student3 code code code code
...
studentn etc...
No hurries, no worries.
|
|
|
|
|
I need a C# project for final year of gradution
I'm doing B.Sc(IT)
|
|
|
|
|
without more info and without letting us know you're trying yourself you won't get much response here.
What do you have to do and what did you do to try to solve the issue yourself?
eg.
We need a project in the line of this, this and that, it is subject to bla bla bla and I was thinking this and that, but it isn't ok because...
does anyone know something to help me?
good luck !
No hurries, no worries.
|
|
|
|
|
Wow!!!
May I nominate this for the question of the year?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I need U$ 100,000.00 to buy a Ferrari.
Why not? If we can ask anything here... ;P
Rui A. Rebelo
Caminante no hay camino.
El camino se hace nel caminar.
Frederico Garcia-Lorca
|
|
|
|
|
Rui A. Rebelo wrote:
I need U$ 100,000.00 to buy a Ferrari.
A used Ferrari? Here in México the cheapest (a 360 Modena with a standard transmission) is about $217K
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
|
"I need suggestions for a C# project for my final year".
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Taking the Ferrari example from above, it's very different "Give $100K USD" to "Give ideas on how to earn $100K USD"!!
He could have meant that, but how are we supposed to know?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I think that an application using C# to output a message that says "Hello World" on both the CRT and a printer would be an impressive final project. Give it a go, and if you get stuck, feel free to post any questions here. Good luck!
"...putting all your eggs in one basket along with your bowling ball and gym clothes only gets you scrambled eggs and an extra laundry day... " - Jeffry J. Brickley
|
|
|
|