Invoking out of browser app from in-browser app in silverlight - silverlight

We need to have the functionality of users running excel reports from a silverlight application. The application will show data from the server and upon clicking a button users should see an excel report from the data in their client machines. We can't make the original application out of browser so I am looking for options.
I am thinking of creating an out of browser application which can invoke excel in the client machine. Our original application just have to download and install the out of browser application with user permissions. Also I need to pass the data for the excel report from the in-browser application to the OOB applications.
Is it possible? If it is, is there any help available how to do this?

The only thing that comes to mind is to popup another browser window from your in-browser Silverlight application and then offer excel file download to the client. By default this dialog offers Open option as well and that could solve your problem. That's how I solved excel report download from SSRS in my Silverlight application.

It is possible to let users download data as CSV files from the browser, which will open in Excel for most users.
You can also copy delimited text to the user's clipboard using Clipboard.SetText which the user can then paste into a running instance of Excel.
Another option would be to use a server-side service to generate an Excel document and have the Silverlight application show a hyperlink to the document.

Related

Calendar Control 12.0 for windows forms application using MsSql database

I have a Calendar Control 12.0 in Windows Forms Application. I want to show the jobs allocated for each days with the support of MsSql database. I found some coding about Calendar Control in asp.net. But that same control is not available for Form Application.
Is there any event functions I can use to display the jobs for each days?
In order to add a Calendar control directly to a windows forms is not possible.
But what I did was:
Created a web page using asp.net web application and used the calendar control which is available in toolbox for asp.net application. Then I linked the Sql database to show the day to day events.
Published the web page and saved the files in a local drive.
Then hosted that page locally using IIS.
Then in windows forms added a web browser control.
Then set the navigation path to the localhost address.
That's all done.
The funny part is for my first question in stack overflow I'm the one providing the answer. :):) After lots of research in internet solved my problem on my own.

silverlight web application prevent file access from webserver through url

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.

Opening sharepoint documents from Silverlight and re-use session

We have a silverlight application thats behind a ISA server, and the users have to authenticate against the ISA server.
In the silverlight application we uses Sharepoint 2007 as a documentlibrary (the backend uploads the documents).
When the user wants to open a document, we use a javascript, editDocumentWithProgID2, and HtmlPage.Window.Invoke(...) in silverlight.
The problem is that word/excel shows a new login dialog, so the users have to login again. Is there a way of avoiding this login dialog?
cheers
Thomas
Word/Excel act like a second "browser", you can't reuse the session.
The only way to avoid double login is to save the file on the local drive and then open it with office.

Silverlight Open File

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.

Internet Explorer download notification on HTTPS

I have a Silverlight application deployed on a HTTPS server. My applications generates reports that are saved as PDF files. Whenever a user tries to download a file from my application from IE, he gets a notification under the toolbar asking him if he really wants to download the file. If you agree, then IE reloads the page, sending the user back to the login page of my application. After logging again, the user can download any file, but this is very annoying for the user. How can I resolve this problem? Thanks!
If you know who your users are (condition), you might ask them to put your website under their list of Trusted Sites, which will avoid the annoying notification bars.
You need to trigger the download in such a way that it's obviously a user-initiated action. I'm not sure if Silverlight offers a method for this.

Resources