Web Forms :: WebService JS Proxy Is Not Cached?
Mar 16, 2011
I have several JS proxies generated on the page through using code like:
scriptManager.Services.Add(new ServiceReference("~/Service.asmx"));
This code generates the following JS proxy on ASPX page where it is used:
<script src="../../Service.asmx/js" type="text/javascript"></script>
This file is not being cached in browser cache. I checked in firebug and in header it says:
Cache control: private
All other JS and CSS files are being cached with "Cache-Control: public,max-age=8640000". In web.config I have:
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="100.00:00:00" />
</staticContent>
How can I get JS Proxy files to cache?
View 1 Replies
Similar Messages:
Apr 11, 2010
I created a very simple webService using the VS2008 template. i am planning to use Ajax call for the webService.when i try to open my webservice in IE browser using following link to see the Javascript proxy, it return blank page.[URL]
View 3 Replies
Jul 16, 2010
I am using the SqlSiteMapProvider to build my Sitemap ... but I'm guessing that this question is valid for any type of site map.
There's a very specific instance where I need to rebuild the sitemap because the user completes a task and I need the Sitemap to rebuild to reflect that. I don't want to get rid of the natural caching that comes with the Sitemap stuff so I'm wondering if there's some way I can clear the cached map just when this certain task gets completed.
Is there some [Sitemap].clear() type method I can run for this?
View 1 Replies
Jan 11, 2011
I have a page that searches and displays records. Users enter a record number and then select the type of record to display from a dropdownlist control. They then edit some data on the page, and the app does some calculations based on the type of record that is selected from the drop down. How do i get to successfully pass the value from the dropdownlist to the method that does the calculation to ensure that the right formula is used? Here is the code that I currently have.
[Code]....
then the code behind to do the calculation looks like this...
[Code]....
After stepping through the code, i noticed that when it gets to the "foreach" block, the value selected by the ddlRecordType dropdownlist is always the default which is "select one" and not any of the other selections that might have been selected.How do I get this to work, so that it can maintain the value selected from the dropdown and used in the code behind?
[Code]....
View 3 Replies
Sep 8, 2010
I have started having problems with our asp.net webform applications running behind a proxy since the user base have upgraded to IE7. Some postbacks seem to drop out and at times it is difficult to make controls on a page raise an event. It appears to be intermittant and I have been told there are issues around using IE7 behind a proxy with post requests. Is this the case and what are the options? Rewite in MVC? Does the issue of post requests behind a proxy remain in IE8?
View 3 Replies
Jan 21, 2010
Is it possible to send an e-mail in my Asp.Net application through a Proxy server?
I tried using system.net configuration on my web.config but it seems that it accepts only URL proxies. Here's what I'm using:
[Code]....
I tried to disable the defaultProxy setting but I still couldn't send e-mails. I was able to get a remote web page content through my code using System.Net's WebProxy, WebResponse, WebRequest and NetworkCredential.
Unfortunately, SmtpClient does not provide a Proxy property. Is there any technology available to send e-mails through a proxy server? Currently I'm using .Net Framework 2.0 but if it's possible using 3.0, 3.5, Ajax Extensions or anything like that I'll start using it. But so far I couldn't find anything related to it anywhere.
If it's not possible then I'm gonna have to place a system requirement for a direct connection to the internet... I don't like it very much, but if its not possible....
View 2 Replies
Jan 11, 2011
Is that possible to get the proxy settigns right across several browsers, such as IE, firefox or safari from Asp.net? According to someone it is impossible because ASP.NET runs on the server, and therefore has very limited access to the client's settings.
But having said that, HttpBrowserCapabilities is able to retrieve plenty of information from a client machine, so i thought there is must a way to also retrieve the proxy settings on client's browser/s.
Is there a way to get the precise client's operating system, coz the HttpBrowserCapabilities.Platform property doesn't give me the precise client's operating system.
View 5 Replies
Apr 12, 2010
I tried the below code for getting clinent ip address. Request.UserHostAddress; or
Request.ServerVariables["REMOTE_ADDR"]; or
Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
If the request coming from IE it will work file, but in the case of Mozilla Firefox it shows the proxy ip address. I am getting the sam ip addres from different machine if the request from mozilla firefox.
View 3 Replies
Jun 29, 2012
I want to update my cached data , if there is any change in database. , if any change in database/tables happens then my cached data should be updated.
View 1 Replies
Mar 9, 2010
How to force Refresh( F5) conditaionally wehn the pages meet new design.
View 1 Replies
Sep 23, 2012
I have one issue on my localhost running website that is when i submit data from asp.net form . it don't clear the data permanentaly from the page history.like , i submit one record and after this one i double click on the textfields the previous values are shown ?
View 1 Replies
Oct 25, 2013
when i first run my applcation some time its showing the data from cache.i want to avoid it in first time .
i want to cache my all images/css/js file what is the efficient way to do it.
i have lot of images folder /js /css files.
View 1 Replies
Jan 12, 2010
I am trying to make a web request programmatically. When i submit the request through the browser it seems to work fine but when i programmatically submit the request it comes back with this error message "Unable to connect to the remote server"
Below is the code i am using to executing the command,
[Code]....
[Code]....
I assume the reason why i am getting the error message is because the proxy server has not been set programmatically. Can somebody tell me how i can get the proxy server and set it programmatically?
View 5 Replies
Nov 29, 2010
why all the resources in my page are being requested EVERY single time. E.g. my site.css returns the following headers (using fiddler):
HTTP/1.1 200 OK
Server: ASP.NET Development Server/9.0.0.0
Date: Mon, 29 Nov 2010 17:36:21 GMT
X-AspNet-Version: 2.0.50727
Content-Length: 9093
Cache-Control: public, max-age=2592000
Expires: Wed, 29 Dec 2010 17:36:21 GMT
Last-Modified: Mon, 08 Nov 2010 17:20:16 GMT
Content-Type: text/css
Connection: Close
But every time I hit refresh I see all the resources (css,js,images) getting re-requested. I have control over the headers returned for any and all of these resources, but I haven't figured it out yet.I have even debugged my ASP.NET app and the HttpModule is definitely being asked for the resources again.
EDIT:Ok, I removed must-revalidate, proxy-revalidate from the headers and that is getting me closer to where I want to be, now when I press back it still requests my css/js files when I press back.
View 2 Replies
Mar 29, 2011
I would like to cache a collection in the viewstate, but I wonder if there is a better way to add an item to this collection!
private List<MyClass> CachedItems
{
get { return (List<MyClass>)ViewState["CachedItems"]; }
set { ViewState["CachedItems"] = value; }
}
private void AddToCachedItems(MyClass item)
{
CachedItems = CachedItems.Concat(new[] { item }).ToList();
}
View 1 Replies
Apr 20, 2010
Is it possible to detect whether an ASP.NET Page is about to be cached and if so, how?The HttpCachePolicy object provides only set-methods. The VaryByParams name-value collection is useless if values other than "None" and "*" are set as it impossible to enumerate them and you can only access them by key
View 1 Replies
Jan 14, 2010
I am developing a website in ASP.NET and I am using various javascript frameworks/libraries. The different files belonging to these frameworks/libraries rarely changes thus there is no reason to refresh those files once they have been sent to the client browser (atleast not everytime a page is served).I see that the HttpContext object can be used somehow, that I can set the content expiration on the files/folders on the IIS, or maybe setup somekind of caching in the web.config file. 1. What is best practice/what approach should I take
View 2 Replies
Oct 22, 2010
Not really sure how to do this but i can cache the dictionary like this:
Cache.Insert("CacheName", Dictionary)
need some direction. the dictionary is two string values taken from a database. The user will input a string and i need to compare it against the values in the cached dictionary.
View 2 Replies
May 12, 2010
What is a proxy web service ?
View 1 Replies
May 8, 2010
I'm having an issue when using the Asp.Net Cache functionality. I add an object to the Cache then at another time I get that object from the Cache, modify one of it's properties then save the changes to the database.
But, the next time I get the object from Cache it contains the changed values. So, when I modify the object it modifies the version which is contained in cache even though I haven't updated it in the Cache specifically. Does anyone know how I can get an object from the Cache which doesn't reference the cached version?i.e.
Step 1:
Item item = new Item();
item.Title = "Test";
Cache.Insert("Test", item, null, DateTime.Now.AddHours(1), System.Web.Caching.Cache.NoSlidingExpiration);
Step 2:
Item item = (Item)Cache.Get("test");
item.Title = "Test 1";
Step 3:
Item item = (Item)Cache.Get("test");
if(item.Title == "Test 1"){
Response.Write("Object has been changed in the Cache.");
}
I realise that with the above example it would make sense that any changes to the item get reflected in cache but my situation is a bit more complicated and I definitely don't want this to happen.
View 2 Replies
Dec 17, 2010
I read few xml files from a location and cache them using Http context cache. Anytime the xml files changes i have to do a IISReset to view the latest changes.
I use this
System.Web.HttpContext.Current.Cache
I have to use the caching as i don't want to read all the xml files all the time. i read it once and caches them for a day. They get reset whenever apppool recyles or anyone manualy do a IISReset.
Is there anyway in asp.net to invalidate the cache if someones changes the xml file.
View 1 Replies
May 3, 2010
My web page is still displaying a previously cached versions of the page. I have this in the page_load event:
Response.Clear();
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1;
Response.CacheControl = "no-cache";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
I have this in the Page_Init:
protected void Page_Init(object Sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddDays(-1));
}
View 2 Replies
Apr 19, 2010
There are certain tables that get called often but updated rarely. One of these tables is Departments. So to save DB trips, I think it is ok to cache this table taking into consideration that the table has very small size. However, once you cached it an issue of keeping the table data fresh occurs. So what is the best way to determine that the table is dirty and therefore requires a reload and how that code should be invoked. I look for solution that will be scalable. So updating the cache on single right after inserting will not resolve the issue. If one machine inserted the record all other on the farm should get notified to reload the cache.
View 3 Replies
Dec 23, 2010
The Stylesheet in the App_Theme folder gets cached in the browser. What should be the approach? so that whenever there is a new deployment the browser should take the latest stylesheets and not the one cached in the browser.
This was happening for other css(which are not in theme folder) too, so used custom control as mentioned in the link
[URL]
How this could be done for the CSS in the Theme folder?
Edit: The theme name is mentioned in the web.config as mentioned below. so its not just the html link tag which I had solved by using the method mentioned in the link.
<pages styleSheetTheme="Default">
<controls>
</controls>
</pages>
View 3 Replies
Feb 21, 2011
I would like to ask if there is a way to prevent Firefox from caching scripts (.js files).
I have a project (ASP.Net Web App) with caching issue on firefox. When I first run the application (script is being cached on firefox) and modify the script and rerun the application, firefox is using the cached script instead of the updated one.
I'm using Firefox 3.6.13.
I already tried using HttpHeaders but it seems like firefox is ignoring my codes.
Here is my code:
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false);
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
HttpContext.Current.Response.Cache.SetNoStore();
I tried placing this code at global.asax > Application_BeginRequest and at MasterPage.aspx.cs > Page_Load, but it isn't working.
View 3 Replies