[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Mike Williams

7/8/2004 11:36:00 AM

Hi there

The line in your client code:

CardBuzzServer service = new CardBuzzServer();

Depending upon how the class CardBuzzServer is packaged into an assembly on the client (as opposed to using just an interface to the server in a shared assembly), then this may just be creating a new local object in your client code, hence the reason it still works even if you shut IIS down.

HTH
Mike

--
Dr. Mike Williams
"Jalal Akram" <jalal_akram@hotmail.com> wrote in message news:%23iuLFxRYEHA.3568@TK2MSFTNGP10.phx.gbl...
My WindowsForm client app access my remote server application hosted by IIS. The problem is that client is not accessing server through remoting mechanism, because if I stop IIS service even after that both keep working, although server should have to stop responding. So it looks like that server is not being served by IIS but it's being served directly as a simple DLL service. can anyone help me resolve?

some of my main code stuff are following

WEB.CONFIG File
<configuration>
<system.runtime.remoting>
<application>

<service>
<wellknown
mode="SingleCall"
objectUri="MYService.rem"
type="CardBuzz.Server.CardBuzzServer, CardBuzz.Server"/>
</service>

</application>
</system.runtime.remoting>
</configuration>

<configuration>
<system.runtime.remoting>
<application>

CARDBUZZ.CLIENT.EXE.CONFIG File
<client>
<wellknown
type="CardBuzz.Server.CardBuzzServer, CardBuzz.Server"
url="HTTP://localhost:80/CardBuzzServer/MYService.rem"/>
</client>

<channels>
<channel ref="http">
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channel>
</channels>

</application>
</system.runtime.remoting>
</configuration>

Coding at client
RemotingConfiguration.Configure("CardBuzz.Client.exe.config");
CardBuzzServer service = new CardBuzzServer();
MessageBox.Show("Server time is: " + obj.GetServerTime());

Server Coding
namespace CardBuzz.Server
{
public class CardBuzzServer: MarshalByRefObject

{
public CardBuzzServer()
{
Console.WriteLine("New Object created");
}
}
}


Thanking all in anticipation