asp.net-4.0

What is the best way to load test a SignalR hubs application?

*爱你&永不变心* 提交于 2019-12-03 16:03:11
问题 I would like to know some of the different methods that have been used to test a SignalR hubs-based application. 回答1: In short, if using Hubs, using the .Net client will suffice. In my case, I have a newsfeed hub that dishes out client-specific data based on the user's profile ID. In my test case, I load up a bunch of profile ID's (6000 in this case), invoke a hub method called JoinNewsfeed() along with the client-specific connection ID and profile ID. Every 100ms a new connection is

ASP.Net cannot create/shadow copy in PRODUCTION

喜欢而已 提交于 2019-12-03 15:48:31
问题 We've recently updated a fairly large ASP.NET website (~1500th alexa traffic ranking) to use VS2010 and .NET 4.0 running on Windows Server 2008 R2 Since then, when we deploy new versions of the site we occasionally noticed the same error in this post: ASP.Net cannot create/shadow copy The error message is: Cannot create/shadow copy 'xxxx, Version=4.0.4301.26898, Culture=neutral, PublicKeyToken=null' when that file already exists However, unlike in that post, the error is occurring only in our

IIS 7.5 ASP.NET-4 Gzip compression

北慕城南 提交于 2019-12-03 11:54:17
I just can't seem to get GZIP compression enabled for my ASP.NET 4 application. Only javascript files seem to get compressed. The page, css and others dont get compressed. The response header of a not compressed CSS file is: Content-Type text/css Last-Modified Mon, 09 Aug 2010 20:10:34 GMT Accept-Ranges bytes Etag "5d71bdecfe37cb1:0" Server Microsoft-IIS/7.5 Date Sat, 28 Aug 2010 14:33:56 GMT Content-Length 3364 And for a Javascript file that gets compressed (scriptresource.axd): Cache-Control public Content-Type application/x-javascript Content-Encoding gzip Expires Sun, 28 Aug 2011 14:33:50

Cannot create a TypeConverter for a generic type

安稳与你 提交于 2019-12-03 10:52:58
I'd like to create a TypeConverter for a generic class, like this: [TypeConverter(typeof(WrapperConverter<T>))] public class Wrapper<T> { public T Value { // get & set } // other methods } public class WrapperConverter<T> : TypeConverter<T> { // only support To and From strings public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) { return true; } return base.CanConvertFrom(context, sourceType); } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(string)) {

Creating a class like ASP.NET MVC 3 ViewBag?

久未见 提交于 2019-12-03 10:10:59
I have a situation where I would like to do something simular to what was done with the ASP.NET MVC 3 ViewBag object where properties are created at runtime? Or is it at compile time? Anyway I was wondering how to go about creating an object with this behaviour? Use an object of type dynamic . See this article for more information. I created something like this: public class MyBag : DynamicObject { private readonly Dictionary<string, dynamic> _properties = new Dictionary<string, dynamic>( StringComparer.InvariantCultureIgnoreCase ); public override bool TryGetMember( GetMemberBinder binder,

LazyList<T> vs System.Lazy<List<T>> in ASP.NET MVC 2?

自闭症网瘾萝莉.ら 提交于 2019-12-03 09:13:23
问题 In Rob Conery's Storefront series, Rob makes extensive use of the LazyList<..> construct to pull data from IQueryables . How does this differ from the System.Lazy<...> construct now available in .NET 4.0 (and perhaps earlier)? More depth based on DoctaJones' great answer: Would you recommend one over the other if I wanted to operate on IQueryable as a List<T> ? I'm assuming that since Lazy<T> is in the framework now, it is a safer bet for future support and maintainability? If I want to use a

ASP.Net cannot create/shadow copy in PRODUCTION

穿精又带淫゛_ 提交于 2019-12-03 05:17:34
We've recently updated a fairly large ASP.NET website (~1500th alexa traffic ranking) to use VS2010 and .NET 4.0 running on Windows Server 2008 R2 Since then, when we deploy new versions of the site we occasionally noticed the same error in this post: ASP.Net cannot create/shadow copy The error message is: Cannot create/shadow copy 'xxxx, Version=4.0.4301.26898, Culture=neutral, PublicKeyToken=null' when that file already exists However, unlike in that post, the error is occurring only in our production environments & only on some servers. After we ship a new version of the code, we recycle

What is the correct usage of “runAllManagedModulesForAllRequests” in ASP.NET MVC2/3?

∥☆過路亽.° 提交于 2019-12-03 04:30:57
问题 I've read various posts and questions about the use of runAllManagedModulesForAllRequests in the modules section of <system.WebServer> and I'm concerned that I'm using this setting incorrectly. All my ASP.NET MVC applications are written using .NET Framework 4.0 and MVC2, plus we have a beta of an application that uses MVC3. These apps are deployed to servers running Windows 2008R2/IIS7.5. The sites are configured to run in Integrated Pipeline/.NET 4.0 application pools. If I set

Is it necessary to create ASP.NET 4.0 SQL session state database, distinct from existing ASP.NET 2.0 ASPState DB?

ぃ、小莉子 提交于 2019-12-03 01:57:07
Is the ASP.NET 4.0 SQL session state mechanism backward-compatible with the ASP.NET 2.0 schema for session state, or should/must we create a separate and distinct session state database for our ASP.NET 4.0 apps? I'm leaning towards the latter anyway, but the 2.0 database seems to just work, though I'm wondering if there are any substantive differences between the ASPState database schema / procedures between the 2.0 and 4.0 versions of ASP.NET. Thank you. There was no quick answer on this from anybody, so I did some digging. I generated an ASPState database using the aspnet_regsql.exe tool

LazyList<T> vs System.Lazy<List<T>> in ASP.NET MVC 2?

牧云@^-^@ 提交于 2019-12-02 23:29:17
In Rob Conery's Storefront series, Rob makes extensive use of the LazyList<..> construct to pull data from IQueryables . How does this differ from the System.Lazy<...> construct now available in .NET 4.0 (and perhaps earlier)? More depth based on DoctaJones' great answer: Would you recommend one over the other if I wanted to operate on IQueryable as a List<T> ? I'm assuming that since Lazy<T> is in the framework now, it is a safer bet for future support and maintainability? If I want to use a strong type instead of an anonymous ( var ) type would the following statements be functionally