silverlight

PrincipalPermission.Demand() failing once WCF Service was moved to SSL

◇◆丶佛笑我妖孽 提交于 2019-12-19 11:41:15
问题 My Silverlight/WCF application uses PrincipalPermission in each service method to ensure the user is Authenticated. This works just fine when I have everything configured to HTTP, but once I configured my service endpoints/bindings to support HTTPS (SSL), I get an exception thrown when I call the Demand() method of my PrincipalPermission object. EDIT: I should mention I am using IIS 7.5 Express to host and debug this project. Here is the method that checks to make sure the user is

Saving image to media library WP7

不想你离开。 提交于 2019-12-19 11:34:16
问题 I cant save images into windows phone media library ! Here is my code snippet : public void SaveImageTo(string fileName) { fileName += ".jpg"; var myStore = IsolatedStorageFile.GetUserStoreForApplication(); if (myStore.FileExists(fileName)) { myStore.DeleteFile(fileName); } IsolatedStorageFileStream myFileStream = myStore.CreateFile(fileName); // Create a new stream from isolated storage, and save the JPEG file to the media library on Windows Phone. myFileStream = myStore.OpenFile(fileName,

Cross Domain security error in Silverlight?

折月煮酒 提交于 2019-12-19 10:57:24
问题 I'm trying to read a feed from Yahoo Pipes into a Silverlight Application. I keep getting a SecurityException, which sounds like a cross domain policy problem, but Yahoo pipes, if you go through the pipes.yahooapis domain, has a cross domain policy, so should be ok. I tried the exact same code, but going to the Digg API, and it works fine (although this is rest rather than an rss feed). Could my error have nothing to do with Cross Domain policies? I use the following code for the web request

Windows Phone Navigation - Passing back to the page before

天大地大妈咪最大 提交于 2019-12-19 09:46:44
问题 I would like to click on a button to take me to a page , then click on a listbox item, click on a button on the new page and pass it back to the page before without creating a new URI of the first page. **First Page** private void btnAddExistingMember_Click(object sender, RoutedEventArgs e) { NavigationService.Navigate(new Uri("/ChooseMember.xaml", UriKind.Relative)); } **Second page after choosing listbox value** private void btnAddSelected_Click(object sender, RoutedEventArgs e) { Member

redirect to another page from Silverlight

。_饼干妹妹 提交于 2019-12-19 09:27:35
问题 In side a Silverlight Page, I want to redirect to another aspx page in the same web site and using POST method to send some additional header information. Any ideas how to implement this? Any samples are appreciated. :-) I am using VSTS2008 + .Net 3.5 + Silverlight 2.0 + C#. 回答1: My suggestion would be to have a Visibility=hidden Button on the page, and then use javascript to retrieve it and .Click() it. Thus you get to do a post without all the work that this guy went through: http:/

Why does XDocument.Parse throw NotSupportedException?

你说的曾经没有我的故事 提交于 2019-12-19 09:26:10
问题 I am trying to parse xml data using XDocument.Parse wchich throws NotSupportedException, just like in topic: Is XDocument.Parse different in Windows Phone 7? and I updated my code according to posted advice, but it still doesn't help. Some time ago I parsed RSS using similar (but simpler) method and that worked just fine. public void sList() { WebClient client = new WebClient(); client.Encoding = Encoding.UTF8; string url = "http://eztv.it"; Uri u = new Uri(url); client.DownloadStringAsync(u)

Waiting for Event Triggering in Silverlight Unit Tests

拥有回忆 提交于 2019-12-19 08:56:37
问题 I am using the Silverlight Unit Testing Framework to test some View Manager classes. Some tests require the PropertyChanged events to be fired. I'm currently using a combination of EnqueueConditional and WaitHandles Example 1 [TestMethod] [Asynchronous] [Timeout(1000)] public void TestNotificationExample() { var manager = new UserManager(); var waitHandle = new ManualResetEvent(false); manager.PropertyChanged += (sender, propChangArgs) => { waitHandler.Set(); }; manager

How do I get the exact scroll position in an Listbox?

元气小坏坏 提交于 2019-12-19 08:56:05
问题 I would like to be able to load more data into a listbox when I reach the begining or the end of the listbox. My listbox shows items that are time related therefor when I reach the top and pull down I would like to see some text like "Scroll down more to retrieve more items" and if you do so it then triggers a data download for items that occur earlier. Same thing for the bottom item if you scoll down far enough (beneath the last item it triggers a data download for items later than listed).

Flash vs. Silverlight

喜夏-厌秋 提交于 2019-12-19 07:52:44
问题 We are building a training website where we need to track viewers watching videos and store detailed info about the viewing (when they paused, if they watched the whole video etc) What should we consider when deciding between the two technologies? I forgot to add. This is for an in house app. We have complete control over the environment. If it this was for a public application I would definitely go with Flash. I'm just looking for technical advantages of one over the other from someone who

Silverlight application doesn't run. I get an invalid or malformed application error

偶尔善良 提交于 2019-12-19 05:21:50
问题 I have a Silverlight application, and when I click 'run' Internet Explorer starts up and nothing is shown. I get an error icon in the bottom left that, when I click it, result in the following error. Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: Wed, 25 Nov 2009 00:11:41 UTC Message: Unhandled Error in Silverlight Application Code: 2103