During performance testing, I found that the values of "Process(w3wp)\% Processor Time" are greater than 100. Some values are
237.1436486
312.5338052
341.2373994
264.4097661
191.6237736
I thought this value represents the CPU usage by w3wp process. I don't understand why the value is greater than 100%.
Any insights appreciated.
Thanks...
I'm using FormsAuthentication (with cookies) for users authentication, with the default cookie name (".ASPXAUTH").
What I need is a different login system for the "/Admin/" virtual directory (backed by an ASP.NET MVC controller, "AdminController")... as if the "/Admin/" directory was another web application, but without creating another...
I am using the CodeDOM to generate and compile an assembly. I have found that if the generated code does not compile, the CompileAssemblyFromDom method generates line numbers that are different than what visual studio would generate.
So for example, if I call GenerateCodeFromCompileUnit on the code provider, take the generated code in...
I have this source code:
public static void FTP_SERVER()
{
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://myurl.com/mainfolder/");
request.Method = WebRequestMethods.Ftp.ListDirectory;
request.Credentials = new NetworkCredential("myusername", "mypassword");
FtpWebResponse response = (FtpWebResponse)reque...
When deserializing a JSON array in C#/.NET, is the order of elements always preserved?
Edit: The library currently being used is .NET 3.5's System.Runtime.Serialization.Json.DataContractJsonSerializer
...
The following code opens a link in an existing browser window when browserExe is pointing to Firefox, Safari or Chrome. When pointing to IEXPLORE.EXE (IE7) a new windows is opened.
ProcessStartInfo pi = new ProcessStartInfo(browserExe, url);
Process.Start(pi);
This opens a tab in an existing window as intended, when IE is the default ...
I'm currently working on a problem with a custom UserControl, I want to expose certain properties of child controls as properties on the parent, I also want data binding to be possible. To make all this happen, I created Attached DependencyProperties on the parent:
//TimeframeSelector.xaml.cs
public static readonly DependencyPro...
Does anyone knows how can I invoke method dynamically without reflection?
I`ll try to specify my question below
Suppose we have an interface IMyInterface and MyImplementation is an implementation of IMyInterface. Besides of that I have a generic proxy class MyProxy<T> where T : IMyInterface. In this proxy I wanna wrap all calls to all ...
For some reason, calling SHGetFileInfo for an .lnk file returns icons with a link overlay, even when I don't request it:
Shell.SHGetFileInfo(path, 0, ref shFileInfo, (uint)Marshal.SizeOf(shFileInfo),
SHGFI.ICON | SHGFI.SMALLICON | SHGFI.TYPENAME | SHGFI.DISPLAYNAME);
I'm using shFileInfo.hIcon to get the icon handle (Windows 7, x64). ...
I have a function where I am performing a lot number of database operations inside a Sub. The operation when called directly like:
ExecProcess()
takes about 11 seconds to run.
However, if I create a Delegate, and call the sub using BeginInvoke(), the very same process takes over 40 seconds to execute.
Here's the threaded code:
Prot...
Currently I have a section of code that needs to make about 7 web service calls to various providers for data. Each call takes a several seconds to execute, so I would like to run them in parallel to speed things up.
I have wrapped my 7 calls in a Parallel.Invoke which works great at running a couple things at the same time, but on a 2 ...
does anyone know if it is possible to generate a valid upc?
if so, how? is it possible to do it in excel / python / .net?
the platform does not matter to me
...
Something like:
public static void Estimate ( params string [ ] names, params int[] numbers )
{ }
where you could use it like:
Estimate ( "Eric", "Simpson", "Jon", 1, 2, 3, 4, 5 )
...
I know this is likely to be an open-ended kind of question, but I'll take the best-regarded answers and consolidate them here for reference.
I'm working on a set of tools to read and write Mobipocket files (a.k.a. Kindle eBooks) using C#, and am running into a design question when it comes to writing new files. The underlying file form...
I've attempted the question different ways, check my profile for the other two questions explaining the difficulty I've had with the approaches I've taken to this scenario. I'll skip them here.
I just need an example (C# preferred) of a server calling back to a client (over a nettcp channel), the client calculates an answer, and return...
Given a hash algorithm like SHA1 or SHA256 how would I go about obtaining the ASN.1 DER encoding for it as defined in RFC3447? (see page 42 - link) Below is the desired output.
MD5 30 20 30 0c 06 08 2a 86 48 86 f7 0d 02 05 05 00 04 10
SHA-1 30 21 30 09 06 05 2b 0e 03 02 1a 05 00 04 14
SHA-256 30 31 30 0d 06 09 60 86 48 01...
Given that directly exposing linq to sql or entity framework classes over web services is a bad idea, how should I expose the data over a web service such as WCF?
It seems like I would have to create a parallel set of classes for the web service, and then marshal the data into those, which doesn't seem very elegant.
The web services wi...
My company is a Microsoft shop (Exchange, AD, etc.).
I'd like to do queries on our employee directory like:
Person person = directory.Lookup("jsmith");
string title = person.Fields("JobTitle");
Person manager = person.GetManager();
if (person.IsManager())
{
Person[] subordinates = person.GetSubordinates();
}
Is there any easy way...
I'm thinking about starting a new project using EF 4 and going through some articles, I found an article about EF with repository pattern and unit of work (http://blogs.msdn.com/b/adonet/archive/2009/06/16/using-repository-and-unit-of-work-patterns-with-entity-framework-4-0.aspx)
Looking at that article, it uses the ObjectContext as the...
Consider the following. You have a class that you want to serialize with XmlSerializer which has a public generic method with a type constraint where the type is in a different assembly:
using BarStuff;
namespace FooStuff {
public class Foo {
...
public T GetBar<TBar, T>( string key ) where TBar : Bar<T> {
...
}
...