Silverlight 5 trust application issue - silverlight

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.

Related

Why do we need to bypass hosts checking while developing React applications?

While I'm working with webpack-dev-server, I found a configuration called disableHostCheck. I am new to React and frontend development and I really like to know that What is host checking when to bypass hosts checking and why react developers should aware of that?
Disable Host checking prevents DNS rebinding attacks and a good explanation can be found here.
When disableHostCheck is disabled (sorry for the double negation, simply when host checking is enabled) same-origin policy is enforced. Which means when a script is run, the browser verifies whether the source of the script is in the same domain where the app is hosted.
We need to bypass host checking especially when an app is hosted locally and the app refers scripts hosted in other domains
Web pack documentation can be found here

Why does my WPF .NET4 app starts slow on PCs first time when I can only ping the internet

I have deployed a WPF .NET4 application on my customer's network.
The network can ping the internet, but the PCs are not able to browse.
It takes about 60 seconds to start the application.
TcpView shows that the app is trying to communicate with these URLs:
customer.teliacarrier.com
office365.com
msgr.dlservice.microsoft.com
akamaitechnologies
If we open the internet and starts the application once everything work fine and we can close the firewall again.
Does anyone know why the app communicates on the URLs the first time???
The customer has solved the problem.
The firewall was configures to allow ping to all external sites.
When they changed the rule to not allow ping everything worked fine.
I think that .NET 4 uses some signed files that the machine tries to authenticate.
If you used ClickOnce deployment or 3rd party components the app might be looking for updates.
All of the URLs (except for the office365.com) refer to download/mirror sites.
You could try to have a look at the requests that are being send to get more details.
If you have signed your files they may be trying to authenticate against a Certificate Authority. Also - make sure you ngen your wpf files before delivery - this speeds up the first launch of the file (Regardless of reaching out to websites). http://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.80).aspx

ssl, silverlight, wcf and local install

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.

Silverlight 4 launch a trusted application into the browser?

I just lost 5 hours looking for a answer which i haven't been able to find :p
First, I'd like to force a trusted application (i need to access the file system) to display into the browser. Based on what i found on google a trusted application must be installed and launched as a desktop application (also called out-of-browser application).
So, i want to have an installed application on the client side but meanwhile, the user must also be able to start this same application into a browser window when he goes on my web site. Is this possible ?
Second, I'd like to give to the user the possibility to start the application from the browser. To be clear, the application is installed on the client computer but i want a button on my web site which starts the desktop application. How can i do that ?
Thanks
The answers are sort of and no.
Yes you can run an application that has been installed on the client also in the browser. However, not all of the installed application features will be available. Anything that requires elevated trust will not work inside the browser.
No you can't launch the installed application programmatically from within code running in the browser. The best you can do is display a polite message to the user to the effect that they have this app already installed and in order to access all of its feature they will need to launch it.
Yes, it is possbile since Silverlight 5, see my answer on silverlight-4-elevated-permission-inside-the-browser

cross-domain problem

I am using a silverlight with wcf and when I use the .web project then it runs but when use the silver light project to run the following exception throws:
An error occurred while trying to make a request to URI 'http://localhost:9000/Services/BLWCFSvrc.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
I want to use the silverlight project to debug my code
Thanks in advance
In order to access network resources from Silverlight, the domain hosting the resource must provide a client access policy file; this is designed this way for security reasons. See here for details: http://msdn.microsoft.com/en-us/library/cc645032%28VS.95%29.aspx
I think your problem is different that just having the clientaccesspolicy.xml, the fact that it runs under the web project, means that you are delivering policies, if you have those added as seperate files under the web project then they wont be deployed when you run the SL3 app seperately, but im sure you figured this out and you're delivering the policies via WCF using webHttp binding (RESTful style), if not, you should.
I think the problem is that when you run the webproject, it builds to your local IIS and executes from there, IIS will allow the SL3 app to communicate with ports/addresses different from the ones that the site is hosted on
when you run SL3 app natively, VS2008 auto generates a test html site for it to be hosted in with some default settings, and uses VS2008 built-in hosting service, which does not allow communication to an address/port different from that of the hosting address. (even though Silverlight is a client side library, VS2008 can do this)
so if you want to run the Silverlight application natively, meaning actually executing the XAP, you can deploy it to IIS, and configure IIS to deliver XAP files, or just install it and run it out of browser and let it update from IIS the deployed version
Just copy a clientaccesspolicy.xml file (for an example take a look at this post; you can even use this sample) into the root of your webserver (eg: c:\inetpub\wwwroot\).
This should help.

Resources