Web Forms :: Combining WebResource.axd And ScriptResource.axd Files?
Mar 25, 2010combining these type of files so that there are fewer http requests? Or for that matter any other tips on making them more efficient?
View 5 Repliescombining these type of files so that there are fewer http requests? Or for that matter any other tips on making them more efficient?
View 5 RepliesI built the asp.net website in release mode, set the debug flag to false in web.config, but still some of the webresource.axd and scriptresource.axd and javascript files are not getting cached. fiddler shows the status code "200" for these items instead of "304". what else I am missing to cache these files?
View 1 RepliesIn my web application, I have used AJAX Toolkit and my .net version is 3.5. When I run the application and save the page, so many ScriptResource.axd and WebResource.axd generate which makes the file size 200 to 300 KB more big. After doing the same procedures mentioned in the above link, it was working fine as all ScriptResource.axd and WebResource.axd file is removed.
But when I go from one page to another page using on click, then Object Expected Error comes and when I debug it,I found one ScriptResource.axd file containing query string like .axd?d=-bA.like this and Request. GetResponse cannot find the file and it gives 404 errror (File Not Found).
My website is looking in the wrong place for the scriptresource.axd and webresource.axd. How do I point it at the correct subfolder? Or how do I set it so that scriptresource.axd and webresource.axd are stored in the root of the website?All the ajax is done within subfolders. The web.config is at the root of the website.
View 2 RepliesI have a site that uses the Ajax Control Toolkit that's been running for several weeks and a week ago all of a sudden users are seeing script errors. I'm getting 'Sys' is undefined errors, as well as 'object required' and other JavaScript exceptions. The site does not function because of this.
I checked the page source and looked for the WebResource.axd and ScriptResource.axd's and tried navigating to them directly by putting the URL in the browser. I got a 404 error - file not found. If I do the same in our test environment, it comes back and asks me if I want to save or open the file. If I open it, I see the JavaScript that I am expecting (from the Ajax Control Toolkit).
In our test environment, with the same code, everything works fine. This tells me there was something on the production server that's preventing this from working. About 4 days before this started happening, we found that some user documentation (PDF) wasn't being protected by Forms Authentication (we need only legitmate users having access to it) so we added a wildcard mapping in IIS with "verify that file exists" was unchecked, knowing that if it were checked, we'd have this problem. I had one of the network admins check this setting after this started happenig and he said that it was still unchecked. I asked him to remove the wildcard mapping altogether and I still see the same behavior.
I am certain that this isn't a coding problem; again, as it went through the QA process in our test environment, everything works perfectly. And after the last deployment to production three weeks ago, everything was perfect as well. We added the wildcard mapping (which shouldn't have had an effect) and four days later the site breaks. I've asked our IT department if any changes were made to the server recently and nobody says they did.
What settings does anyone know of that might be causing this, either server or application? I checked the web.config and all the sections are there that deal with the ScriptResource HttpHandler and HttpModules. In fact, the web.configs are identical between the production and test environment, so I know it hasn't been tampered with.
Is there any way to change the path of both ScriptResource.axd and WebResource.axd to a relative path (remove the leading the "/")?
View 4 RepliesI'm having a problem trying to combine the ScriptResource.axd files automatically generated by Ajax using ScriptManager's CompositeScript property....on some pages there's 15 of these files, so I'd like to reduce that number to reduce the HTTP requests. I tried following the post here - [URL] - but am getting errors when trying to do what it instructs, such as:
Microsoft JScript runtime error: 'Sys' is undefined Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load. Below is the code I am using for the ScriptManager. These errors go away if I do not use CompositeScript. Has anyone else attempted to combine these files? Am I doing something wrong in this code?
[Code]....
We are working on an ASP.NET CMS project using jQuery as the basis for our client side scripting. The jquery-1.2.6.js file is the only script file that is always included. Other script files are currently included depending on what components the CMS editor is using on a page or page template.A lot of the script combiners produce a static script. If we took that approach we would have to add all possible script files in just in case they were needed. We are not currently using any of the ASP.NET Ajax extensions so have not looked at what that may give us.
View 2 RepliesFor the sake of client-side performance, it's best to minimize the number HTTP requests to load a page. Is it possible to combine the contents of all Javascript files stored in the "Style Library" such that the client only has to make one request instead traditionally, a request for each Javascript file?
View 1 RepliesWhen I have a string in a textbox starting with a < sign, it causes server error 500 during post back. Is this a known issue?
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Line: 604
Char: 13
Code: 0
URI: http://.../ScriptResource.axd?d=.....
Is it possible to change the referral to the WebResource.axd from:
<script src="/WebResource.axd
to
<script src="http://mysite/WebResource.axd
?
I migrated an ASP.NET 3.0 application from one web server to another. The only difference that I know of between these webservers are, one is running II6 and the new one (the one this app was moved to) is running IIS7. The application was running fine in it's old environment, no code changes were made, but now it doesn't seem to like the web.config. I get the following error:
[Code]....
i hv added a treeview control on the .aspx page, when i try to browse it from web server, the image is showing as broken image, where the image link is showing like this [URL]
View 1 RepliesI have a databound TreeView on an aspx content page. I selected the News ImageSet collection for this control. When I render the control locally, the images appear fine. Deployed on the same machine (yes I know I probably shouldn't develop on the server, but it's my server) the images are all broken. I removed the ImageSet attribute and it still rendered with broken links.
The environment is Windows XP SP 3, ASP.NET 4.0. Any reason why the the WebResource.axd would suddenly break outside of the Contoso world?
[Code]....The WebResource.axd handler must be registered in the configuration to process this request?
View 4 RepliesI have links inside an UpdatePanel, that when clicked, need to add a history point via the ScriptManager. As far as I know, the only way to add a history point is server side, which requires an OnClick event to execute the code, limiting my links to be either Buttons, LinkButtons, or ImageButtons. The problem is that using any one of these does not allow my users to right-click on the link and select "Open in new window/tab," which is very important. Using a HyperLink would allow the user to right click and open the page in a new window, but since it is rendered as a normal <a href /> has no way that I know of to reach a server side event handler. how to add a history point while still allowing the user to right click on a link and open the content in a new window?
View 1 RepliesI'm trying to combine two charts ( Column & Spline ) using MS Charts 3.5. When i run the page the second series of the Spline chart is not visble/working.
Here is the code
string connectionString2 = "server='myserver'; user id='testuser'; password= est'; database='DBs'";
System.Data.SqlClient.SqlConnection sqlConnection2 = new System.Data.SqlClient.SqlConnection(connectionString2);
string queryString2 = "SELECT TOP 10 NAME, VOLUME, CLOSE FROM Com WHERE NAME IN ('LEAD')";
[Code].....
my project contain two config files. first config file in root directory, second config file in child directory
part of .config in root directory:
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
</httpHandlers>
part of .config in child directory:
<httpHandlers>
<remove verb="*" path="*.asmx" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> [code]....
When 'ScriptResource' in root config file, all's well. But when 'ScriptResource' in child .config file. I have error "Error: 'Sys' is undefined".
I have ScriptResource.axd file which is use and whithout compression. also I have JavaScript files that are not compressed too.
this is making website loads reallu slow....20 seconds....:
What can I do to reduce this and compress everything?
I have a Customer Table that has many fields - two of which are FirstName and LastName.
I have a TyapedDataSet that is is linked to the CustomerTable
I have BusinessLogic layer that looks at the Typed DataSet
On my page I have an objectdatasource back to the BusinessLogicLayer and a dropdownlist
Currently, the dropdownlist displays the LastName and has a value set to CustomerID.
I want the display to be LastName+', '+FirstName instead of LastName
My question is where do I create the field called FullName - Do I open the MS SQL table and add a field called FullName -- but I think if I do this then when I add data I have to duplicate FirstName and LastName info. Do I add a field (column) to the dataset?
Scenario: I have a complex Asp.net app serving various units through programmatically constructed control collections in HttpModules. Some of these controls use Asp.NET Ajax.
Across many different units, ScriptResource.axd averages a transfer size of ~27k.
I have a ceiling that only allows ~3k for it.
There definitely isn't time to retrofit all the Ajax functionality with jQuery or hand-rolled js functions or whatnot. We already have the .axd coming over with gzip encoding (uncompressed it's more like 97k). It's often cached, but that doesn't matter: I have to hit a hard, low, externally-imposed limit on first-request total transfer size... markup, scripts, images & all summed up a-la firebug. I've been avoiding the .axds, but there really isn't anywhere else to shave bytes, and I have 24k to go.
Possible approaches: I'm not yet using Asp.NET 3.5 SP1's compositescript functionality, but I figure that would only save on request/response headers, and I'm not even sure headers count against me.
I don't have any other ideas other than something radical, like creating a response filter that uses reflection & some dictionaries to figure out what js functions are actually needed, and only emit those. I could cache the resulting list for each unit, since I have a low response time ceiling as well, and I don't think the .axds change from one request to another. Is this feasible? Any other ideas? ...what if I buy beer for the hero with a solution?
I have setup my website (ASP.NET 3.5) with AJAX, running with no problems at all.
When I test my website locally and on my main top level domain, there are no problems.
When I'm on a subdomain page, AJAX client side framework fails to load. I observed the problem deeply and found that whenever I'm on a subdomain page, WebResource.axd DOES load but ScriptResource.axd DOESN'T load (returns 404 Not Found error). I think I should modify some entries at web.config file, but I have no idea on what to do?
Google Page Speed is saying we should combine external JavaScript. Fair enough.
I know that the way to do this is to use a CompositeScript tag inside asp:ScriptManager.
<asp:ScriptManager runat="server">
<CompositeScript>
<Scripts>
<asp:ScriptReference Name="AjaxControlToolkit.Common.Common.js" Assembly="AjaxControlToolkit" />
<asp:ScriptReference Name="AjaxControlToolkit.Calendar.CalendarBehavior.js" Assembly="AjaxControlToolkit" />
< ... />
</Scripts>
</CompositeScript>
</asp:ScriptManager>
What I don't know is which script references to add. In my page I have lots of <script src="/ScriptResource.axd?d=big-string-here" type="text/javascript"></script>
How do I discover what <asp:ScriptReference Name="x" Assembly="Y" /> tags I should add to the CompositeScript tag? There's a usercontrol out there with this specific aim, and we even have already used it before, but I can't find it again o Google.
EDIT
The usercontrol I was looking for is ScriptReferenceProfiler. How to use it.
In my website i have used ajax. I have made a subdomain. All the files are in the subdomain. But no ajax controls are working. When viewing source,
<script src="/subdomain/ScriptResource.axd?d=pIGD9Q63Ayfy9TvkTDZXYa7KKGxArRY0b7cvnO2ePCz6Y3RvV0egKLh8SptZV4uh0uHt-WTAswFxYQAekdl0wytwvJVYp1G-DPHL4quv6Vc1&t=633528638860312500"
type="text/javascript"></script> is coming.
In web.config i have written
[Code]....
I am using JQuery for all of my client side validation and Asp.net validator controls for all of my server side validation. I am using an errorlabelcontainer to store the client side validations in a summary at the top of the page, which is the requirement. All works well. My problem is, I want to display the server side asp.net errors in the same errorlabelcontainer OR display all of the client side errors in the validation summary. Either way, Both errors need to be in the same place/div. Any ideas on how to do this? I thought of maybe using the asp.net validation summary as the errorcontainer in JQuery, but I cannot find the summary. This is what I have right now.
View 1 Replies