I am developing a sample using silverlight and prism. I am trying to create a text file in the client side file system from my silverlight application. It is throwing the following error
File permission denied.
I browsed through internet and came to know that the option "Out of the browser settings needs to be enabled."
But i want to do the operation from my browser (with in browser).
Anybody help in this.
You need to use the SaveFileDialog class to ask the user to specify a location and file name for the file to be saved. This requirement is enforced to the protect users from potentially malicious uses of Silverlight.
Related
Can we directly open a desktop application on a button click event from React application? I need to open a locally installed software project file to launch in desktop mode. I have an .aprx file to launch ArcGIS Pro software which I am trying to invoke from front end.
Tried to code using anchor link, but encountered error saying "Not allowed to load local resource" !
Thanks,
Paul
Tried to invoke the .aprx file using full local path but failed.
Nope, that isn't possible due to various security restrictions. However, if the application handles custom URL schemes (e.g. some-app://a-resource), you can redirect to those URLs which would open a browser prompting the user for confirmation if they'd like to open the application. That's the approach that web apps like Word online use to make the "open in desktop app" work.
Hi Team,
I have a silverlight WebApplication, it has a folder on webserver that download a document and store for clients to view. The issue I am facing is that eventhough windows authentication is enabled and directory browesing is disabled. I am able to access and view the image using the url i.e. (http:\loclahost\webapp\dir\image1.tif) form a different domain.Is there some configuration I can do on web server (IIS 8) or I need to adopt some encryption logic in my code.
Any suggestion or help on this would be of gr8 help.
If it's what I'm thinking, You must set permissions to IISUSRS (a system user created for ISS) to write and read your folder.
I understand that Metro limits the access an app has to the user's computer. Can anybody verify this, as I am considering creating an email client that will work with at least yahoo/at&t.net and gmail. Will I be able to access a user's email (assuming they provide their username and password, of course) with a Metro style app, or will I need to stick with creating an "old-fashioned" Desktop app for this scenario?
Metro applications can access the users Document Library, Picture Library, Video Library and Music Library without user intervention if the developer adds those capabilities to the Package.appxmanifest (double-click on it in Visual Studio and go to the Capabilities tab).
Even without these capabilities the app can read and write in its own local folders. And even with out these capabilities the app can prompt the user to open a file anywhere on disk using the FileOpenPicker. So yes, absolutely Metro can be used for an e-mail client.
For a sample of using FileOpenPicker (i.e. to add an attachment to your e-mail message) see:
http://code.msdn.microsoft.com/windowsapps/File-picker-sample-9f294cba
Metro can easily be used to create email clients. For something like this, you would be syncing data between the mail-server and the client.
Metro apps have limited access to the filesystem. But they can access Application Data Storage and isolatedStorage which can be used to store data pertaining to the application offline. This helper library helps store structured data in isolated storage, and might suit your needs.
For your scenario, a metro application would be a very good fit. However, the reach of metro applications will be decided by how well Windows 8 does after launch.
If i've got a filepath that the current browsers computer can access. Is there anyway that a silverlight application can open that file?
I dont want to run out of browser if possible as well.
Thanks in advance
In Silverlight 4 OpenFileDialog is the only option to access any place on the file system. Elevated trust, out of browser applications can access the current user folder only. However, in Silverlight 5 this type of application will be able to access anywhere on the file system.
From new features of Silverlight 5 at:
http://www.microsoft.com/silverlight/future/
Silverlight 5 extends features of the
‘Trusted Application’ model to the
browser for the first time. These
features, when enabled via a group
policy registry key and an application
certificate, mean users won’t need to
leave the browser to perform complex
tasks:
Host HTML content as a Web browser
control within the Silverlight
application. HTML pages, such as help
content or e-mail, can be integrated
within the application. Read and write
files to the user’s My Documents
folder, making it easier to find media
files or create local copies of
reports. Launch Microsoft Office and
other desktop programs. Users can open
Microsoft Outlook and create an e-mail
message, or send a report to Word
utilizing the power of Office. Access
devices and other system capabilities
by calling into application COM
components. Users can access a USB
security card reader or a bar-code
scanner. Enjoy full keyboard support
in full screen, which enables richer
kiosk and media viewing applications.
Call existing unmanaged code directly
from within Silverlight with PInvoke.
Note that this feature is available only on the Windows platform.
I am developing wpf application which uses the source to the controls from wcf service that will access a file or folder contents present in another network.My problem is when it searches in another network,it asks for the Credentials for that network.The Message is "Logon failure: unknown user name or bad password." How can I Solve it?
It is a problem of accessing remote files from code.
One of the solutions is using virtual disc drive that is mapped to the network. Another solution is using impersonation.
Check these links, the code can be helpful:
.NET (C#) Impersonation with Network Credentials
Accessing UNC file share with credentials?