.net-4.0

How do I read a secure rss feed into a SyndicationFeed without providing credentials?

佐手、 提交于 2019-12-13 11:36:01
问题 For whatever reason, IBM uses https (without requiring credentials) for their RSS feeds. I'm trying to consume https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en with a .NET 4 SyndicationFeed. I can open this feed in a browser and it loads just fine. Here's the code: using (XmlReader xml = XmlReader.Create("https://www.ibm.com/developerworks/mydeveloperworks/blogs/roller-ui/rendering/feed/gradybooch/entries/rss?lang=en")) { var

“ExecuteReader requires an open and available Connection. The connection's current state is closed.” on WebForm [closed]

大憨熊 提交于 2019-12-13 10:29:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I am wiorking on a web application when i click on to fetch data from database i get the following error: ExecuteReader requires an open and available Connection. The connection's current state is closed. ExecuteReader requires an open and available Connection. The connection's current state is closed. I declare

WPF Binding 2 Columns to ListView

拜拜、爱过 提交于 2019-12-13 09:39:29
问题 XAML: <ListBox x:Name="MyTitleBox" ItemsSource="{Binding}"/> <ListBox x:Name="MyInfoBox" ItemsSource="{Binding}"/> In C#: MyTitleBox.ItemsSource = new List<string>(new string[] {"ID:", "Info:", "More Info:"}); MyInfoBox.ItemsSource = new ObservableCollection<string>(MyMainInfo.ToString().Split(',').ToList<string>()); I currently have 2 list boxes next to each other because I need to handle their ItemsSource programmatically. I know there must be a better way to merge the two. Essentially the

Build error due to Async BCL packages without VS 2012 on a CI server (Team City)

孤者浪人 提交于 2019-12-13 07:41:38
问题 I develop an application that has to run on Windows XP (so the .Net Framework has to be 4.0). I need to reference Async BCL packages in order to use async/await in some of my projects. I have correctly referenced the following packages to the targeted projects as mentioned by ThomasArdal in his answer (Async Targeting Pack without Visual Studio 2012 on BuildServer): Microsoft.BCL Microsoft.BCL.Async Microsoft.BCL.Build Unfortunately the build fails when it is run from TeamCity on my CI server

CPU Sampling in VS2010 via Attach To Process?

十年热恋 提交于 2019-12-13 07:21:27
问题 Is is possible to perform CPU Sampling in VS2010 via the Attach To Process option? When I do use that option it seems to always default to Memory Profiling. I can't launch CPU Sampling with the wizard because the ridiculous security software on our work PCs don't allow the DLL injection it uses. 回答1: If you select Analyze\Profiler\New Performance Session , the Performance Explorer will open with a new performance session. In the properties of this item, you can specify the type of profiling

MissingManifestException in mscorlib.dll on IMessageService.ShowXXXX

ぐ巨炮叔叔 提交于 2019-12-13 07:17:03
问题 In my view model, I have a IMessageService, which is initialized in the constructor: private IMessageService messageService; public MyViewModel() { messageService = ServiceLocator.Default.ResolveType<IMessageService>(); } Its Show method works, but ShowError, ShowInformation and ShowWarning (anything in need of a resource, here the icons) crash with a MissingManifestException pointing towards Catel.Properties.Resources.resources manifest. Is the error on my side (wrongly installed Catel) or

How to diagnose “System.TypeLoadException” error

只愿长相守 提交于 2019-12-13 06:26:18
问题 When I attempt to open my Windows Forms application (I'll call it MyApplication.exe ) on a machine other than my dev machine, a dialog window pops up saying: MyApplication has stopped working Windows can check online for a solution to the problem Check online for a solution and close the program Close the program Details Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: myapplication Problem Signature 02: 1.2.0.0 Problem Signature 03: 51c34395 Problem Signature 04: mscorlib

Can't get Juice UI to work

白昼怎懂夜的黑 提交于 2019-12-13 06:08:08
问题 I'm new to web development. Wanted to try my hand at ASP.NET + JuiceUI. Starting from the basic web site project template in visual studio, I wanted to try and get the JuiceUI Datepicker control in a web page. I followed the instructions and installed JuiceUI into my project with nuget. But when I tried to get a juice Datepicker into my page it simply does not work: Default.aspx <asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent"> <section class="featured">

Why is the BinaryFormatter serializing private members and not the XMLSerializer or the SoapFormatter ?

落花浮王杯 提交于 2019-12-13 06:04:05
问题 I recently had a problem concerning serialization of private members of a class. here The problem was that i tried to serialize private members using XMLSerializer , i also tried the SoapFormatter which couldn't serialize them either. The only reason i wanted to serialize in one of those two formats was that i wanted to be able to check serialized values. After that, i tried the BinaryFormatter which could serialize private members without any problems. Why is the BinaryFormatter serializing

How to simulate Derived table with linq to Entities

那年仲夏 提交于 2019-12-13 05:37:18
问题 How I can simulate Derived Table with linq? Consider this Code: SELECT * FROM (SELECT * FROM Mytbl) AS tmp WHERE tmp.ID=1 How I can write this with Linq ? thanks EDIT 1: How to convert this to linq?: select convert( decimal(10,1), ROUND(A.c2*100,8)), convert( decimal(10,1), ROUND(A.c3*100,8)) from ( SELECT ( SELECT CONVERT(INT, COUNT(ID)) FROM tbl WHERE (col06 >= @param_Min and col06 <= @param_Max ) ) / ( SELECT CONVERT(INT, COUNT(ID)) FROM tbl WHERE (col06 >= 10 ) ) as c2 ( SELECT CONVERT