.net-4.0

“Failed to request ThreadStore” - WinDbg debugging live process

风流意气都作罢 提交于 2019-12-12 04:09:00
问题 I am debugging the live process (not dump) of PresentationHost.exe. It used to works fine, but suddenly few days ago I get the above error message. !Threads, !pe, virtually all SOS command doesn't work. All I remember is that I installed Visual Studio 2010 and .NET framework 4.0 before I'm getting that error. Is it related? UPDATE: I myself can not reproduce the problem I was having. Probably I was debugging 32 bit process with 64 bit debugger, or .NET 4 process with .NET 2.0 SOS, or vice

Simple rating algorithm to sorting results according to user query

こ雲淡風輕ζ 提交于 2019-12-12 04:08:35
问题 I'm developing a very basic web search engine that has several parts. After retrieving results according to a user query, I want to calculate rate of each result and then sort results by calculated rate. Here is my query: var tmpQuery = (from urls in _context.Urls join documents in _context.Documents on urls.UrlId equals documents.DocumentId let words = (from words in _context.Words join hits in _context.Hits on words.WordId equals hits.WordId where hits.DocumentId == documents.DocumentId

Error in Linq: The text data type cannot be selected as DISTINCT because it is not comparable

六眼飞鱼酱① 提交于 2019-12-12 04:08:29
问题 I've a problem with LINQ. Basically a third party database that I need to connect to is using the now depreciated text field (I can't change this) and I need to execute a distinct clause in my linq on results that contain this field. I don't want to do a ToList() before executing the Distinct() as that will result in thousands of records coming back from the database that I don't require and will annoy the client as they get charged for bandwidth usage. I only need the first 15 distinct

Microsoft.WebApplication.targets was not found, on the build server. What's your solution?

大憨熊 提交于 2019-12-12 04:05:11
问题 Trying to build my project on the build server gives me the following error: Microsoft (R) Build Engine Version 4.0.30319.1 error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications

On a computer with .net 4.0 - Can one test that an application will run on .net 3.5?

心不动则不痛 提交于 2019-12-12 03:48:13
问题 I'm trying to port an application from .net 4.0 to .net 3.5. However, just changing it in Visual Studio is not enough, many references remain to .net 4.0. (See here for example.) So - Is there a way to use my computer in order to test that this application will run on a computer with 3.5 only, even though my computer has .net 4 installed as well? 回答1: Nope. First of all this is not provided by MS. Features are backward-compatible. If they would be forward-compatible, then you wouldn't have

Alternative to polling database in Windows Form?

谁都会走 提交于 2019-12-12 03:47:58
问题 We have two Windows Forms: FormSqlUpdater and FormReader . FormSqlUpdater updates an SQL table and FormReader reads from that same SQL table. This means that FormReader needs to be polling the database continually; When FormSqlUpdater changes the SQL table, the change is reflected through a TextBox in FormReader . I would like to make this as real-time as possible. So many of the suggestions have been to use a Timer . Considering that this needs to be as real-time as possible, I have a

VS2012 WCF REST Service - Error: Cannot obtain metadata

北慕城南 提交于 2019-12-12 03:46:47
问题 I have built a WCF REST web service (WCF Service Application) and when I debug with Visual Studio 2012, it will spin up the WCF Test Client app and try to add my web service. I am getting the following error: Error: Cannot obtain Metadata from http://localhost:50925/Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer

.NET 4.0 third-party library causing “That Assembly does not allow partially trusted callers”

浪子不回头ぞ 提交于 2019-12-12 03:11:08
问题 I have a console application that references third party libraries whose source code I don't have: 1) Common.Logging.NLog, 2) Common.Logging, 3) NLog After switching the Security option to "This is a partial trust application" (deployed in a network share drive), VS gave 4 warnings: Warning 1 Reference 'Common.Logging.NLog' does not allow partially trusted callers. Warning 2 Reference 'Common.Logging' does not allow partially trusted callers. Warning 3 Reference 'NLog' does not allow

Why is there no int overload for SqlFunctions.StringConvert

时间秒杀一切 提交于 2019-12-12 03:08:31
问题 Title pretty much sums it up. I'd bet that over half the usage of this method in the wild involves someone casting an int to a decimal or double in order to use it, so why isn't there just an overload that takes an int as the argument? http://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions.stringconvert.aspx 回答1: Because it's directly related to the STR function found here: http://msdn.microsoft.com/en-us/library/ms189527.aspx and that function only takes a float,

.Net 4.0+WCF+WIndows Authentication + IIS

送分小仙女□ 提交于 2019-12-12 02:53:25
问题 I am trying to host my WCF service in IIS, which supports Windows Authentication. I am able to do it using Framework 3.5, but when I change the Framework to 4.0, it gives the below error. Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service. I am able to host the service on development server. But we have to do it using IIS. <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true"