Skip to main content
Home Forums General Silverlight Getting Started How to deploy silverlight with WCF in iis
13 replies. Latest Post by Thanagarajan on November 18, 2009.
(0)
chszu
Member
12 points
16 Posts
04-13-2008 8:42 PM |
It work fine in vs debug,but deploy it to iis.It don't work, It show errors:
Additional information: [UnexpectedHttpResponseCode]Arguments:Not FoundDebugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode
my code:
BasicHttpBinding bind = new BasicHttpBinding(); try { EndpointAddress endpoint = new EndpointAddress("http://localhost/videostation/VideoService.svc"); webSvc = new VideoService.VideoServiceClient(bind, endpoint); } catch(Exception ex) { this.vtext._description.Text = ex.Message; }
webSvc.GetAllVideosCompleted += new EventHandler<Mix08.VideoService.GetAllMessCompletedEventArgs>(webSvc_GetAllMesssCompleted); webSvc.GetAllMesssAsync();
thierry....
Contributor
2054 points
280 Posts
04-14-2008 6:23 AM |
Have you registered WCF in IIS ? "c:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe"
04-14-2008 8:55 AM |
The error is
Microsoft JScript 运行时错误: Sys.InvalidOperationException: ManagedRuntimeError error #4002 in control 'Xaml1': System.Exception: [AsyncCallbackException]Arguments:Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=AsyncCallbackException ---> System.Exception: [AsyncCallbackException]Arguments:Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=AsyncCallbackException ---> System.Reflection.TargetInvocationException: [Async_ExceptionOccurred]Arguments:Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.dll&Key=Async_ExceptionOccurred ---> System.ServiceModel.ProtocolException: [UnexpectedHttpResponseCode]Arguments:Not FoundDebugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result) at Mix08.VideoService.VideoServiceClient.VideoServiceClientChannel.EndGetAllVideos(IAsyncResult result) at Mix08.VideoService.VideoServiceClient.Mix08.VideoService.IVideoService.EndGetAllVideos(IAsyncResult result) at Mix08.VideoService.VideoServiceClient.OnEndGetAllVideos(IAsyncResult result) at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result) --- End of inner exception stack trace --- at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at Mix08.VideoService.GetAllVideosCompletedEventArgs.get_Result() at Mix08.Page.webSvc_GetAllVideosCompleted(Object sender, GetAllVideosCompletedEventArgs e) at Mix08.VideoService.VideoServiceClient.OnGetAllVideosCompleted(Object state) at System.ServiceModel.ClientBase`1.AsyncOperation.Post(SendOrPostCallback d, Object arg) at System.ServiceModel.ClientBase`1.AsyncOperation.PostOperationCompleted(SendOrPostCallback d, Object arg) at System.ServiceModel.ClientBase`1.CompleteAsyncCall(AsyncOperationContext context, Object[] results, Exception error) at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result) at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously) --- End of inner exception stack trace --- at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously, Exception exception) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.CallComplete(Boolean completedSynchronously, Exception exception) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishSend(IAsyncResult result, Boolean completedSynchronously) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.SendCallback(IAsyncResult result) at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously) --- End of inner exception stack trace --- at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously, Exception exception) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.OnGetResponse(IAsyncResult result) at System.Net.BrowserHttpWebRequest.Failed(Object sender, EventArgs e) at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
I have waste too much time on it,but it .....
Psychlis...
6045 points
973 Posts
04-14-2008 9:39 AM |
Can you navigate directly to the .svc file in your browser? If so, does it work from there?
Pete
04-16-2008 5:08 AM |
Thank you very much
I have sove this problem
Fotenyuk...
18 points
9 Posts
04-17-2008 4:01 AM |
I can navigate directly to the .svc file in my browser:
I saw following:
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http://is1.upclicksolutions.com/MyPeopleSearchSL/Service1.svc?wsdl
This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:
C#
class Test { static void Main() { Service1Client client = new Service1Client(); // Use the 'client' variable to call operations on the service. // Always close the client. client.Close(); } }
Visual Basic
Class Test Shared Sub Main() Dim client As Service1Client = New Service1Client() ' Use the 'client' variable to call operations on the service. ' Always close the client. client.Close() End Sub End Class
I don't understand how solve this problem with silverlight.
I have IIS5.1 and SilverLight 2
Help me !!!
04-17-2008 4:41 AM |
I think the next step is to write a WCF client to test your webservice on IIS. You can use the sample provided in the .svc helper page.
04-17-2008 5:01 AM |
It is Cross Domain Bug with Silverlight 2 Beta 1
I found one link with this problem:
http://www.interact-sw.co.uk/iangblog/2008/03/16/silverlight-xdomain-semi
balukr54
124 points
143 Posts
11-19-2008 1:34 AM |
HI All,
I am using a silverlight 2.0 application. Application shows the following error in certain machines, when try to access a web service.
This is the error I am getting
. ========================================================
Additional information: [UnexpectedHttpResponseCode] Arguments:Not Found Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=2.0.30226.2&File=System.ServiceModel.dll&Key=UnexpectedHttpResponseCode ==============================================================================================
This problem occurred after we deployed our application to the server provided by our client. This issue is not in our localhost and in our servers. This error is coming only in one or two systems and only in IE. FireFox it is working fine. I tried with NikhilK’s Web Development Helper tool and the status of web service call shown is 200 and the response content contains the output XML also. we deployed the service in same application directory (www.mywebsite.com/service.asmx) and it is accessible from the machine which is giving problem. Also we can access clientaccesspolicy.xml & crossdomain.xml from the machine which is giving problem. Anyone Got any idea??
Thanks in advance for any help...
Balu
11-19-2008 5:03 PM |
Look at this post http://silverlight.net/forums/t/13189.aspx
It's generic methods or properties throw exception !
talldaniel
590 points
329 Posts
11-20-2008 6:32 PM |
The messages with Silverlight can be rather strange, if your webservice has an unhandled exception. For example, I was getting a "not found" error today when I was trying to access a webservice from Silverlight, and so I stepped into the webservice from an asp.net application. I found an error reading data from the database, as I had not allowed for those cases where the value was null. When I fixed this, I no longer got a not found error.
There are some differences between calling a webservice from within an asp.net website and calling it from inside of silverlight too, so having a test from asp.net wont' always find the problem. For example, for some reason it seems garbage collection is handled differently when using Silveright, and things that are properly closed when called from an asp.net website, are not closed when called from silverlight.
There are some other exceptions too, so you cannot just use the test fixture to debug everything, but it definitely helps. Anyway, I bet it is not really a "not found" error, but some other sort of error.
Max78
4 points
2 Posts
07-01-2009 4:02 AM |
I have a similar problem on my silverlight + WCF application.
It works on my developer machine (in ServiceReference I have localhost:50834/DbService.svc)It works on my internal server (in ServiceReference I have 192.168.1.8/AppName/DbService.svc)
But I cannot find a way to make it work on internet.In ServiceReference.ClientConfig I've tried localhost, 192.168.1.8 and hostname/AppName/DbService.svc.
if I browse the last link directly on the browser the service answers correctly. But everytime I try to connect to the silverlight app from internet it shows me an error when accessin WCF.
WCF Service is on the same machine as the Silverlight app.
07-01-2009 9:44 PM |
the problem may be with clientaccesspolicy.xml & crossdomain.xml even though it shows 200 when you use a tool to watch what is going on.
remove clientaccesspolicy.xml and only use crossdoman.xml and see if that fixes it.
I know it shouldnt matter, but I had a similar problem to what you are having and that was the solution.
Thanagar...
2 points
1 Posts
11-18-2009 4:20 AM |
How you solved this problem. Please let us know as we are also facing the same issue.