ssl, silverlight, wcf and local install - silverlight

I'm trying to get a silverlight program to install locally and still be able to access wcf data services over ssl. When I run the application in browser, everything works fine. When I run the application out of browser without ssl everything works fine. When I run the application OoB with ssl, I get a "Not Found" error. When I run fiddler and retry, everything works fine. I'm guessing that the program isn't correctly decrypting or sending the ssl traffic when OoB since when fiddler does it for it, the application works fine. I'm also not hitting any exceptions or break points on the server when I attach VS to it (this makes me think there is a problem with the send). Any ideas on what my next step should be? Also, I am using a self signed certificate, could this be an issue? THANKS!

Has anyone found a resolution for this issue? Or does silverlight just not work with SSL in OOB mode??
See this link for reference:
http://msdn.microsoft.com/en-us/library/dd920295(v=vs.95).aspx
basically it says:
Client certificates are supported by the browser stack, but not by the
client stack. And there is currently an issue that (at least for our
application) prevents client certificates from working even with the
browser stack if you're in trusted out-of-browser mode.

Related

Angular/Breeze app connecting to Web API throws "Access Denied" error on IE11

The Application
In short, the application surfaces data from a backend onto a web page. The client application is a Single Page Application made using AngularJS. It calls an ASP.NET Web API service located on a different domain to retrieve the data. I utilize BreezeJS on both the client application and the web service to manage this data. The client is hosted on a SharePoint Online site, and the service is hosted on IIS7.
The Error
I encounter an "Access is Denied" error when AngularJS attempts to make an XMLHttpRequest.open() call targeting this web service. However, though this seems like a simple CORS issue, it has some peculiarities which have me stumped:
Foremost, this error only occurs when using Internet Explorer 11 (or a previous version). When the application is viewed in Chrome or Firefox, it can connect and retrieve data from the service.
The web service is configured to accept the calling origin.
No network traffic is detected either by the native IE development tools or by Fiddler.
Specifically, the line: xhr.open(method, url, true); of the angular.js file throws this error.
Does anyone have any insight as to why this error occurs?
Also, if more specific details are needed I certainly can provide them. I'm not even sure where the issue might be coming from and I don't want to dump tons of irrelevant lines of code.
I think that this is due to using "localHost", i.e when attempting to access a resource in the "Local intranet" zone from an origin in the "Internet" zone.
See: Access denied in IE 10 and 11 when ajax target is localhost
This is not just a localhost issue as previously suggested. I have a production AngularJS application that is trying to POST to a public Web API 2 on a different domain. IE11, Chrome, and Firefox work without a hitch when the site is accessed externally. When accessing from a subnet that can talk directly to those servers, I get Access Denied and IE doesn't even send the request (Chrome and Firefox work flawlessly, of course. One workaround (I refuse to call this a fix) is to add the site as a Trusted Site in IE11. Even when the security settings for Internet mirror the settings for Trusted Site, I get access denied. I have to add the site on each internal IE system to gain access.

Problems running XBAP apps more than once

I'm trying to run a XBAP application from behind a proxy server, the first time I load it it works fine. The second time I get a generic "WPF Host has failed" Error message. The xbap file itself downloads correctly, it just fails to execute.
Any ideas?
ok, problem solved. Caused by a ssl cert intercepting corp proxy that was rewriting the certificate which meant the application no longer trusted it.

Silverlight 5 trust application issue

In silverlight5 beta, it supports trust application which allows loading local files. I tried and it works fantastic in both OOB and in browser mode. One question is that, when put my cap on the server, it works fine in OOB mode but doesn't work in browser. I think debugging locally and deployment is different. Is there a way to request the trust in browser as I tried locally?
Thanks,
Howard 
There are a number of steps needed:-
The XAP needs to be signed using a code-signing certificate
Then on the client machine
A tweak to the registry on the client machine that needs to run a trusted app inbrowser
The code signing certificate then needs to be installed on the client machine.
Those last two in a real world deployment would be configured using a Group Policy.
See the Beta document topic How to: Enable Trusted Applications to Run Inside the Browser.

WP7 Emulator and Fiddler

I know there are a LOT of blog posts on this. But I can't seem to find an answer. I'm trying to debug an application that communicates with some services I have running locally. Right now, I have two services. One of them works. One of them does not. Both are running in http://localhost:90. To help me resolve this, I turned to Fiddler.
Oddly, Fiddler shows traffic in Internet Explorer in the emulator, but it does not show traffic from my application. With my application running, I launch Fiddler and nothing appears. I do not see any traffic. I have been able to confirm that I am successfully accessing the one service. However, no traffic appears in Fiddler. To see if Http traffic is running, I exited my Silverlight application and started Internet Explorer on the emulator. When I visit websites in IE on the emulator, I see traffic being written to Fiddler.
I'm totally confused. What am I doing wrong?
You need to actually configure Fiddler to be able to access localhost. Here is a workaround that needs to be done in the application.
Basically, what you need is the extra dot when accessing the location. So in your case it will be:
http://localhost.:90
Also, you might want to try some additional config settings.

Silverlight client never calls WCF Service

This one has me completed stumped. I have developed a silverlight application that calls back to WCF services ( it's a silverlight - basicHttpBinding)
The site works perfectly fine from my development machine, but when it is deployed to the developement server. The application is delivered with the XAP just fine, but it never attempts to talk to the service. I have a service call in the bootstrapper so it should be calling this when the client starts up. The services are healthy. They can be browsed to and show the standard WCF service display. We have been through the bindings many times and everything seems to be ok. I have added an extensive amount of error handling for displaying any errors, but on this dev server, no service calls and no errors are being raised.
Fiddler shows the page being loaded up, but my client never issues a call to the service. The service is in the same folder as the default.aspx which hosts the Silverlight client.
This is a Silverlight 3.0 app.
Anybody ever seen anything similar?
I will try to debug in three steps
Verify whether the hosted service on dev server is up or not, by hitting the service URL from your browser on your dev machine.
Make sure that ServiceReferences.ClientConfig consists ur hosted service URL and not dev machine service URL.
If still error occurs try to debug your application from visual studio by pointing the endpoint address to http://urserver/urservicename.svc
Also make sure you dont have have cross domain problems by using "silverlight spy" tool
Put a graphical display like "I made the call!" before the service invocation. just to be sure that your app is really trying to call the service...
So we could narrow the search to a communication problem. : )
Verify that there aren't any cross-domain rules stopping the app to make the call.
by the way, are you calling a WCF service from another domain?
Are you sure the silverlight app is loading at all? If you are making the service call in the boot strapper and the call breaks, I assume that will lead to just a blank page. If you are seeing just a blank page, then perhaps there is something wrong with the .xap mime type issued from the server. Here is some more info on that:
http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/

Resources