Home Help Center

Getting started with ICE for silverlight

JvDJvD Member Joost van DoornOrganization: MobaProject: Main Control Software
Based on the hello example I have started to create my first Silverlight client application. I have done:
1. I have installed the Ice.dll into the Global Assembly Cache.
2. I have created a directory with Global.asax and IceBridge.ashx.
3. I have added a virtual folder to the default web site. This virtual folder points to the physical folder created in step 2.
4. I have written a linux server and client. They are included in the tar.gz file.
5. I have written a Silverlight application that takes an IP adrress and a count. The application should call a specific request on the server at the specified IP address for count times. The project is included in the zip-file.

My results are:
1. I am able to connected to the server.
2. When I do the first call I get a ThreadingAbortException. Inside the debugger the Data, InnerException, Message and StackTrace parameters all indicate "Unable to evaluatue the expression because the code is optimized or a native frame is on top of the call stack" .

I am stuck here. Can someone help me to get on track.

Best regards,

JvD

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Joost

    I have your demo working, the only reason i view you get this exception is because Ice.Bridge property is not pointing to the correct uri.

    You should check that.

    The web server hosting IceBridge.ashx and Global.asax is listening in the address pointed by Ice.BridgeUri

    The application.xap and html used to load the xap file should be loaded from the same webserver address port where IceBridge.ashx and Global.asax are.

    Let us know if you get further help to get this working.

    Cheers,
    José
  • JvDJvD Member Joost van DoornOrganization: MobaProject: Main Control Software
    Hello,

    I think I have deployment problems, since you succeeded in running my app. I ran my application inside the Visual Studio debugger, although I did deploy the bridge inside IIS. I think that is source of the problem.
    So I created a new project with a default webpage, like the hello example. When I run the site I get an error indicating that Ice is not known inside Global.asax.
    So my question is: How did you deploy the application to get things working.
    Hope to read from you soon.

    Best regards,

    Joost van Doorn
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Joost

    I have deployed your application with the Visual Studio webserver, basically i add a new web project to the solution and then added Global.asax and IceBridge.ashx there, first i get a deployment error because the Ice.BridgeUri was not pointed to the correct url but one i fixed that your application begins works propertly.

    Note that IceBridge should be hosted in the same web server where .xap file is downloaded, you cannot have the bridge in IIS and the application in the vs webserver, both should be accessed throw the same uri, port, this is because Silverlight cross domain polices.

    Let me know if you need further help with that.

    Regards,
    José
  • JvDJvD Member Joost van DoornOrganization: MobaProject: Main Control Software
    Thanks for the quick response,

    However I still have a problem. My situation has the following characteristics:
    1. I run the server inside Ubuntu V8.04, running as a guest OS inside VMware server, hosted by Windows XP Prof SP3. The server is attached as .tar.gz file.
    2. I run the client application inside Visual Web developer 2008 Express edition. I use the ASP.NET development server to run the webapp inside the project with extension .zip. I use the Bridge URI as specified in the code, since the ASP.NET developement server indicates to be running from that host/port.
    3. I changed the properties of the project to resemble the hello example.
    4. When the website is presented I enter the host number of the guest OS Linux. Since VMNet0 is mapped to the physical network the guest OS gets it's own IP address. I use this IP address.

    However the website is never presented. Instead I get the error message as indicated by Compile Error.zip. I think I am missing a very small and stupid detail. But I can 't figure it out.
    Could you check what is wrong a point me into the right direction?

    Best regards, Joost van Doorn
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Joost

    The problem is that you not include a reference to Ice assembley in the Web.config file used by the asp net web server to build the application.

    You need a Web.config file similar to the one used in demos, see code bellow
    <?xml version="1.0"?>
    <configuration>
    	<system.web>
    	    <compilation debug="true">
    		<assemblies>
    		    <add assembly="Ice, Version=3.3.0.0, Culture=neutral, PublicKeyToken=cdd571ade22f2f16, processorArchitecture=MSIL"/>
    		</assemblies>
    	    </compilation>
    	</system.web>
    </configuration>
    

    Hope this solve the issue,
    José
  • JvDJvD Member Joost van DoornOrganization: MobaProject: Main Control Software
    This solved my problem.


    Thank you.
Sign In or Register to comment.