How does the connection work?

C

CSharper

I have a very simple question about the working. I have a ASP.Net page
which is hosting a silverlight app. The ASP.net application runs in
the web server IIS domain but silverlight component get downloaded
into client box (where does it run? is it running in its own app
domain?). Now from client when we need to access data, we call local
web service hosted in the web server as ASp.Net compatible. Now from
client when we call localhost, does it come back into IIS as a outside
request through IIS firewall and how does it get session information?
Sorry for being very vague.
Thanks,
 
C

CSharper

Client side.


It's hosted on the client machine like the IE a browser is hosted on the
client machine.

. Now from client when we need to access data, we call local


Localhost IP 127.0.0.1, the Loopback IP, is local to the machine IIS is
running  on. So the requests are never leaving the machine if the client
is running on the same machine as IIS.

The firewall becomes involved if another machine is on a network LAN or
WAN trying to make contact with IIS over TCP port 80.

Either the firewall is going to allow the unsolicited inbound traffic on
port 80 so that a client machine can make contact with the Web
application running on IIS, if fw rules have been created to allow the
inbound traffic over a network.

Or the firewall is going to block unsolicited inbound traffic on port
80, if fw rules have been set,  so that the WEB application running on
IIS cannot be contacted by any client machine over a network.

Session information is kept in a cookie on the client machine used by a
browser or it's a cookieless session  and session information is coming
in the HTTP traffic between the client and the Web server.

Thank you very much for the detailed information, if you don't mind I
have one another question. I was talking to another programmer and he
mentioned the silverlight application is not calling the localhost,
instead it is calling the server where the web service is hosted and
it has asp.net compatability turned on, because of that, when silver
light client make the call, IIS is aware of the session and it
processes the request correctly. My question is, in general, when you
make a service call from the client app, (web services are stateless)
it will create a new connection to iis asmx page, how does it know the
session on which silverlight was hosted in ASP.Net.
 
C

CSharper

That doesn't seem correct. A Web services reference  'Reference.cs'  and
other such internal XML files in an client application consuming a Web
service has information about the location/endpoint address of the Web
server running on a Web server in the form of a URI, as to where the Web
server is located. The URI can contain an IP like 127.0.0.1,
\\Localhost, \\machinename, or an IP on a network LAN or WAN.

http://en.wikipedia.org/wiki/Uniform_Resource_Identifierhttp://en.wikipedia.org/wiki/Loopback

I don't care what this other person is talking about, as there is no way
any application such as a Web client consuming a Web service on a Web
server local or not is not using an IP.


You know many clients may be using Silverlight and consuming a Web
service. That same Web service can also be called by a none Silverlight
application.  A Web services doesn't care who the client is, as long as
the client consumes the service correctly.

It's an ASP.NET Web service and this is how ASP.NET keeps session with a
client, may it be  in the form of a client using s browser or a client
using a program consuming a Web service.

http://msdn.microsoft.com/en-us/library/ms178581.aspx

A Web service doesn't keep session state, unless you tell the Web
service to keep state, off by default.

http://www.codeproject.com/KB/session/SessionWithWS.aspx?msg=3195249- Hide quoted text -

- Show quoted text -

Thank you very much and great explanation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top