Caching - ASPX And ASCX Files Not Updating When Saved?

Mar 4, 2011

At some point in the last month, two web application projects that I've been working on have stopped showing updates to aspx and ascx files until IIS is restarted, or the website they belong to is reset. This seems to be very random and I can't find any reason in the web.config sections that would cause this change. What are some good places to look for a source to this issue?Current caching parts of web.config: Removing the outputCacheProfile and restarting IIS made no difference.

<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="ClientResourceCache" location="None" enabled="true" duration="3600" varyByParam="*" varyByContentEncoding="gzip;deflate"/>
</outputCacheProfiles>
</outputCacheSettings>
</caching>

Commening out the staticConent and restarting also made no difference

<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00">
</clientCache>
</staticContent>
<caching>
<profiles>
<add extension=".gif" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".png" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".js" policy="DontCache" kernelCachePolicy="DontCache" duration="00:01:00" location="Any" />
<add extension=".css" policy="DontCache" kernelCachePolicy="DontCache" duration="00:01:00" location="Any" />
<add extension=".jpg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
<add extension=".jpeg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
</profiles>
</caching>

We've also tried adding .ascx and .aspx extensions with CacheUntilChange which made no difference. Other sites with these same settings aren't having the issue. Edit: Originally this state that there also was no update when the project was built, I haven't personally been able to confirm that issue but was told by another developer that was occurring.

View 2 Replies


Similar Messages:

Changes In Ascx / Aspx Files Will Reset Application?

Feb 16, 2011

Changes in ascx / aspx files - will it reset application? Sometimes on dev server they won't cause it whereas on live server I think it sometimes causes it. What is the rule?

View 3 Replies

Web Forms :: Handling Many Ascx Files On One Aspx Page?

Jan 13, 2010

I have one aspx page and more than ascx files, i have links on aspx page. if i click one of the link, it will upload the relevant ascx file on main aspx file.

View 1 Replies

C# - Accessing Source Code Generated From ASPX/ASCX Files?

Mar 3, 2010

You've probably noticed that when you debug an error which comes from an ASPX or ASCX file (literally, not from a corresponding code-behind file), ASP.NET displays an error page showing you the source file and the line on which the error occurs. The source file being displayed is automatically generated from parsing the page/control. The question is: how can I see this source file without purposely causing an exception?

I'd love to hear that there is some programmatic way (the complexity doesn't matter) to generate source files (preferrably, .cs) from a series of ASPX/ASCX files.

Example. Consider the following ASPX page (the code-behind file may even be absent):

<%@ Page Language="C#"%>
<%@ Register Assembly="AspxGen" Namespace="AspxGen" TagPrefix="ag" %>
<html>
<head><title>Some Title</title></head>
<body>

[Code]....

d:DevAspxGenAspxGenDefault.aspx(9,80): error CS0103: The name 'ThereIsNoSuchProperty' does not exist in the current context

This means, theoretically I can open the .CS files passed to the compiler (namely, App_Web_sqj3krv3.0.cs and App_Web_sqj3krv3.1.cs) and see what ASP.NET has generated from my ASPX markup. Trying to rephrase the previous question: how can I obtain this file from an arbitrary ASPX file (assuming that the file is correct and hence no info will be given on where to search)?

View 3 Replies

C# - Basic Refactoring Features Unavailable When Editing Code In An Aspx/ascx Files

Mar 13, 2010

I was just editing some C# code between <% %> tags in an .ascx file, and I noticed that the Refactor contextual menu is unavailable. And even if I manually add items from this menu to a custom toolbar, they are disabled when viewing aspx/ascx files.

I usually only have small snippets of C# code in my aspx/ascx files, but it would still be nice to be able to perform refactoring operations on any code that exists between <% %> tags. I feel like I'm going back to the dark ages when I have to use find/replace to change the name of a variable.

Questions

Is there a way to enable Visual Studio's refactoring features while viewing aspx/ascx files in Visual Studio?

Are there any Visual Studio plug-ins (preferably free) that offer this kind of functionality?

View 1 Replies

.net - Editing Aspx/ascx Files Randomly Disabled In Visual Studio 2010?

Aug 10, 2010

I'll be debugging a site in Visual Studio 2010 and editing an *.aspx or *.ascx file, and without warning, it will lock up so that I can't edit it. There's no message or anything, I just can't type or make any changes. The only way to start editing again is to stop debugging, close the editing window, and then find whatever file I was working on and reopen it. It's a huge pain in the you-know-what. My colleagues are experiencing the same thing, so it's apparently not something with my particular setup. What's the explanation, and how can we make it stop?

Note 1: I've reported this to Microsoft here. If you've experienced this as well, please go there and vote up the bug report.

Note 2: This is not VSS-related, at least in my case. We use VisualSVN, which doesn't use file-system-level locking to mark files as checked out.

View 9 Replies

When Updating Aspx.cs Files On A Virtual Dedicated Server Does It Require A Restart Of The Virtual Server For The Changes To Take Effect?

Jan 26, 2010

Quick question. When updating aspx.cs files on a virtual dedicated server does it require a restart of the virtual server for the changes to take effect?

View 5 Replies

C# - Compare Two Saved Files With The Filename Of Same Url?

Feb 4, 2011

I'm saving many text files. Filenames are urls. File has whole html of webpage from url. All text files are saved in one folder.

My problem:
I need to compare two files of same url, but how?

filenames of same webpage are the same, I cant save 2 files with the same name.add version of url is stupid because I cant add it into my webapplication.

View 1 Replies

Forms Data Controls :: GridView Caching / Updating With The Latest Results Of The SQL Query

Jun 17, 2010

I have 2 gridviews on a webpage that are fully editable. I also have a button, that when clicked, runs some SQL in codebehind to insert new rows into a data table. The gridview should then update with the latest results of the SQL query, which is does.

Then the user clicks on to the next page to do the next thing.The problem is, when they go back to the first page, they're still seeing the old, non-updated data. I've run the SQL from the page manually on the server, and the new data is there, but the GridView doesn't want to pull it.

View 2 Replies

Web Forms :: Uploaded Files Path Saved To SQL But Not Fully Returned On Webpage?

Nov 29, 2010

I am trying to put together a page where files uploaded by a specific users would be listed in a bulletedlist and I am stuck. Here's the rundown:

Users login, they upload files which are saved to disk in the user's own directory. All the file's information, including the path, is stored in a SQL database.

The user has also its own page, where there is a bulletedlist (set as a hyperlink) that gets the filename from the SQL. However, the path to the file is incomplete.

The file is saved to the site's directory structure: C:WebsitesSiteUploadsUserFile.pdf. However, the hyperlink shows[URL]

Can anyone point me to the right direction? Below is a snippet of the upload method and the retrieval to build the bulletedlist.

[Code]....

[Code]....

View 3 Replies

Web Forms :: Fetching Of Files Saved In Database Using Generic Handler Is Slow

Jul 8, 2013

I have used [URL]....

above method to save and retreve files from sql server database. I have uploaded around 50-60 images as jpg. But it taking so much time to get display online. but it's working faster when accessing from local database. 

There's the page where images are displaying [URL]....

Is the speed for images retreiving from sql database is  slower as compared to retrieving images from folder..?
 
.vb code:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
scroll = fillbannerpics()
End If
End Sub

[CODE]..

View 1 Replies

Caching Css And .js Files?

Dec 5, 2010

I want to use caching technique for .js,.css and images( to avoid round trips and to improve performance of page load) .So, on IIS 7 using Http Response Header, i set Content Expriation to 7 days.Now, on browser its caching which is avoiding round trips for static content ...which is good sign.Now, i modified one of the .js file and i deployed that .js file on server and due to caching my new code is not reflecting on client machines .So i tried lot of ways and here is what i tried after deployment of new .js file After deployment of new .js file

1) I manually delete all the browser cache(cookies,urls,forms,page content etc) on internet explorer

2) used ctrl + f5 to get refresh

3) again on IIS i went back Http Response Header section and set Content Expriation to never

4) stopped the website and restarted

5) on web.config file tried this only

<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>

6) Also tried to set this on .aspx page

<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
<BODY>

7) tried to set this on .aspx.cs file

<% Response.CacheControl = "no-cache" %>>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>

My target browser is IE.None of them worked,Finally i renamed my .js file to different file name and changed code to make use of that new .js file ..but no luck on this too .Because what i set intially for 7 days still my client machine remembers that.

How do i tell IIS server to refresh cached content code , when some thing got changde on .js or .cssfiles?

View 1 Replies

Visual Studio :: Why Changes Made To A .aspx Page In The Designer Are Not Saved By 2008

Aug 18, 2010

im developing an asp.net website application but suddenly all changes i make to the page in the visual studio designer are not being saved for some reason. Every thing i do in the code behind file is saved with out any problem, also if i edit the .aspx file but in sourceview, the changes are saved, but if i drag a control from the toolbox onto the page designer and set some properties and then save, nothing will have been saved when i close and re-open the page, all changes are lost.

View 1 Replies

Why Changes Made To A .aspx Page In The Designer Are Not Saved By Visual Studio 2008

Aug 18, 2010

im developing an asp.net website application but suddenly all changes i make to the page in the visual studio designer are not being saved for some reason. Every thing i do in the code behind file is saved with out any problem, also if i edit the .aspx file but in sourceview, the changes are saved, but if i drag a control from the toolbox onto the page designer and set some properties and then save, nothing will have been saved when i close and re-open the page, all changes are lost. Its confusing and i have no idea why.Edit: also this happens on only one aspx file. All the other files edits are saved.[URL]

View 2 Replies

Variable Declaration - Saved In Viewstate Of ASPX Page / Server Memory?

Jun 21, 2010

Consider this code:
Partial Public Class MyAspNETClass
Inherits System.Web.UI.Page
Protected Shared MyVariable As String

Is Myvariable a variable used local for each instance of the page ? Or that variable is "shared" for all users accessing my page? Is MyVariable saved in server memory, or is it saved on the viewstate of aspx page?

View 1 Replies

To Pass A Value From Ascx To Aspx?

Jan 12, 2010

I have a Menus user control and depending on which menu item the User clicks, the appropriate page is loaded by setting the hyperlink.NavigateUrl to the appropriate aspx page.I need to use the same page for 2 different menu items but I need to pass a value to the page so I know which data to load into it.Is there a way to pass the menu name or any other value from the usercontrol to the asp.net page?

View 12 Replies

Web Forms :: How To Get Output From .ascx Files

Mar 24, 2011

I have a web user control and I want to run it in a page.

but the problem is that I want to have just the out put of user control and not whole HTML page.

I want this because I load the page output in another page and if the first page generates a complete html file, in the second page I have 2 HTML,Head,Body ,..

View 12 Replies

Performance - Aspx Include Vs Ascx?

May 6, 2010

I have many aspx page includes in my web form. I want to convert them to user controls. Just wanted to confirm whether there is any performance gain in doing so? I have 50 pages in which the aspx page is included.

View 1 Replies

C# - ASCX And ASPX Transferring Data From One To The Other?

Mar 24, 2011

I have this page, shown below. In the ASCX file, the data is generated using a DataGrid in which a user searches for fields and it displays results based on input criteria. This is using a stored procedure and parameters to perform this search. It then returns the results, populates a datagrid, now my question is how would I go about in my ASPX page having my disk icon allow a user to download a CSV of the data that has been returned in the ASCX page. I obviously need to run a command to generate the CSV file from the database, which I have all the code for, but my question really is how do I know what the user has searched for, or what results were returned I guess best put.

View 3 Replies

C# - Validation When Converting .aspx To .ascx?

Mar 22, 2010

I'm currently converting a set of .aspx pages and the VB code behind them to .ascx and C#.

Basically the system I'm working with validates a shopping basket but with me changing the class the code inherits from I'm having issues working out what I should change it too.

I'm changing from System.Web.UI.Page to System.Web.UI.UserControl and am primarily having problems with the Validator.Add(v) element of the code below:

public override void Validate()
{
base.Validate();
if (Profile.ShoppingCart == null || Profile.ShoppingCart.Items.Count == 0)
{
CustomValidator v = new CustomValidator();
v.ErrorMessage = "You must have at least 1 course in your basket.";
v.IsValid = false;
Validator.Add(v);
}
}

View 1 Replies

Web Forms :: Caching Images / Files Without Using Iis?

Feb 1, 2011

i recently made a website and have uploaded it to a hosting server. After i had completed the website i noticed that i never added in any expiration onto the files/images plus that i dont know how to do this outside of IIS. As i dont have access to the IIS on the server i need a way of embeding code to set a short exportaion on the images and xml files cached. whats the best way of doing this?

View 5 Replies

C# - How To Implement Caching Of Static Files

Mar 15, 2011

I use a Masterpage (asp.net webforms) on my site and I woluld like to implement caching of some static files, like javascript, css etc.

I've tried adding the following to my page_load (in the masterpage) but when I use Fiddler the static files are still under "no-cache".

protected void Page_Load(object sender, EventArgs e)
{
// Set cache for 1 hour on all computers and servers.
// ... Proxies, browsers, and your server will cache it.
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetMaxAge(new TimeSpan(1, 0, 0));
}

What am i doing wrong here?

View 1 Replies

Web Forms :: Refer To Label In Aspx From Ascx?

Oct 17, 2010

refer to label in aspx from ascx? .......

View 1 Replies

Web Forms :: Cannot Pass The Value From .ascx To .aspx Page

Oct 24, 2010

I have created a UserControl [uscAuditTeam.ascx], there I have a Dictionary list and I added some values.

I want to pass the dictionary value to AuditTracking.aspx page. But it shows the null value.

[Code]....

View 4 Replies

C# - How To Generate String From View (.aspx Or .ascx)

Mar 25, 2011

How can I get the resolved (<%%> resolved) view (aspx or ascx) in a string format? I want to have .ascx file with some <%= ... %> code blocks and I want to be able to send it as part of e-mail in HTML format. How can I do this with MVC?

View 3 Replies







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