How get data from Microsoft Outlook with Silverlight? - silverlight

I need to get information from Microsoft Outlooks calendar to show it on calendar application which I made with Silverlight.
I can get all needed information with Silverlight 4 but in trusted mode and my application must be installed on users computer and work as Desctop application.
But I need for my application to work on browser.
Is it possible or the only way is using it as Desctop application?
Thanks.

No, you can't. The best that you can do is to create a web service to communicate with Silverlight and then an Outlook add-in to communicate with that web service.

I did it with WebDav server. I published my calndar to WebDav server. Calendar is on .ics format so I can read all information from it as with other files and then parse it.
My WCF service is on the same computer in which is WebDav so I can get all needed information with Silverlight. I decided to use this version because in this case user have no need to install .Net freamework on his computer. I also found that user can publish his calendar from internet so this version do what I need.
#Otaku thanks for your answer, it was very nice solution and it is the best version for people who can't(or don't want) use WebDav.
Here is how to publish it.
EDIT: In this case calendar opens as readonly because it located on server and cannot be synchronized with existing calendar without add-in, so #Otaku's answer is right.
My version can be used if you don't need synchronization.

Related

"Calls to the web service will fail..." Once Again

Last year someone reported encountering this problem ("The Silverlight project you are about to debug uses web services. Calls to the web service will fail unless the silverlight project is hosted in and launched from the same web project that contains the web services.") and accepted the answer to "set the web project which hosts the Silverlight application to be your startup project."
I'm seeing the same message, but think the solution might have to be different. I am building in VS 2010 a Silverlight application to access the Google Weather API, with VB as the code-behind. The API will return a XML file with data for the specified city (ex., "http://www.google.com/ig/api?weather=london,england"). The Solution Explorer only shows my VB/Silverlight project ("GetWeather"), and the Project Properties dialog box shows the Startup Object as "GetWeather.App" -- the only choice. I'm trying to use a WebClient object to make the call and an XDocument object to parse the return. But I repeatedly get the above error message, with no other result. What am I doing wrong?
Thank you in advance!
I would add a simple Web project and configure it to host the Silverlight app. You'll need to host the app somewhere anyways, so why not create a stub ASP.NET application in your solution? The easiest way is to create a new Silverlight app solution selecting an ASP.NET web project as the host, and then copying your existing code to that solution. Then you should set the web project as the startup one. This should make debugging a lot easier.
Besides, do remember to configure the client access policy to enable cross-domain calls. Check out this article

Silverlight Sharepoint 2010 web part windows authentication

I'm trying to authenticate my silverlight application to get windows user name, which then I use to get some further information. Have looked it up, but the answers I found were about configuring the web service to get it. Is there a way, to get windows credentials strictly in Silverlight? I cannot find .Credentials, the only thing I see is .ClientCredentials, but apparently it doesn't show the required information. I am getting the string "System.ServiceModel.Security.UserNamePasswordClientCredential". It actually allows me to set up the name, not retrieve it. Also there is a web service called authentication.asmx, but as before it applies to other purposes. Neither do I have any web service I could reference to and configure them. Or am I missing something? Perhaps I can retrieve the windows credential by NTLM or Kerberos? I am using Visual Web Developer 2010 Express with Silverlight 5.
My Experience is that the Membership framework that is present in the asp.net world is not available in silverlight. In order to achieve something similar I had to implement a web service (WCF) that was directed at the domain's active directory (ldap) server. Silverlight is a very strict framework in terms of interoperability, its good for security but has some limitations.
I am not sure about your level of knowledge of the active directory but here is a link that deal with a lot of the possible operations and has sample C# code to go along.
http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C#40a

Send simple data from wp7 to winforms application

I want to send simple data (geolocation data to be precise) from Windows Phone 7 application to a windows forms application and use it, as I'm a total beginner in this field I don't know which tools to use.
I searched about wcf services and tested this method but there's some issues: the data is sent from the phone application but isn't sent to the winforms application (guess something is missing)
If your know how to do this in a quick way, or have good tutorials I'll be thankful.
EDIT
I found this tutorial, it show how to connect directly wp7 application and desktop application without using sockets neither wcf service, I'm wondering if it is really works if the application isn't in localhost.
the like for the tutorial: wp7 tutorial
I had a similar problem and so I created a REST/JSON WCF service hosted in IIS with AppHarbor to provide the data. There's hundreds of ways to do it (Ruby/Heroku, etc..), but that particular one fits well within the Microsoft stack. I also needed to share route data and I used the WCF service to wrap the BingMaps services so that route computations are cached and shared. Considering that I had already created a local model, moving it out of my phone project into a service took less than a few hours (including the usual config hiccups, and forgetting to add the appharbor user to my bitbucket repo).
Consuming the service from WinForms (or any client) shouldn't be an issue as the service knows nothing about the client implementation.
Here's a tutorial from code project. REST WCF Service with JSON
I think you would need to implement some sort of server side solution which you could upload to on your Windows Phone and download from on your Windows Form application. This could be achieved using a WCF service which was connected to a server side database.
Another option would be to use sockets and communicate directly with your WinForms application. Check this tutorial on how to use basic sockets on WP7.

How do I programmatically access files in Windows Phone 7's Office Hub / Extend the Office Hub

I have developed a PDF Converter / Viewer for Windows Phone 7, but it is rather useless unless it can get the source files (Word, Excel, PowerPoint, etc) from somewhere.
An obvious place to get these files from is the Office hub on the phone, but there doesn't appear to be a documented way to access these files programmatically. I can only access my own application's files using IsolatedStorage.
Alternatively I would like to extend the functionality of the Office Hub with an extra button to convert a file, but I am not sure this is possible either.
Naturally I can retrieve files from a SharePoint Server, but I prefer not to do this unless I absolutely have to. Alternatively is there a way to map my application to a file extension so email attachments can be loaded into it?
Any brilliant ideas? How does the official PDF Viewer from Acrobat deal with this?
I'm afraid it's not possible using the SDK to accomplish any of these ideas for files stored on the phone.
The closest to load a pdf / office document from an app into the corresponding Adobe or Office application is to publish the documents on a server and link to them through a web page shown from your app. This probably doesn't suit your requirements though.
The official one does this utilising capabilities not available through the 3rd party SDK that we use.

Sharepoint as a CMS

I am looking at using Sharepoint as a CMS for my WPF application, I was hoping to create some kind of a repository and access that using .NET web services. The repository would simply be some images and perhaps some meta-data about the images (name, description, etc...)
Im am stuck to Sharepoint, so another system is not really an option.
Does anyone have any links or experience with this?
Im not a newbie to Sharepoint, I just cannot find anything on what versions to use, if I need plugins, security, how to go about it in general.
You can do this with the free version of SharePoint (SharePoint Foundation, formerly Windows SharePoint Services) that comes with Windows Server--no plugins required.
If you simply want to store the images in SharePoint you can upload them to a Document Library via a web service call. If you want to be able to view the images directly in SharePoint use a Picture Library instead. As you can see in the list of SharePoint 3.0 web services you can work with both Document and Picture Libraries. You could even have the WPF application create the libraries if need be.
As Henrico points out in Storing Images on Sharepoint you'll want to consider whether to store the image file itself in SharePoint or have the file elsewhere and use SharePoint to store the path. His post also points out some other considerations on storing images in SharePoint. Note that his post refers to using SharePoint directly, but the same considerations apply.
I'm not sure what to say about security, since SharePoint supports authorization and authentication with its normal web interface and with web services.
I once used a hosted version of SharePoint to store PDFs uploaded from a command line application that were then viewed by a separate application. It worked great for my needs.

Resources