DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007

    Unhappy Remoting problem when hosting in public IIS

    I am struggling with .net remoting for two weeks.i need some one's help very badly please.Ill describe my problem.
    I am in developing a chat server in remoting.I devloped it with basic funtionalities.i hosted server as windows service and in IIS.both worked perfectly in my LAN.Now with that confidence i tried to host my server in a public server. Now my app is not working as am expected.

    I will paste the code here am using in Application_start method in global.cs in hosted web application.

    HttpChannel chnl;
    SoapServerFormatterSinkProvider ServProv=new SoapServerFormatterSinkProvider();

    SoapClientFormatterSinkProvider ClientProv=new SoapClientFormatterSinkProvider();

    IDictionary props=new Hashtable();
    props["typeFilterLevel"] = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
    chnl=new HttpChannel(props,ClientProv,ServProv);

    RemotingConfiguration.RegisterWellKnownServiceType(typeof(Remoting.Remotableobject),"Remot ableobject.soap",WellKnownObjectMode.Singleton);

    //Code in my windows app to connect to server

    string server=@"http://www.sumesh.somee.com:1234/Remotableobject.soap";
    IDictionary props=new Hashtable();
    SoapServerFormatterSinkProvider serv=new SoapServerFormatterSinkProvider();
    SoapClientFormatterSinkProvider cl=new SoapClientFormatterSinkProvider();
    props["typeFilterLevel"] = TypeFilterLevel.Full;
    chnl=new HttpChannel(props,cl,serv);

    rem= (Remoting.Remotableobject) Activator.GetObject(typeof(Remoting.Remotableobject),server);

    MessageBox.Show(rem.checkConnectivity());//returns ip address of server
    rem.eventRxText+=new ReceieveText(callback.rem_eventRxText);
    rem.eventGtUsers+=new getusers(callback.rem_eventGtUsers);
    rem.TestEvent+=new Testdel(callback.rem_TestEvent);

    If i run my client app ill get a connection time out exceptionwhen at this code statement
    Now if i replace
    string server=@"http://www.sumesh.somee.com:1234/Remotableobject.soap";with
    string server=@"http://www.sumesh.somee.com/Remotableobject.soap";
    I will get the ip address from
    but at next statement, that is
    rem.eventRxText+=new ReceieveText(callback.rem_eventRxText); i get exception
    Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be deserialized at this security level.

    now again if comment the line props["port"]=1234; on server and run the client with the url
    string server=@"http://www.sumesh.somee.com/Remotableobject.soap";
    ill get NO error on these four statements
    rem.eventRxText+=new ReceieveText(callback.rem_eventRxText);
    rem.eventGtUsers+=new getusers(callback.rem_eventGtUsers);
    rem.TestEvent+=new Testdel(callback.rem_TestEvent);

    but when i call a method in remote object, say
    rem.login(username,pass) which contains firing of an event, that is like this

    //this is in remoteobject
    public bool login(string uname,string pwd)
    return true;

    An exception is thrown here on statement
    that is:object reference not set to an instance of an object

    The thing is that the same remoteobject without any change in code will work perfectly if i host my server in my local IIS with setting port number on server and using this url on client

    but sometimes here also i get the error
    object reference not set to an instance of an object while firnig event in remote object.

    can anybody help me on this please??

  2. #2
    Join Date
    Mar 2007

    working randomnly..

    i tried the same application without any change from my home..for my surprise its working randomnly.the event is firing without fail.sometimes it is showing the same error as i satated above..what could be the problem..do i need to change server?or something is blocking it to work from my office?

Similar Threads

  1. Replies: 0
    Last Post: 09-21-2006, 08:19 AM
  2. Java RMI Client AccessControlException
    By ally153 in forum Java
    Replies: 1
    Last Post: 03-27-2006, 08:00 AM
  3. Change NT service config (disabled -> enabled)
    By pavel in forum VB Classic
    Replies: 0
    Last Post: 10-17-2001, 08:06 PM
  4. Problems with NetAddUser
    By Jeff Morgan in forum VB Classic
    Replies: 0
    Last Post: 02-11-2001, 12:54 PM
  5. GetGlyphOutline
    By abeji in forum VB Classic
    Replies: 20
    Last Post: 10-13-2000, 12:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.