Disable OutputCache On Development System?

May 7, 2010

I use OutputCache in an ASP.net MVC application. As developing with an active OutputCache is not very pleasant I want to disable the OutputCache on the Development Systems (local machines and development server).

View 1 Replies


Similar Messages:

Web Development - How To Disable OutputCache For Only One UserControl On A Page

Feb 3, 2011

i am using OutputCache on a ASP.NET Page. I set it programmatically like this in my Page_Load:

Response.AddFileDependency(cachefilepath);
Response.Cache.SetExpires(DateTime.Now.AddHours(12));
Response.Cache.SetCacheability(HttpCacheability.Server);
Response.Cache.SetValidUntilExpires(true);
Response.Cache.SetSlidingExpiration(false);
Response.Cache.VaryByParams["*"] = true;

Now the Page will be cached and this works fine. But i have one UserControl on the Page which shouldn't be cached. Is it possbile to disable Caching for this UserControl although the whole Page is getting cached?

The reason is that the output of this UserControl has two states and so can be different for each client according to his actions...

View 1 Replies

System.Diagnostics.Process.Start Not Work With IIS, But On Development Server?

Jul 26, 2010

System.Diagnostics.Process.Start not work with IIS, but on ASP.NET Development Server

View 3 Replies

Web Forms :: Functionality Working In Development System But Not In Production Server

Feb 11, 2012

I have a functionality working ( functionality for making controls visible / true false ) on my development system having windows 2008.

But the same is not working onĀ  production server having windows 2003 on IE.

View 1 Replies

Visual Studio :: Scripts Working Fine On Development System But On Server Getting Errors?

Mar 4, 2010

I have a Web App (VS 2010 Beta 2, using VB) and it works flawlessly on the development system. When I publish it, everything works fine unless I use an update panel. If I use the update panel, and try to use something such as a dragpanel, I get the following error.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Thu, 4 Mar 2010 14:54:25 UTC

Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 404

Line: 784
Char: 13
Code: 0

View 7 Replies

Is It Wise To Mix MVC Development And Web Form Development In The Same Group Of Products?

Oct 20, 2010

We have a largely asp.net web form team (With some Oracle developers thrown in).

Question 1:

Is it a good idea to start using asp.net MVC which will mean redevelopment of a number of standard controls for not much benefit.

Question 2:

Is it a good idea to hire developers where there most recent skills are with asp.net MVC?

I doubt there is any benefit adopting MVC now, given the 100+ applications in this suite of products, and the maintenance/rework this will cause. Given this, is there any particular reason to hire MVC developers, as they won't be hitting the ground running, which is what I need now.

View 3 Replies

Web Forms :: What Is The Use Of OutputCache

Oct 5, 2010

<%@ OutputCache Location="None" VaryByParam="None" %>

Because when am using this line in http then the attachment is opening fine but not for https.But after removing this line then https is working fine.

View 6 Replies

C# - Using Outputcache Together With Urlrewriting

Mar 31, 2011

I've got a problem using outputcache together with urlrewriting. We've got an application that rewrites url (IE [URL]). Based on the URL (/about/) we figure out which content to show. Now we're trying to add outputcache to that page:

< %@ outputcache duration="600" location="Server" varybyparam="Custom" varybycustom="RawURL" %>

And in the Global.asax we override GetVaryByCustomString like below:

public override string GetVaryByCustomString(HttpContext context, string custom)
{
if (custom == "RawUrl")
{
return context.Request.RawUrl;
}
else
{
return string.Empty;
}
}

However, when we publish the page i'd like to invalidate the cache so that the editors see the change directly. But no matter what I try, I cannot seem to invalidate the cache. If I'd like to invalidate "/about/" I would like to do this: HttpResponse.RemoveOutputCacheItem("/about/"); That doesn't work unfortunately. The only thing that seems to work is: HttpResponse.RemoveOutputCacheItem("/page.aspx");

This clears the cache for all my pages, not just "/about/". Is there any way to invalidate the cache based on the url? Or should we provide a cache key or something per page to be able to invalidate the cache programmatically?

View 1 Replies

MVC :: OutputCache / RenderAction And SEO?

Jan 29, 2010

I read many posts about outputcaching element in asp .net MVC, but i have one question.My architecture is :1 master page, 1 page (especially news information), and a few other controls like LogOnUser / Fixed status bar etc...I want to have my news cached cause there are three query to entities, but i need too the title for SEO of my master page (title is included in a contentplaceholder in master).I tried to use renderaction outputcache but it is not possible to retrieve the title from the renderaction. Have you any idea about this problem ?Maybe it's preferable to use a general outputcache and use a substitute from dynamic data, but i don't know if it's a best practice or not.

View 1 Replies

Custom Development Versus CMS Development

Jul 16, 2010

I am planning to develop a social networking website for student of a particular university with following facilities.

Forum, Blog, Creating profile, creating groups , Adding Friends, managing groups, dating, chatting etc.

Now if I start developing it from scratch, this will take a lot of time..

I couldnt find any CMS which can in developing social networking website.

Additionally, I would like the website to have my own custom design. Also it should have support for AJAX, SEO and integrating third party applications.

View 3 Replies

Desktop Development Versus Web Development

Sep 13, 2010

How do you know what is better to use for writing new programs? We are now using Access 2007 frontend with an SQL backend and we are going to VB.Net, what would be our next logical step?

View 4 Replies

How To Invalidate The OutputCache In A Webform

May 3, 2010

i've got a website that uses OutputCache attribute to cache pages. Works great.

Now, I'm in the middle of R&D'ing scaling up this site to be in a web farm. Along with the usual suspects for webfarm pain ... I've noticed (pretty quickly/obviously) that the OutputCache from Server_A doesn't invalidate the OutputCache from Server_B .. if a try and invalidate a single server's OutputCache. This makes total sense -> how can S_A 'tell' S_B to invalidate when they are physically 2 seperate machines, etc?

So - what are our options?

Velocity? I understand this will move the caching to a different layer .. which means that the final result (output) will always be required to be determined .. as opposed to the OutputCache whic remembers the final output content (yes, varby gives different versions, etc.. which is totally fine). So even though the poco or business objects are all sync'd, there's still that last rendering effort required (even if it's tiny .. compared to the effort to generate/sync business objects).

View 2 Replies

Web Forms :: Set OutputCache Dynamicllly?

Feb 15, 2011

i have CMS that dynamically add user control to page. now i wanna use OutputCache for user control and set it from server side code. how i can do that?

View 1 Replies

MVC :: OutputCache Varyby IsAjaxRequest?

Jan 11, 2010

I've an action in a controller that returns different content if the request is Ajax or not:

[Code]....

So, from the view I can fill a <div> with the PartialView (RenderPartial), calling the same action (allowing javascript disabled clients). The problem is the cache, because when the request has cached as a normal request, if later sends the request as an Ajax request, the view is rendered very bad.

The question is: Is there any way to use OutputCache to allow to cache in different entries this two types of requests (Ajax and not Ajax).

View 4 Replies

AJAX :: ModalPopupExtender With OutputCache

Mar 1, 2011

I have a user control with OutputCache set to vary by any param (*). This user control has a LinkButton, which when clicked, causes a postback, and displays a ModalPopupExtender (the extender's TargetControlID is a dummy link). The user control is included on an aspx page.

The LinkButton is displaying the popup just fine. But if I open another browser tab/window/type, the LinkButton fails to generate the popup. I've tried (all separately):

moving the popup extender and its associated control to the main aspx page use OutputCache Location="None" on main page dynamically create the Popup extender and its associated control in Page_Init of both ascx and aspx

View 2 Replies

C# - Enable OutputCache With An IHttpHandler?

Apr 22, 2010

I have an IHttpHandler that I would like to hook into the OutputCache support so I can offload cached data to the IIS kernel. I know MVC must do this somehow, I found this in OutputCacheAttribute:

public override void OnResultExecuting(ResultExecutingContext filterContext) {
if (filterContext == null) {
throw new ArgumentNullException("filterContext");
}

[Code]....

View 1 Replies

MVC :: OutputCache'ing With Multiple Languages?

Mar 8, 2010

I'm looking into using the OutputCache-attribute for my ASP.NET MVC website. However, my website is using resources (*.res-files) to display two different languages (based on the user's settings in a cookie and/or database setting). Is there any way I can cache actions for my two languages separately?

Setting a "VaryByHeader" isn't gonna cut it since I have lots of visitors so every second visitor has probably another language set than the visitor before him. This would cause the cached action/page to always be updated since it's a different language.

View 5 Replies

OutputCache - Cache Only If No Params In GET?

Jan 23, 2011

What parameters to use in OutputCache if you want to Cache in case of no params on a page, in other cases not caching?

View 1 Replies

MVC :: Getting OutputCache When Using RenderAction And Partial View?

May 17, 2010

I am using MVC 2 and am having problems getting the OutputCache to work. My ASP.NET website has Several Views and a View Master Page. On my View Master Page I have a Menu on the left hand side displaying navigation links (implemented using JQuery).

I have implemented the Menu as a PartialView and I call this PartialView from my MasterPage using Html.RenderAction. This all works fine, my controller fetches the data from the database and the PartialView is populated.

The problem is I want to cache the Menu data since it's consistent on all pages. Yet when I add the OutputCache parameter to my Action it has no effect.

** Action **

[Code]....

** Partial View **

[Code]....

** Master Page **

[Code]....

View 11 Replies

Outputcache Doesn't Work With Routing?

Feb 4, 2010

I'm using routing from System.Web.Routing without MVC in a standard ASP.Net Web Application Project application. This is mostly done to get neater urls in the portal we are developing (instead of ~/default.aspx?contentid=123 we have ~/{contentsubject}. The portal is not authorized and all info is in the url so in a caching scenario we can cache complete pages.

When I tried to enable output caching I noticed that no caching was done. It seems that the outputcache page directive is completely ignored. Is this true or am I missing something? Can this be fixed?

I made a small test app (I uploaded it to [URL] that just contains a page, Webform1.aspx, that uses a master page and a user control. All three output the current date and time.

When I request http//localhost/OutputcacheTest/Webform1.aspx the 10 second caching works as expected, i.e. the shown time only updates every 10 seconds.

The app also defines a wildcard route that catches all requests and returns the same Webform1.aspx as a handler. So when requesting http//localhost/OutputcacheTest/myroute the same page is executed but now the caching doesn't work, i.e. the current time is shown on every request.

Note: When using the built-in development web server both scenarios work, only IIS seems to have this problem.

Does anyone have a a solution or work around for how to enable output caching in this scenario?

View 2 Replies

Outputcache - Is It Possible To Output Cache By Host Name

May 11, 2010

I've got a website that has a number of host headers. Depending on the host header, the results are different - both visually (theme'd) and data.

So lets imagine i have a website called 'Foo' - that returns search results (original, eh?).

Now, the same code runs both sites. It is physically the same server/website (using Host Headers) :-

[URL]

And the data is different for the same search result, based on the host name (ie. us results for [URL] results for [URL]

SO .. if i wish to use OutputCaching .. can this be handled / differ by the host name?

View 2 Replies

Outputcache - Dynamically Update Dependencies?

Jan 13, 2010

I have an ASP.NET application which requires output caching. I need to invalidate the cached items when the data returned from a web service changes, so a simple duration is not good enough.

I have been doing a bit of reading about cache dependencies and think I have the right idea. It looks like I will need to create a cache dependency to my web service.To associate the page output with this dependency I think I should use the following method:

Response.AddCacheItemDependency(cacheKey);

The thing I am struggling with is what I should add to the cache?

The dependency my page has is to a single value returned by the web service. My current thinking is that I should create a Custom Cache Dependency via subclassing CacheDependency, and store the current value in the cache. I can then use Response.AddCacheItemDependency to form the dependency.

I can then periodically check the value and for a NotifyDependencyChange in order to invalidate my cached HTTP response.The problem is, I need to ensure that the cache is flushed immediately, so a periodic check is not good enough. How can I ensure that my dependant object in the cache which represents the value returned by the web service is re-evaluated before the HTTP response is fetched from the cache?

View 2 Replies

.net - OutputCache For Page Which Contains Shopping Cart?

Apr 2, 2011

I have a master page where in one ContentPlaceHolder I put my shopping cart:

<asp:ContentPlaceHolder ID="continutMeniuContulMeu" runat="server">
asp:UpdatePanel runat="server" ID="updatePanelCos" UpdateMode="Conditional">
<ContentTemplate>
<user:ShoppingCart ID="shoppingCartControl" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:ContentPlaceHolder>

View 1 Replies

Caching - View The Contents Of The OutputCache?

Feb 26, 2010

Is there any way that I can list the pages which are currently stored in the OutputCache?

Just a list of paths would do, but if there's a way to get more information about each item (expiry etc), then all the better.

View 2 Replies

Can Use .NET MVC OutputCache While Varying View Content Based

Aug 9, 2010

I'm building an ASP.NET MVC 2 site where I'm using the OutputCache parameter heavily. However, I have a concern: using such caching may interfere with authentication.On all of my pages, I display whether the user is logged in or not. Furthermore, in some of my Views, I do filtering based on user role to determine whether or not to display some page content (for example, the Edit link on one of my pages is only shown to users in the roles of Moderator or Administrator)

View 2 Replies







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