GetTempFileName not working in silverlight out-of-browser - silverlight

I have a Silverlight application that runs out-of-browser. I was previously able to get the statement Path.GetTempFileName to work when I run out-of-browser but not when running locally. Now this is failing out-of-browser also.
I am getting this error
Message
File operation not permitted. Access to path '' is denied.
I am editing this because I have new information. I have another application which is very similar where I am not getting the problem. That is Path.GetTempFileName works fine. I cannot see any differences between the applications.
I need some hints as to what could be different between the two application. I am running both locally in debug.

Have you checked the Out of Browser settings in the Silverlight Project Properties page? There is a checkbox "Require elevated trust when running out of browser.
On the ShortCut not working. Try uninstalling the app from the Control panel and reinstalling. Then try it again.

Related

Problems with making Silverlight project out of browser

I have a task to make large Silverlight project run out of browser.
Fortunatelly I don't have to rewrite it to some other technology. Unfortunatelly I can not understand how to make it work OOB. I tried everything that's in guides :
enabling OOB option, installing and tryiung to debug installed app, but main thing is that when I run this app OOB I can't reach any services (no matter how I try HTML Bridge is disabled in OOB).
Is there a way to reach those services (like https://localhost/WCFRest/GetUserInfo?login=somelogin&password=somepassword) from OOB enviroment?
What should I do to reach them?
I'm sorry if this is noob quetion but I can't ask anyone else.
I assume you have a Web project in your solution. I think you changed the startup project to the silverlight project. You need to start up the Web project too.
Do the following:
Right click on the solution in the Solution Explorer and select Properties.
Select "Multiple startup projects" and set the action to "Start" (on the web project)
Or just simply right click on a HTML or ASPX file in the web project and select "View in Browser".

Silverlight copy dialog makes IE11 freeze

We are having problem with a Silverlight 5 app and IE11.
Suddenly, it's no longer possible to copy-and-paste from a Silverlight application to the clipboard, after upgrading to IE11.
When the Silverlight dialog that asks you for the right to access the clip-board appears, then IE11 freezes. This behaviour has also been verified on IE11 och two different Win 8.1 computers.
We have also tried to add the site to trusted sites, and 'Allow programatic access to clipboard" to Enabled. But it dosnt help.
Any suggestions?
Anyone knowing if this is something Microsoft is addressing?
/Erik
Ran into the same issue, running IE as administrator ended up clearing up the freezing issue.
From there you can then check the box to [remember my answer], click [yes] to allow clipboard access for this site, then restart IE (non-admin) and it won't freeze when accessing the clipboard.

WPF Clickonce in Firefox and Chrome

We have a WPF Clickonce application, whcih is deployed in Server. It is working perfectly in IE. The application started installing on single click. But in Firefox and Chrome, the file was downloaded. How to overcome this? I know there are some plug-ins which will allow this as IE.
But my question is, Can I add these plugins into my application pre-requisites? Or what is the good approach to do that. Is there anyway that I could install the plugins by detecting the browsers before starting the clickonce app? I don't want my end users to do that.
Even if you find a way to embed plugins into ClickOnce-bootstrapper ("pre-requisite") you'll have to tell user to run it explicitly. ClickOnce doesn't support installing of dependencies transparently. You'll have an .exe file which user need to run. Usually VS wizard generates an html page (publish.html) which has client code for detecting missing pre-requisites. But actually it detects only missing .NET.
So you have to write some js-code for detecting missing/installed extensions for each browser you want to support.
Check this SO question: Checking if user has a certain extension installed
In anyway if a user has a link to .application and opens it in the browser then all pre-requisites will be ignored. As actually ClickOnce itself doesn't have such a feature as "pre-requisites" or "dependencies". It's just a helper for generating totally separated setup.exe bootstrapper.
Here links for extensions:
Firefox addin for ClickOnce applications - https://addons.mozilla.org/en-US/firefox/addon/microsoft-net-framework-assist/
Google Chrome addin for ClickOnce applications - https://chrome.google.com/webstore/detail/eeifaoomkminpbeebjdmdojbhmagnncl

How to get out of browser to work on a silverlight application?

I have a silverlight application and i have already checked the box that enables OOB. When i run the program from the IDE and i right click on the browser, i do not get an option to install the application. Instead i have an option to remove the application.
I would like to get an icon that other users can just click on in order to run the application. Is there a reason why i do not have the option to install the application when i run my program?
If it matters i am using silverlight 5.
thanks!
You have the option to remove the application means you have installed out of browser in the past, after clicking "remove the application" you will have the option to install the application locally.

What cases will prevent javascript from being executed in a WPF WebBrowser control?

We have a System.Windows.Controls.WebBrowser control rendering HTML with references to jQuery (retrieved with https connection). Our test machine recently had its Internet Explorer version upgraded to 8.0.7600.16385. After the upgrade, the WebBrowser control stopped executing javascript. We tested the same HTML in a regular browser and also in a System.Windows.Forms.WebBrowser control and it works perfectly in both.
Does anybody know what could cause?
It's probably due to security restrictions. Try to include a Mark of the Web on your page. For instance, this comment will tell the WebBrowser to execute the page with the security policy of the Local Intranet zone:
<!-- saved from url=(0016)http://localhost -->
Typically the cause for "JavaScript doesn't execute" is the browser errors while parsing or executing it: file doesn't exist, file has syntax error in it, script threw an exception while running, etc. You've attempted to rule this out by testing in a regular browser, but is there anything in the script that detects a UserAgent or browser features, and fails? Can you harvest console errors from a WPF WebBrowser control?

Resources