|
|
|
|||||
|
Problem with Silverlight and IceGrid deployment
Hi,
I'm having problem with having my Silverlight client locate the IceGrid server. It all worked fine locally, but when I deployed the Silverlight pages to IIS, i get error Code:
Ice.ProtocolException reason = "invalid http response code: 12030" Grid: Code:
IceGrid.InstanceName=DemoIceGrid # # The IceGrid locator proxy. # Ice.Default.Locator=DemoIceGrid/Locator:tcp -p 12000 -h 10.93.206.77 # # IceGrid registry configuration. # IceGrid.Registry.Client.Endpoints=tcp -p 12000 -h 10.93.206.77 IceGrid.Registry.Server.Endpoints=tcp -h 10.93.206.77 IceGrid.Registry.Internal.Endpoints=tcp -h 10.93.206.77 IceGrid.Registry.Data=C:/Documents and Settings/Local Service/Local Settings/Application Data/ZeroC/icegrid/registry IceGrid.Registry.DynamicRegistration=1 IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier IceGrid.Registry.SSLPermissionsVerifier=DemoIceGrid/NullSSLPermissionsVerifier IceGrid.Registry.AdminSSLPermissionsVerifier=DemoIceGrid/NullSSLPermissionsVerifier # # IceGrid node configuration. # IceGrid.Node.CollocateRegistry=1 IceGrid.Node.Name=localhost IceGrid.Node.Endpoints=tcp IceGrid.Node.Data=C:/Documents and Settings/Local Service/Local Settings/Application Data/ZeroC/icegrid/node IceGrid.Node.CollocateRegistry=1 #IceGrid.Node.Output=db #IceGrid.Node.RedirectErrToOut=1 # # Trace properties. # IceGrid.Node.Trace.Activator=1 IceGrid.Node.Trace.Patch=1 #IceGrid.Node.Trace.Adapter=2 #IceGrid.Node.Trace.Server=3 # # Dummy username and password for icegridadmin. # IceGridAdmin.Username=foo IceGridAdmin.Password=bar Code:
# # The server creates one single object adapter with the name # "Hello". The following line sets the endpoints for this # adapter. # Ice.ServerId=SimpleServer Ice.ProgramName=SimpleServer #Object adapter Hello Hello.Endpoints=tcp Hello.AdapterId=Hello Hello.RegisterProcess=1 Ice.Default.Locator=DemoIceGrid/Locator:tcp -h 10.93.206.77 -p 4061 # # Warn about connection exceptions. # #Ice.Warn.Connections=1 # # We want a faster ACM for this demo. # Ice.ACM.Server=10 # # Network Tracing # # 0 = no network tracing # 1 = trace connection establishment and closure # 2 = like 1, but more detailed # 3 = like 2, but also trace data transfer # #Ice.Trace.Network=1 # # Protocol Tracing # # 0 = no protocol tracing # 1 = trace protocol messages # #Ice.Trace.Protocol=1 # # Security Tracing # # 0 = no security tracing # 1 = trace messages # #IceSSL.Trace.Security=1 # # SSL plugin configuration # Ice.Plugin.IceSSL=icesslcs, Version=3.2.1.0, Culture=neutral, PublicKeyToken=1f998c50fec78381:IceSSL.PluginFactory IceSSL.DefaultDir=../../../certs IceSSL.ImportCert.CurrentUser.Root=cacert.pem IceSSL.CertFile=s_rsa1024.pfx IceSSL.Password=password Ice.ThreadPerConnection=1 Code:
public override int run(string[] args)
{
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
Ice.Properties properties = communicator().getProperties();
Ice.Identity id = communicator().stringToIdentity(properties.getProperty("Identity"));
adapter.add(new HelloI(properties.getProperty("Ice.ServerId")), id);
adapter.activate();
communicator().waitForShutdown();
return 0;
}
Client - Global.asax Code:
void Application_Start(Object sender, EventArgs e)
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties();
//Ice.Properties prop = Ice.Util.createProperties();
initData.properties.setProperty("Ice.Default.Locator", "DemoIceGrid/Locator:tcp -p 12000 -h 10.93.206.77");
//initData.properties.load("ice.config");
Application["com"] = Ice.Util.initialize(initData);
//Application["com"] = Ice.Util.initialize();
}
Code:
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties();
initData.properties.setProperty("Ice.BridgeUri", "http://10.93.206.77/IceBridge/IceBridge.ashx");
_comm = Ice.Util.initialize(initData);
try
{
_hello = Demo.HelloPrxHelper.uncheckedCast(_comm.stringToProxy("hello"));
// _hello = Demo.HelloPrxHelper.uncheckedCast(_comm.stringToProxy("hello:tcp -p 10000"));
// _helloOneway = Demo.HelloPrxHelper.uncheckedCast(_hello.ice_oneway());
}
catch (Ice.NotRegisteredException)
{
IceGrid.QueryPrx query =
IceGrid.QueryPrxHelper.checkedCast(_comm.stringToProxy("DemoIceGrid/Query"));
_hello = HelloPrxHelper.checkedCast(query.findObjectByType("::Demo::Hello"));
}
Can you tell me what I am doing wrong? |
|
|||||
|
I already have the configuration in the Global.asax to point to the Default Locator.
To configure the Bridge on IIS, I have followed the instructions in Issue 27, but I run into the following error when accessing IceBridge.ashx Compiler Error Message: CS0117: 'Ice.InputStream' does not contain a definition for 'readBlob'. I am hosting the bridge on IIS5.1, placed the Global.asax in the same directory as the IceBridge.ashx, with a bin folder for icecs.dll. |
|
||||||
|
It seems that you are not using the icecs.dll that was distributed with the Silverlight distribution. From the INSTALL.txt:
In order to use Ice for Silverlight it is necessary to also install Ice for C#. Specifically it is necessary to install a patched version of the Ice for C# 3.2.1 icecs.dll. You can either download a precompiled patched DLL or compile the Ice for C# sources yourself after applying the patch to the Ice for C# source distribution. The Ice for C# source distribution can be downloaded here: http://www.zeroc.com/download.html The precompiled DLL and the source patch can be downloaded here: http://www.zeroc.com/labs/download.html Once downloaded or compiled the DLL must be installed in the GAC: gacutil -i icecs.dll |
|
|||||
|
I am now using the icecs.dll that comes with the Silverlight distribution. However, running IceBridge.ashx gives the following exception in the event log:
Bridging Error: Ice.UnmarshalOutOfBoundsException reason = (null) at IceInternal.BasicStream.readBlob(Int32 sz) at Ice.InputStreamI.readBlob(Int32 sz) at IceBridge.Bridge.ProcessRequest(HttpContext context) in c:\Web Applications\IceBridge\IceBridge.ashx:line 110 Caused by: System.InvalidOperationException: buffer underflow at IceInternal.ByteBuffer.checkUnderflow(Int32 size) at IceInternal.ByteBuffer.get(Byte[] b, Int32 offset, Int32 length) at IceInternal.ByteBuffer.get(Byte[] b) at IceInternal.BasicStream.readBlob(Int32 sz). Are there any additional configuration not mentioned in Issue 27 that I could be missing in the bridge configuration? - MIME type, permissions ? Running the Silverlight app still returns Ice exception Ice.ProtocolException reason = "invalid http response code: 12030" Last edited by JNg : 03-24-2008 at 03:39 PM. |
|
||||||
|
The reported readBlob exception is failing when trying to unmarshal the Ice magic number, which is the start of the request payload. This means that the message payload is not received at all by the bridge application. Most likely the problem is that you are missing the necessary MIME types for the request octet data. The transferred Ice request data is MIME content type "application/binary". The 12030 received by the Ice for SL client is caused by the above failure. Once this failure is rectified then that should go away.
We have only tested Ice for SL with IIS 7.0, so I am not exactly sure what is necessary to get IIS 5.1 to work in this situation. Is there any way you could use IIS 7, or the Mono ASP.NET web server for your tests? |
|
||||||
|
I'm sorry, but I'm not exactly sure how to configure IIS 5.1/6.0. You can download a free version of the mono ASP.NET web server to test against at Main Page - Mono.
If your organization is interested in commercially licensing Ice we can investigate IIS 5.1/6 support further. If interested, please contact us at sales@zeroc.com. |
|
||||||
|
The most likely cause of this problem is that you have not enabled PUT on the bridge (IceBridge.ashx). If you do not enable PUT then all calls on the bridge will be rejected with permission denied.
|
|
|||||
|
I have configured the app to add PUT to the list of verbs for the .ashx extension.
Pls find attached the IIS configuration for the web app that contains the bridge. Thanks for helping. |
|
|||||
|
I have also tried Mod Mono for win32 (Apache 2.0.59 and Mono 1.2.6) using the windows patch from
mod_mono-win32 - mod_mono port for Apache 2 (and 2.2) under windows i cannot get the Mod Mono server to run. Do you know whether this should run fine on win32? Last edited by JNg : 04-11-2008 at 09:33 PM. |
|
||||||
|
Hi Jennifer.
I have been testing IceSl with IIS-5.5 and is working fine for me. I have attached the screens of my IIS configuration for the IceSl hello demo. Also from your error i think that there is a problem with file rigths, not sure .The files need the correct right acces for IIS can serve it, Make sure that the IIS user can read and execute IceBridge.ashx & Global.asax IIS use by default the account IISUSR_(MachineName) for annonymous access. If your machine name is SIUX the name of IIS user will be IISUSR_SIUX. have you enabled logs on IIS and view if there is any HTTP error in the Windows Event Viewer. Also if all fails you can add same trace in the IceBridge.ashx and view where the error cames. Use this for log to the Event viewer form IceBridge.ashx Code:
_log.WriteEntry("foo");
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Silverlight - IceGrid | JNg | Help Center | 6 | 02-27-2008 03:26 PM |
| ICE for Silverlight | kwaclaw | Comments | 8 | 01-31-2008 12:14 PM |
| Silverlight and ICE | kwaclaw | Comments | 2 | 06-21-2007 02:23 PM |
| Deployment with v3.2 | Kruppy | Help Center | 12 | 05-15-2007 10:50 AM |
| A very complex deployment, Does it possible? | weixiande | Help Center | 2 | 12-12-2004 03:25 AM |