We enabled static resource caching in our ASP.NET application like this:
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseExpires" httpExpires="Thu, 29 Oct 2020 00:00:00 GMT" />
</staticContent>
</system.webServer>
Using a sniffer, we can confirm that the Expires tag is actually being placed on the ...
Consider this 2 methods that returns IEnumerable:
private IEnumerable<MyClass> GetYieldResult(int qtResult)
{
for (int i = 0; i < qtResult; i++)
{
count++;
yield return new MyClass() { Id = i+1 };
}
}
private IEnumerable<MyClass> GetNonYieldResult(int qtResult)
{
...
Hey
I have the following situation: a WinService which is processing some stuff from a queue, writing to other tables (during processing) and after it finishes it deletes the entry and moves to the next one.
I would need a mechanism to determine if the instance is alive and going and if not to start or wake up a second instance.
What I...
I am converting a project from using linq2sql to use an odata source. I am trying to lookup a user like this...
FrameworkEntities db = new FrameworkEntities(
new Uri("http://localhost/odata/FrameworkService.svc"));
User user = db.Users.Where(
u => SqlMethods.Like(u.UserName, UserName)).FirstOrDefault();
but am getting the erro...
Hi,
Can you recommend me a way or tell me the most common practice to create a sample portion of a data-base as an xml file so that I can use it from my unit tests without worrying about Db state to be persistent?
Is there any frame work to overcome such a scenerio including the functionality that after each test I can get back to the ...
How the new features in C# 5.0 and BCL announced at Microsoft PDC 2010 will impact/change the way we write code as of now?
...
I am looking to draw a music staff on a .NET (C#) form. I am using Microsoft Visual C# 2010 Express. I was wondering if anyone knew of existing code or existing free .NET libraries that can help with that. I am looking at drawing both the treble and bass clef staff and adding one quarter note to some where in the staff. I am making a...
Hello, How can I make an Atom entry with C# and .NET 4 ?
I need to make an entry with this structure:
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:f="XXX:aaa">
<title>title1</title>
<summary>summary1</summary>
</entry>
I tried to do this with SyndicationItem class but entry contains more info than I need:
SyndicationItem ato...
My VS 2008 created installer doesn't call the override Uninstall method in my installer class. why? The Install method was called.
My installer class looks like this:
[RunInstaller(true)]
public partial class InstallerClass : Installer
{
public InstallerClass()
{
InitializeComponent();
}
...
We already have several (100+ pages) of drawings in the same format that describe interconnecting systems. Instead of pounding keys for 3 months transferring these relationships to a spreadsheet, I would like to parse the Visio drawings directly.
Is there a library dedicated to Visio that would accomplish this? Am I just missing somethi...
We create a lot of console apps, ssis packages to extract data from our database to be used in downstream applications. Some are excel files, some are CSV files.
What i'm looking to do is build a dynamic, configurable extract engine that I can customize what elements the group wants and have those files extracted.
Has anyone solved th...
Hello,
I use the coverflow control from http://silverlightcoverflow.codeplex.com/ and my problem is that is going verry bad because i had very much item in it.
Could someone tell me how can i reduce the number of the items and load them dinamicaly as i need them.
The items are a user control in which i also have a google map and an imag...
i'm trying to decipher the meaning on the P1...P10 parameters associated with a clr20r3 that is written to the event log when my application experiences an exception.
The best i've been able to find is:
P1: the hosting process (e.g. w3wp.exe)
P2: the hosting process version (e.g. 6.0.3790.1830)
P3: ??? (e.g. 42435be1)
P4: the assembly...
In my fitnesse project i've got one table which stores authentication data to database. I'm using it on each site. Is it possible to have one site with that table and allow all other test sites use data from it? how i can define global table with variables that i need?
...
All my service methods use a facade to talk to the business logic. This means that in the facade the DataContracts (I'm using WCF) are translated to entities (Entity Framework) and then passed on to the business layer. The problem I'm facing right now is that I want to put certain validation logic in the business logic, but this keeps fr...
Hi all,
I have made an application which showns a lists of client. You can open a client, and the client's details are shown.
My application takes quite a long time to start, so I want to improve the startup performance.
In pseude-code, my main window looks like this
<Window>
<c:WelcomeAnimation Visibility="Visible" />
<c:Cl...
I'm new to the world of data and DBA work (I'm mostly an .NET developer)... we have an old version of ER Studio (7.5) and I'm wondering how it compares to what comes with VS 2010.
Your experience is much appreciated! Also, feel free to reccommend tags for this post
...
So I'm playing around with EnvDTE, and the EnvDTE.CodeModel API, And I was wondering if there was a way to get the text value represented by a CodeElement.
Let's say I have an CodeAttribute, is there some way to get a string of what the CodeAttribute represents, i.e.[MyAttribute(value="myvalue")].
I know it's possible to reconstruct th...
Hi,
I'm writing a service but I want to have config settings to make sure that the service does not run within a certain time window on one day of the week. eg Mondays between 17:00 and 19:00.
Is it possible to create a datetime that represents any monday so I can have one App config key for DontProcessStartTime and one for DontProcess...
Surely this has got to be easy; I'm just not having any luck with it.
How would I get the TabPage of a given TabControl whose tab contains a given Point? For example, if I'm handling the MouseUp event and I want to know which tab the mouse was over when it was released.
I tried GetChildAtPoint, but that seems to always return the first...