|
Hello,
I am a beginner with .net remoting,
I've developed a simple application including a server, a client and a remote object. This application is built on tcp.
Is it possible to add another client in ASP.NET, using the same service from the server? How to do?
Thank u.
|
|
|
|
|
After researching for some time, including in Ingo's book Advanced Remoting, I have not been able to find code that successfully does the equivalent of this method:
RemotingConfiguration.Configure("someserver.exe.config")
Of course, the configuration info is contained in the config file, and this works! There are lots of examples out there, so that's fine if you want to use config files.
But I don't want to use config files, for the following reason: My produt may be deployed where IT people are NOT available to go in and edit xml files such as the config file.
Therefore, I want to do the equivalent from code, where the paramters that are in the config file are loaded from the registry or a database table.
Here is some code that "should" work , can anyone tell me what I'm doing wrong?
The problem is that although the code here runs fine (and so seems to work), when a client object tries to access a MarshalByRefObject in the server's remotable class, an error says that the object could not be created...
Keep in mind, though, that the very same process works fine when configured from the config file. Therefore, I know that everything is "ok" with the implementation etc. The problem remains, then that I need help configuring the server from code !!
Here's the code that doesn't expose the remotable object properly:
Dim AHashTable As IDictionary
AHashTable = New Hashtable
AHashTable("name") = "MyRemotableObject.soap"
'(MyRemotableObject is an implementation of the IMyRemotableObject interface)
AHashTable("port") = MyTCPPort
'(MyTCPPort is loaded from some database field)
AHashTable("machinename") = "TheServerComputer"
Dim AFormatProvider As New BinaryServerFormatterSinkProvider
AFormatProvider.TypeFilterLevel = Runtime.Serialization.Formatters.TypeFilterLevel.Full
Dim AChannel As New TcpChannel(AHashTable, Nothing, AFormatProvider)
ChannelServices.RegisterChannel(AChannel)
Dim AnObjectURI As String = "MyRemotableObject.soap"
Dim T As System.Type = GetType(MyRemotingObjectNamespace.IMyRemotableObject)
RemotingConfiguration.RegisterWellKnownServiceType(T, AnObjectURI, WellKnownObjectMode.Singleton)
Bob
|
|
|
|
|
I have been searching for a few hours how to assign the right to "log on as a service" to a user I created.
Does anyone know if there is an API or some registry keys to modify?
Thank you in advance.
|
|
|
|
|
I actually found a way to do this using a SDK tool called NTRight.exe
Use command line:
ntrights.exe -u [UserName] +r SeServiceLogonRight
|
|
|
|
|
Hi All,
I am trying to call a web service on the same machine (as the client code)
through a dotnet client and I get the following error.
"The underlying connection was closed: The proxy name could not be resolved,
verify correct proxy configuration"
Proxy is not enabled.
SSL is not enabled.
.NET Framework 1.1 is installed
I tried browsing the web service with IE and could do so.
Can you please help me out with this? Is there a known solution?
Thanks,
Nitin
|
|
|
|
|
where can i have the namespace Microsoft.PointOfService
the link for this namespace explanation from msdn is
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ccl/html/T_Microsoft_PointOfSer
vice_PosKeyboard.asp
plz help me urgently
regards
Arun Appukuttan
|
|
|
|
|
1. Don't post a question to every group on the site
2. Look at the bread crumbs - the page is within the help for Microsoft embedded and mobile, so it's obvious that Microsoft have an embedded version of Windows that contains this stuff for working with scanners, etc.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I don't know why some idiot gave you a 1. I thought the answer was pretty easy to understand...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Certainly a lot easier than the URL he provided.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I recently moved to Windows XP SP2 and one of my projects is involving remoting. I'm using standart technology for this - tcp channel on port 8080 and binary formating. Now i can't run my project - it freezes when i step over the romoting calls. After long waiting something to happen i stop the process, but the strange is that I don't get a single exception or something alike.
One possible problem is Windows Firewall, another is my firewall - Panda internet security. So my question is how to bypass this problem or how to make my firewall ask me if I want to block this particular application or not - it doesn't ask me
Please help.
Thanks in advance!
by Cao
|
|
|
|
|
Tell the firewall that your application is one of the exceptions, that is, that it should not block it.
settings->control panel->windows firewall
exceptions tab -> add program
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks !I already did it ,but it freezes between times when i step over the romoting calls . then i stop Windows Firewall and my firewall ,but it freezes all the same!
|
|
|
|
|
Then it isn't related to the firewall.
Regards,
mav
|
|
|
|
|
But it became to happen between times. It run in gear on Windows 2000.
|
|
|
|
|
When you say the program freezes when you step through remoting calls I assume you're only experiencing the behaviour in a debugger, correct?
Does the program work without freezing when you're not running in debugger?
I've also experienced freezes in VS.NET while debugging a remoting application, but I think it wasn't related to remoting but rather to my inter-thread communication...
mav
|
|
|
|
|
No,I run it not in a debugger. and It run well on Windows 2000. It freezes only on Windows XP sp2 or SP1. the thread is more and more ,the freeze is worse than ever. it freezes always at i step over the romoting calls.
|
|
|
|
|
Then how do you "step over" the remoting calls?
I'm sorry I can't follow you.
You mean you've verified that you call a remote method and this method does not return or what?
Are you using remote events? This could be a reason.
Does it work when the remoting server and client are running on the same machine or does it behave differently when client and server are on different machines? In the same LAN? Or in separate LANs?
mav
|
|
|
|
|
Thank you for help me.
My English level is low,hope you can know my meaning.
Yes,I've verified that I call a remote method and this method does not return between times.
No,I am not Using remote events. but I am using "AsyncCallback".
The remoting server and client are running on the same machine 。
|
|
|
|
|
It freezes at client and not server,the remoting calls achieve server After long waiting something 。What difference in Windows xp And 2000.Why it happen only between times.
|
|
|
|
|
It is same when client and server are on different machines.
and it run In the same LAN.
I've verified that server is not answer when client call.
Why?
|
|
|
|
|
Perhaps some code would help, especially the part where you call the remote method and receive the AsyncCallback.
The part of your server answering this request could be helpful, too...
Regards,
mav
|
|
|
|
|
Yes, I find that "AsyncCallback" is more and freeze happen is more. but why it happen only on Windows Xp ?
|
|
|
|
|
After SP2 it's important that your windows user has sufficient rights on the remote pc.
You must add the same user you are working with on the local machine also on the remote machine.
This occurs with many applications that use remote technics (e.g. like com)
hope this helps
cu
immes
|
|
|
|
|
Thanks!
But the remoting server and client are running on the same machine 。
What can I do?
|
|
|
|
|
It freezes all the same on Windows 2003 sp1 !
Help me!
|
|
|
|