Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: What's the point of Remoting if you need to "Add Reference" Pin
James T. Johnson18-Aug-03 11:27
James T. Johnson18-Aug-03 11:27 
GeneralRe: What's the point of Remoting if you need to "Add Reference" Pin
devvvy18-Aug-03 15:07
devvvy18-Aug-03 15:07 
GeneralRe: What's the point of Remoting if you need to "Add Reference" Pin
James T. Johnson18-Aug-03 15:26
James T. Johnson18-Aug-03 15:26 
GeneralRe: What's the point of Remoting if you need to "Add Reference" Pin
devvvy18-Aug-03 18:05
devvvy18-Aug-03 18:05 
QuestionWhere r the Shape and Line Controls??? Pin
pShay17-Aug-03 21:43
pShay17-Aug-03 21:43 
AnswerRe: Where r the Shape and Line Controls??? Pin
Sascha Andres17-Aug-03 23:27
Sascha Andres17-Aug-03 23:27 
AnswerRe: Where r the Shape and Line Controls??? Pin
Ista18-Aug-03 16:59
Ista18-Aug-03 16:59 
Generalexposing remoting from ASP.NET Pin
devvvy17-Aug-03 20:37
devvvy17-Aug-03 20:37 
I am just reading up on remoting, and I figure it'd nice to be able to expose remoting object thru web service. Unfortunately, the book i'm reading have very little information on this. The following is what I do know, hope someone can add to that:

1. Server side:
a.create virtual directory
b. modify web.config to add remoting configurations, such as <wellknown...>
c. make sure assembly of remoting object is under /bin directory of the virtual directory.
d. make sure IIS is running.

QUESTIONs:
1a. Do we need to create a "WebService" to host this remote object? I understand ASP.NET is responsible for channel registration and web.config has the information on what remoting object is hosted. But anything else in addition?
1b. Web.config:
<wellknown mode="SingleCall"
type="XXX.YYYYY.MyRemoteObjClass, MyRemoteObjClassAssemblyName",
objectUri="RemoteObjAssembly.soap"
/>

1b-1. What's objectUri?? Why is it not:
"http://localhost/MyRemoteObjClass.dll" instead?
1b-2. Why "soap" file as opposed to a dll?
1b-3. How can you create this SOAP file?? Do you have to script it yourself?
1b-4. MyRemoteObjClassAssemblyName is the "assembly name" --> meaning, "file name" of the assembly of remote object class? In the assembly info file, there's [assembly: AssemblyTitle("")], but nothing that you can do to specify "assembly name".


2. Client side:
a. create a client app (C#, win app, console app, anything)
b. configure remoting by configuring client's application config file. Specify what remoting object you wish to connect to.

For example: ClientApp.config
<configuration>
<system.runtime.remoting>
<application>
<client url="http://localhost/MyVirtualDirName"> //QUESTION 2b-1: What if there're more than one assembly in the virtual directory?
<wellknown
type="XXX.YYY.MyRemoteObjClass,
MyRemoteObjClassAssemblyName"
url="http://localhost/MyVirtualDirName"
/>
</client>
</application>
</system.runtime.remoting>
</configuration>

QUESTION 2-b-2: Do we need to "Add-web-reference" or just "add reference" to the assembly of Remote object class (MyRemoteObjClass.dll)??

QUESTION 2-b-3: I understand that for remoting/ASP.NET, we only get stateless wellknown or server-activated objects --> So, we get to instantiate the object with either:
MyRemoteObjClass obj = (MyRemoteObjClass) Activator.GetObject(typeof(MyRemoteObjClass));

Or

MyRemoteObjClass obj = new MyRemoteObjClass();

QUESTION 2-b-4: Do we need "using XXX.YYYY" in our client application to reference namespace used in remoting object class?

Question 3: Okay, this's a silly question, but what the difference between URI and URL?

RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyRemoteObjClass), "MyRemoteObjURI", WellKnownObjectMode.SingleCall);

What's "MyRemoteObjURI"? I thought a URI is like an URL:
"http://127.0.0.1/MyRemoteObjURI"

Doesnt a URI contains: "protocol alias" + "domain name/IP" + "resources identifier" (which is MyRemoteObjURI" in this case)?

That's a lot of questions, thanks for going over them.

norm
Question&quot;as&quot; keyword in C#? Pin
devvvy17-Aug-03 20:06
devvvy17-Aug-03 20:06 
AnswerRe: &quot;as&quot; keyword in C#? Pin
Roger Alsing17-Aug-03 20:10
Roger Alsing17-Aug-03 20:10 
AnswerRe: &quot;as&quot; keyword in C#? Pin
J. Dunlap17-Aug-03 20:17
J. Dunlap17-Aug-03 20:17 
GeneralRe: &quot;as&quot; keyword in C#? Pin
devvvy17-Aug-03 20:39
devvvy17-Aug-03 20:39 
AnswerRe: &quot;as&quot; keyword in C#? Pin
Russell Morris18-Aug-03 4:30
Russell Morris18-Aug-03 4:30 
GeneralRe: &quot;as&quot; keyword in C#? Pin
devvvy18-Aug-03 5:11
devvvy18-Aug-03 5:11 
GeneralMy Network Places Pin
Nick Seng17-Aug-03 17:04
Nick Seng17-Aug-03 17:04 
GeneralRe: My Network Places Pin
Mazdak17-Aug-03 19:48
Mazdak17-Aug-03 19:48 
GeneralRe: My Network Places Pin
Nick Seng17-Aug-03 20:02
Nick Seng17-Aug-03 20:02 
GeneralProblem whit loops :x Pin
heelios17-Aug-03 16:03
heelios17-Aug-03 16:03 
GeneralRe: Problem whit loops :x Pin
Nathan Blomquist17-Aug-03 17:02
Nathan Blomquist17-Aug-03 17:02 
Generaldatagrid update failure Pin
dorianr17-Aug-03 14:36
dorianr17-Aug-03 14:36 
GeneralRe: datagrid update failure Pin
Sascha Andres17-Aug-03 23:37
Sascha Andres17-Aug-03 23:37 
GeneralRe: datagrid update failure Pin
dorianr18-Aug-03 18:42
dorianr18-Aug-03 18:42 
GeneralRe: datagrid update failure Pin
Ista18-Aug-03 17:02
Ista18-Aug-03 17:02 
GeneralRe: datagrid update failure Pin
dorianr18-Aug-03 18:45
dorianr18-Aug-03 18:45 
GeneralRe: datagrid update failure Pin
Ista19-Aug-03 3:49
Ista19-Aug-03 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.