.net-4.0

Can I host a .net 2.0 virtual directory in asp.net 4.0 site?

不羁的心 提交于 2019-12-21 12:26:28
问题 We've had no problems running .NET 4.0 virtual directories in 2.0 web sites, but the opposite way around is giving us some issues. This is understandable, but is there a way to work around this problem? They are running with different application pools... can we have the virtual directory skip the website's web.config and go directly to the machine.config? We are getting the following error: Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case

SOAP xml client - using Visual Studio 2010 c# - how?

◇◆丶佛笑我妖孽 提交于 2019-12-21 12:21:50
问题 I'm new to .NET world, yet have to use VStudio C# 2010 (.NET 4.0) to produce a client that requests data from a web service in SOAP Xml fashion. I've searched here for answers but got confused even more. MSDN says that "Building XML Web Service Clients" is legacy for .NET 4.0, i.e. WSDL is legacy. Use "WCF" instead, they say. In WCF i got lost - too much and too vague. It must be simpler then that... And all examples that i could find on the web - they all use WSDL, "the legacy". Here are the

Calling varargs method via DynamicMethod

一曲冷凌霜 提交于 2019-12-21 12:21:46
问题 I'm trying to call unmanaged printf-like function using DynamicMethod. At runtime I get a BadImageFormatException:Index not found. (Exception from HRESULT: 0x80131124) Is this a limitation of runtime or my emited code is wrong? public class Program { [DllImport("msvcrt40.dll",CallingConvention = CallingConvention.Cdecl)] public static extern int printf(string format, __arglist); static void Main(string[] args) { var method = new DynamicMethod("printf", typeof(void), new Type[0], true); var il

Hashtable insert failed. Load factor too high. - asp.NET 4.0 MVC3

自古美人都是妖i 提交于 2019-12-21 12:01:47
问题 We have an ASP.NET 4.0 MVC3 application running on F5 load balanced servers. We received the exception below. We do not do multi-threading in our web application, but don't know if the F5 load balancing servers could be factoring into the equation. We see where the exception occurs on earlier versions of .NET (Most of the other posts deal with .NET 2.0 and 3.5). Has anyone experienced this issue with .NET 4.0? The exception rendered the application unusable because upon login no page could be

Error when calling MvcHttpHandler.ExecuteRequest from custom IHttpHandler

删除回忆录丶 提交于 2019-12-21 10:46:28
问题 I have a custom IHttpHandler that calls MvcHttpHandler implemented as described in this answer. It worked well in asp.net MVC2, but after I migrate the code to MVC4 with IISExpress 7.5, I start getting InvalidOperationException on the line: httpHandler.ProcessRequest(HttpContext.Current); with message: 'HttpContext.SetSessionStateBehavior' can only be invoked before 'HttpApplication.AcquireRequestState' event is raised. ASP.NET Development Server does not make any problems. Does anyone know

Problem with System.Net.Dns.GetHostEntry(dnsServer) on .NET 4.0

我怕爱的太早我们不能终老 提交于 2019-12-21 09:33:27
问题 I have been using the following code for months (without problem) in a .NET 2.0/3.5 environment: string server="192.168.1.3"; IPHostEntry ipe = System.Net.Dns.GetHostEntry(server); IPAddress ipa = ipe.AddressList[0]; IPEndPoint ipep = new IPEndPoint(ipa, (int)UdpServices.Domain); Here, server is hardcoded to an IP address, but in my application it could potentially be something like "server.test.com". When converting my project to .NET 4.0, this code stopped working when directly passing an

No ASP.NET features shown in IIS 7.5

帅比萌擦擦* 提交于 2019-12-21 09:21:46
问题 I'm having an issue in IIS 7.5 where the ASP.NET feature section isn't showing on my web application. My environment: Windows 2008 R2 SP1, IIS 7.5 (7.5.7600), .NET Framework 4.0 My issue is similar to the issue posted here: No asp.net features on IIS 7.5, only my environment is different. The 'add features' fix mentioned in that post doesn't appear to work in Windows Server 2008, as I'm not seeing a simple "ASP.NET" feature that can be selected. I tried running the aspnet_regiis tool as

Exception when specifying defaultProxy in app.config when running NET4.0 application from network share

◇◆丶佛笑我妖孽 提交于 2019-12-21 07:57:08
问题 We're seeing a very strange issue when running the following application from a network share under NET4.0. When specifying a defaultProxy section in app.config a System.Net.WebException is thrown. There is no problem when running from a local drive. According to documentation applications will run as full-trust assemblies from a network share so we're assuming this should work just fine. Any ideas how we can work around this problem? Has anyone else experienced this issue or does anyone know

MVC Mini Profiler includes not respecting application's path

给你一囗甜甜゛ 提交于 2019-12-21 07:49:09
问题 I've got the MVC Mini Profiler set up as described on its project page, and the includes are indeed being written on the page. Problem is, my application sits at http://localhost:8080/web , and the markup written by the profiler includes looks like this: <link rel="stylesheet/less" type="text/css" href="/mini-profiler-includes.less?v=2.0.4177.17902"> <script type="text/javascript" src="/mini-profiler-includes.js?v=2.0.4177.17902"></script> <script type="text/javascript"> jQuery(function() {

What is the scope of StaticResource within a WPF ResourceDictionary?

那年仲夏 提交于 2019-12-21 07:34:08
问题 I have a WPF ResourceDictionary with the following TextBlock: <TextBlock Visibility="{Binding Converter={StaticResource MyBoolProp ResourceKey=BoolToVis}}"> </TextBlock> The ResourceDictionary is included in App.xaml under MergedDictionaries: <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="MyResourceDictionary.xaml"/> Within the App.xaml I have defined the BoolToVis converter (again, under Application.Resources )