Http - FireFox 3.6.8 Not Cache Static Contents From .net Developer Server?

Aug 19, 2010

I am working on a asp.net web site, like normal user, we use asp.net developer server during coding and testing.Today, I found the firefox not cache any static file of my site, since our application is pretty big, it made page load time very slow.I checked firefox about:cache, all the static file cache setting looks like

Key: http://localhost:26851/App_Layout/icons/actions/email/folder.png
Data size: 871 bytes
Fetch count: 1[code]...

The expires date is set back to 1969-12-31, I believe that's the reason why they are loaded very time.I am using Visual studio 2008, windows 7 machine. The application works fine in IE, the contents are properly cached.

View 5 Replies


Similar Messages:

Possible To Cache The Response Of A Http Handler On The Server And On The Client

Mar 11, 2010

Is it possible to cache the response of a http handler on the server and on the client?This doesn't seem to be doing the trick:

_context.Response.Cache.SetCacheability(HttpCacheability.Public);
_context.Response.Cache.SetExpires(DateTime.Now.AddDays(7));

View 2 Replies

Architecture :: Cache The Full List Of Objects In Http Cache On The Service Tier And Page In Memory?

Feb 25, 2011

We have a wfc layer that wraps the business classes and database access and use a client that lives on the database layer. Amongst our group we are attempting to form standards. Some want to have the client call the web method and pass the page they are requesting and the page size. Pass that to the database and then page in SQL Server use RowNum.Some want to cache the full list of objects in http cache on the service tier and page in memory. They concern here is memory use on the server.

Which would be best for a medium number of users with potentially large number of records to manage (say 30K) Is it better to cache them all in memory and work from there or page at the database as the application scales?

View 1 Replies

Visual Studio :: Building A Static Website Using Web Developer Express

Jan 3, 2011

i want to build a simple information web site , that contains;

1. text

2. links

3. images

4.tables

i do not need to connect to a database or other services , no login is required .

so is it possible to create such a simple web site using Visual web developer express?

View 3 Replies

MVC's And Firefox's Cache Work?

Aug 3, 2010

I use the following code to write cache header on *.png requests:

response.Buffer = false;
response.BufferOutput = false;
// Emit content type and encoding based on the file extension and
// whether the response is compressed
response.ContentType = MimeMapping.GetMimeMapping(physicalFilePath);
if (mode != ResponseCompressionType.None)
response.AppendHeader("Content-Encoding", mode.ToString().ToLower());
response.AppendHeader("Content-Length", count.ToString());
// Emit proper cache headers that will cache the response in browser's
// cache for the default cache duration
response.Cache.SetCacheability(HttpCacheability.Public);
response.Cache.AppendCacheExtension("must-revalidate, proxy-revalidate");
response.Cache.SetMaxAge(DEFAULT_CACHE_DURATION);
response.Cache.SetExpires(DateTime.Now.Add(DEFAULT_CACHE_DURATION));
response.Cache.SetLastModified(lastModified);

But every time I refresh the page which contains the PNG URL, it will post to web server again. It seems that the cache header not work, and worse, it make the browser cache not work too. I am using asp.net mvc.

View 2 Replies

Necessary To Manually Cache Static Files In C#?

Nov 29, 2010

I have a class that is creating an instance of StreamReader to an xml file on the local filesystem.
It may be possible that this same file is requested multiple times per-second.

I was wondering whether I need to manually add this file to the System.Web.Cache and read it from there, or whether Windows itself is clever enough to cache the item itself so that it 'knows' when ASP.NET requests this file the second/third etc time that it doesnt have to do a disk seek/read operation and pulls it from its own cache?

This article: http://dotnetperls.com/file-read-benchmarks seems to back this up, but this: article:

[URL](although not discussing from a performance perspective, and maybe for other reasons entirely) lists how to add a physical file to the cache.

View 1 Replies

C# - Caching Through HttpContext.Current.Cache Or Just A Static?

Mar 28, 2011

Last night I wrote up my first IHttpModule to do some request processing. I'm using a regular expression to inspect the raw url. The IHttpModule will be called on every request, so it seems reasonable to do some sort of caching of the regular expression object to prevent creation of it on every request.

Now my question... what is better: use the HttpContext.Current.Cache to store the instantiated object or to use a private static Regex in my module?I'm looking forward to the reasons why. Just to clarify: the regex will never change and thus always be the same thing.

View 3 Replies

C# - Making Cache Access Methods Static?

Nov 12, 2010

In ASP.NET, is there any reason not to make a set of functions that Add/Remove/Get from the Cache object Static?Get() - just gets the item, no reason not to be staticAdd(), Remove() - I've read that adding/deleting into the cache has it's own internal locking mechanism, so they can be static without me creating my own lock(){} wrapping.

View 1 Replies

State Management :: Cache Vs Static Variable?

Sep 24, 2010

I know the big difference, but one thing is confusing me. Cache works only on a single machine on webfarm and to make it globally we use Velocity or memcache.So is static does same, or is it already work globally ?
eg

Cache["someid"] = "value"; //this will only work on single machine cache,

static string abc = "value"; // will this work on single machine or globally ?

View 6 Replies

Custom Server Controls :: How To Programmatically Cache A Server Control And Add A Cache Dependency?

Feb 11, 2011

I have a server control that I developed which generates navigation based on a third party CMS API. Currently I am caching this control using the PartialCaching attribute. The CMS uses cache key dependencies to invalidate the cache when a user makes an edit, however in the case of my server control it does not get invalidated and the updated navigation will not show up until the cache expiration set by the PartialCaching attribute.Here is my two part question:

What is the proper way to programmatically cache a server control, without using the PartialCaching attribute, and adding a cache key dependency?

Is it possible to continue to use the PartialCaching attribute and add a cache key dependency?

View 2 Replies

C# - Caching W/file Dependency: Static Var Vs. AspNet Cache Vs. Memcached

Sep 29, 2010

TL;DR: Which is likely faster: accessing static local variable, accessing variable stored in HttpRuntime.Cache, or accessing variable stored in memcached?At work, we get about 200,000 page views/day. On our homepage, we display a promotion. This promotion is different for different users, based on their country of origin and language.

All the different promotions are defined in an XML file on each web server. We have 12 web servers all serving the same site with the same XML file. There are about 50 different promotion combinations based on country/language. We imagine we'll never have more than 200 or so (if ever) promotions (combinations) total.

The XML file may be changed at any time, out of release cycle. When it's changed, the new definitions of promotions should immediately change on the live site. Implementing the functionality for this requirement is the responsibility of another developer and I.

Originally, I wrote the code so that the contents of the XML file were parsed and then stored in a static member of a class. A FileSystemWatcher monitored changes to the file, and whenever the file was changed, the XML would be reloaded/reparsed and the static member would be updated with the new contents. Seemed like a solid, simple solution to keeping the in-memory dictionary of promotions current with the XML file. (Each server doing this indepedently with its local copy of the XML file; all XML files are the same and change at the same time.)

The other developer I was working holds a Sr. position and decided that this was no good. Instead, we should store all the promotions in each server's HttpContext.Current.Cache with a CacheDependency file dependency that automatically monitored file changes, expunging the cached promotions when the file changed. While I liked that we no longer had to use a FileSystemWatcher, I worried a little that grabbing the promotions from the volitile cache instead of a static class member would be less performant.

(Care to comment on this concern? I already gave up trying to advocate not switching to HttpRuntime.Cache.)

Later, after we began using HttpRuntime.Cache, we adopted memcached with Enyim as our .NET interface for other business problems (e.g. search results). When we did that, this Sr. Developer decided we should be using memcached instead of the HttpRuntime (HttpContext) Cache for storing promotions. Higher-ups said "yeah, sounds good", and gave him a dedicated server with memcached just for these promotions. Now he's currently implementing the changes to use memcached instead.

I'm skeptical that this is a good decision. Instead of staying in-process and grabbing this promotion data from the HttpRuntime.Cache, we're now opening a socket to a network memcached server and transmitting its value to our web server.This has to be less performant, right? Even if the cache is memcached. (I haven't had the chance to compile any performance metrics yet.)On top of that, he's going to have to engineer his own file dependency solution over memcached since it doesn't provide such a facility.

Wouldn't my original design be best? Does this strike you as overengineering? Is HttpRuntime.Cache caching or memcached caching even necessary?

View 2 Replies

Custom Server Controls :: Firefox (Firefox/3.6.13 ) Not Saving Cookies For Https In Logi Report(It's A Reporting Software0?

Feb 7, 2011

I am using Logi Reports for creating reports in my application. I am passing cookies from web application to these logi reports. Cookies were workign correctly before, but after the release of this version. Cookies are not working in these logi reports.

View 1 Replies

C# - Invalidating The HTTP Cache On Read Only Front Servers?

Mar 24, 2010

We have a CMS system and in the production mode a number of servers only have read-only access to the content (with a few exceptions) and the editors for the site work on the content on servers behind it (which are not available to the public).

We're caching the content quite a long time on the front servers, but sometimes we want the content the editors publish to be available for visitors instantly. What is best practice for invalidating the cache in those cases?

View 2 Replies

C# - Cache-Control HTTP Header Does Work Properly?

Mar 22, 2011

I am having issue with cache-control. I have one IIS website with multiple host headers. When you browse site number 1 then cache will be set for this site, when you open browser again and go to 2nd site you will see content from first site. How can I determine cache content based on the site user visits? Everything working fine when you have 1 site and host header related to SAME site.

//Set Cacheability
if (!Context.User.Identity.IsAuthenticated && _activeNode.CacheDuration > 0)
{
var eTag = GetETag(_activeNode);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.Public);

[Code]....

View 1 Replies

Architecture :: Distributed Caching / Keeping Cache In Sync Between Multiple Webservers Or Even Better Farm Cache Management To Another Server?

Feb 26, 2010

I've got a web application that runs of a state server. It looks like soon it may need to distributed and there will be two web servers behind a load balancer.

This works great for session state but my next challenge is Cache

My application leverages heavily of cache. I understand ASP.Net 4.0 will be offering more here but nothing much has been said about the how too.

There are two challenges that I face

1). Each webserver will have its own copy of cache whereas it would be more efficient to put this to a third server the same as session state is put to state server.

2). The real challenge is keeping cache in sync if a simple dataset derived from the database is changed my code dumps that cache item and reloads the cache. That's all well on one webserver but webserver number two wont know to drop that particular cache item and reload it. This could cause some unexpected problems in the application.

For scenario number 2 I could attempt to do some smart coding so server number two knows to dump the cache and reload it.

My guess is someone else has already been here before and there's probably a better implementation approach rather than writing extra code.

Does anyone know how I could achieve the goal of keeping Cache in sync between multiple webservers or even better farm Cache management to another server?

View 2 Replies

Visual Studio :: Web Developer Error "Unable To Start The Program 'http://localhost:1098/NTTC'?

Sep 29, 2010

Every time I click the start Debugging button on the toolbar, or select it from the menu, I get the message:

"Unable to start the program 'http://localhost:1098/NTTC'.

View 4 Replies

Firefox Asks For Username/password On Every HTTP Request With Digest Authentication Enabled On IIS6

Nov 12, 2010

I've recently enabled Digest Authentication on an intranet website/application I am creating for my company in ASP.NET.

The reason I have done so is because Windows Authentication seemed to only work for some users, and not for others. I could not figure out why nor do I know enough about IIS to try and trace the issue. After some trial and error, I found that digest authentication seemed to give me the behaviour that I wanted. That is: allow only users with a valid account on the domain to log in to the website with their credentials.

The problem now, is that Firefox (3+) seems to ask for the user to authenticate on every HTTP request sent to the server. This does not appear to occur in Internet Explorer (6+) or Chrome.

I've tried searching for solutions but I always arrive at dead-ends. I'll find a discussion about the issue, and every posted solution leads to a dead link...or it's on Experts Exchange and I don't have access to view to solution.

The issue appears to be related (from what I've read) to the way the different browsers send their authentication headers vs how IIS interprets them. I'm not sure what I can do to change this though? One of the solutions I had found mentioned writing an ISAPI filter to fix this, but of course the link to the finished filter was broken and I have no idea how to go about making one myself.

I've tried messing with the NTLM and other auth related strings in about:config to try and force Firefox to trust my server but that doesn't seem to work either.

From a few other sources I've read, it appears that everything should work if I switch back to Windows Authentication, but then I'm back at square one where the authentication would work only for some users and not others.

A solution for either problem would work for me, but I have very little information for the Windows Authentication issue. If someone could guide me through tracing the problem I'd gladly post more information for it as well.

[URL]

View 1 Replies

Web Forms :: Redirecting To A Page At Server / Error Is Http 500 Or Http 403

Dec 2, 2010

I am having problem redirecting error when error is http 500 or http 403 locally running this site there is no problem it gets redirected to my errorpage.aspx. But when deployed at server, it does not get .tried putting try and catch in page_load and in global.asax and I have set Application_Error to redirect to that page and also set <customErrors defaultRedirect to that page also

error
statusCode="500"
redirect="/errors/errorpage.aspx?error=500"
/>

View 9 Replies

How To Call Static File Handler From HTTP Handler In IIS7 And 4.0

Jan 24, 2011

I create custom HTTP handler for auto generating file and I want to tell IIS7 to serve current request like normal static file because I need to use IIS and web.config file to control compression setting and any other HTTP header of current requested file.I know. there is an internal class called StaticFileHandler in ASP.net. But I cannot access it. Or you have any other way to work like this.

View 1 Replies

SQL Server :: Making Selections On Installation Of SQL Server 2005 Developer Edition Onto Laptop?

Mar 20, 2011

I need help making selections on my installation of SQL Server 2005 Developer Edition onto my Laptop (the only computer in my house). I need to develop a couple of different databases and use them from my Visual Studio applications. Then I will upload the SQL databases and the Web Applications to GoDaddy for deployment to general public.My question is that installation is asking me questions I honestly don't know how to answer because I am using a different SQL this time around after reformatting my hard drive"
1. Do I use Default or Named Instance?2. Do I use the Built-In System account or a Domain User account?3. If answer 2 is Domain User then I am in trouble because I don't think I have a Domain, and I don't know what one is. Where would I find the user name, the password, and the domain?

View 1 Replies

Web Forms :: Dynamic Dropdownlist Work On Developer Server But In Production Server Not?

Sep 30, 2010

I create a dynamic dropdownlist to select several values, in developer server it's everything ok but in production server, when the postback happens lost the selected value.

View 4 Replies

SQL Server :: Web Developer Express 2010 Supports Server 2000?

Apr 1, 2011

Iam using web developer express 2010. I was wondering if the web developer 2010 express supports SQL Server 2000. I know i could connectSQL server 2005 and up but is it possible i could connect sql server 2000 to web developer 2010 express?

View 4 Replies

Custom Server Controls :: Refresh Contents Of A Server Control?

Sep 27, 2010

I'm developing a custom server control, which, on its RenderContents method, does some fancy work and writes content to the page via the HtmTextWriter passed to the method. My code is something like this:

[Code]....

Now, I'd like to have a method to refresh the contents of the control (let's say, go to the db again). I was thinking of calling the RenderContents method manually. The thing is that I don't know how to get the HtmlTextWriter object that my page uses so that I can pass it to the method. How would I achieve this? Would that even work, or is there a better way to do it?

View 2 Replies

How To Connect To Sql Server Developer Instead Of Sql Express

Oct 22, 2010

I have a ASP project that I have done before and it was working fine with SQL Serve Express 2005. After formatting my PC, I installed first VS 2008 Pro and then SQL Server Developer 2008 and I'm testing on my laptop but I can't connect to database. After reading a couple of articles I knew that I can't use mdf file because I'm using SQL Developer so it needs another procedure to follow such as changing the parameters in Web.Config

Web.Config
<connectionStrings>
<add name="Connection" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Store.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>

I tried a lot of soultion like start SQL browser Service to be on but still didn't work, also I tried to change the instance name in VS in options but also didn't work with me.

View 1 Replies

How To Extract The Contents Of The Pdf File And Show The Contents In Web Page

Feb 22, 2010

I have a pdf file, how can I extract the contents of the pdf file and show the contents in one of my web page

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved