Scaling And Serving Images With .NET 3.5?
Oct 27, 2010
I am working on a web application where images has to be scaled dynamically and served to the client as fast as possible (with low overhead). I need to create something that scales and compresses high-quality PNGs to medium quality JPEGs.Now, there are multiple ways of doing this and I am slightly confused which method provides the best solution for the application to be as fast as possible - and I was hoping you guys could guide me in the right direction.This application will run on the .NET 3.5-platform and I am looking for fresh ways of doing this. Googling has given me some clues but most of the articles I found were VERY old (2000-2005 or so).The client app is written in ASP.NET MVC, while the backend app is written in Web Forms. The images are located in a directory in the Web Forms application, but I guess that dosen't say the image handler must be written in Web forms.
View 3 Replies
Similar Messages:
Oct 19, 2010
I want to use an ORM, and have been looking at EF 4. Is this platform scalable. I see a lot of stuff on the web, but everything looks very biased in one way or the other. Anyone know of benchmarks or non-subjective information.
On that point, does EF prevent SQL injection or XSS. I know that it used parametrized queries, but is that enough?
View 1 Replies
May 7, 2015
I am using asp chart (framework 4.0) in one of the web page.
Chart displays x and y points from database.I want to fix the scaling of only Y-axis i.e., between 1 to -1as y axis point will lie within 1 to -1, as below:
10.750.500.250 ------------------------------------------------0.25-0.50-0.75-1
C# code:
Chart1.Visible = true;
string id = Request.QueryString[1].ToString();
string query = "SELECT x,y from Table where ID= '" + id + "' and DeletionDate is null";
DataTable dt = GetData(query);
string[] x = new string[dt.Rows.Count];
double[] y = new double[dt.Rows.Count];
[Code].....
View 1 Replies
Sep 14, 2010
programming option?Our Web application could have 60000 database requests/second or more in future.Which is better: MS-SQL or MySQL or other?Which is better: Asp.net, PHP, JSP or other?What kind of webhosting is reliable for auto-scaling?Any good webhosters or hosting plans?
View 1 Replies
Mar 7, 2011
We have a large site with thousands of static html files. Some of them are ISO-8859-1, others are UTF-8 (with and without byte order marks).
The web.config file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
</system.web>
</configuration>
If I change the fileEncoding to "ISO-8859-1" it works for both ISO-8859-1 and UTF-8 if there is a byte order mark. We are trying to avoid manually checking and adding byte order marks to files that do not have them. Is there any way to accomplish this?
The files have the charset meta tag. Can we make the server read that to determine the file encoding?
EDIT
If I remove the wildcard application mapping to aspnet_isapi.dll the files are served correctly. Is there any way to have the wildcard match everything except for .html?
View 1 Replies
Apr 13, 2010
I'm trying to serve a pdf file from a database in ASP.NET using an Http Handler, but every time I go to the page I get an error
XML Parsing Error: no element found
Location: https://ucc489/rc/NoteFileHandler.ashx?noteId=1,msdsId=3
Line Number 1, Column 1:
public class NoteFileHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
[code]...
View 1 Replies
Feb 25, 2011
I am hosting the ASP.Net runtime in my exe but I find that if I try to access htm or xml files from the browser, it gives a 404.
I can access aspx, asmx and other asp.net related files just fine.
Is there any configuration that I need to do to server other file extensions and if so, what?
View 1 Replies
Dec 17, 2010
If I host video or any other media content on Amazon S3, how can I use ASP.net Membership to enforce access rights?
View 1 Replies
Jul 23, 2010
Like iPhone Safari Browser or Firefox (Ctrl + Scrolling), I need intelligent scaling where not only Divs but also font-size and images are scaled based on the viewable area of the screen.
I need to implement this in ASP.Net.
View 1 Replies
Apr 17, 2010
I would like to lock down a web server that is only serving MVC content. What is the best way minimize my server's attack surface?
View 2 Replies
Feb 4, 2010
got a Asset Management tool which stores (in a folder("node")) an index.htm and a bunch of other asset files such as .js, .css, flv, etcHere's the problem...if I access the index.htm I get ti via it's nodeID http://site/NODEGUID/index.htm , and all compound files try and download via that GUID as well so essientially I just get index.htm content served into each request file, thus giving me an epic fail :)Is there some way in asp.net to intercept that request so I can do a lookup on the DAM and get the proper file reference and send that down instead?
View 3 Replies
Feb 17, 2011
I am creating a small testharness which will create load on the website with multiple threads. All I doing is
[Code]....
But this keeps timing out after few request. I have looked into the IIS worker process requests and I can see the requests being in there in the state of sendresponce. If I request the same url from my browser the reponce is there. Am I doing something wrong here?
View 4 Replies
Dec 28, 2010
I am new to IIS and asp and i am having a problem. I am creating a asp.net website in physical folder wwwrootSharePage and virtual directory SharePage When i visit the site on local host or using my ip address or through dyndns proxy on my own computer , the page is served fine, But when any one else from any other computer access my website it takes a long time in loading and finally his browser throws an error (may be page not found error,not sure, see for yourself). I have even changed Authentication mode to none and tried with firewalls closed , still page is not served.
You can have a look here
[URL]
(hosted on my home computer so can be unavailable at times when i have switched off my computer)
or try with my ip address
updated http://117.205.103.192/SharePage/ (can change ,i have a dynamic ip address)
Info:
IIS version 7.5
OS : Windows 7
.Net 4 (even in IIS)
View 3 Replies
Feb 22, 2011
The app_offline.htm file that ASP.NET serves returns the http status 503. This is the correct behavior for most situations. However, in the scenario where a specific URL is requested (e.g. [URL]), I'd like to change the returned http status to 200, while still returning http status 503 in all other situations. Is this possible?
The reason why I want to do this is whenever we do scheduled maintenance on our website, we use the app_offline.htm file, but we don't want our uptime monitoring service [URL] to report downtime during our scheduled maintenance.
I assume this would have to be at the IIS level because the app_offline.htm gets served very early on in the request processing cycle.
View 6 Replies
Feb 24, 2011
I have a domain which is receiving quite a few hits per day and have been asked if I can serve the static content from a subdomain. As the site is quite extensive and already written, I was wondering if there is any way I can use URL rewriting to change:
www.example.com/image.gif
to
static.example.com/image.gif
I have a solution which works using 301 redirects but from what I understand, this is counter productive as 2 requests will have to be made per image. I don't really want to go through all the aspx pages and css to hard code the new url as it will cause problems further down the line - some parts of the site are still being developed and static content could change at any time. I tried using rewrite (as opposed to redirect) to change the url but it came out something like:
http://www.example.com/http://static.example.com/image.gif
How would you achieve this? I have full access to dns and the server (win 2008r2 / IIS 7.5) so can make any changes if url rewriting is not the answer.
View 1 Replies
Aug 23, 2010
I'm pulling back an image that is stored in a column in a SQL server database.I need to serve this up on an aspx page.
View 4 Replies
Feb 27, 2011
Currently in my webpage i load images to the ListView object as follows...
<ContentTemplate>
<asp:ListView ID="ListView1" runat="server">
<layouttemplate>
[code]...
View 2 Replies
May 25, 2010
My WebApp is part CMS, and when I serve up an HTML page to the user it typically contains relative paths in a.href and img.src attributes. I currently have them accessed by urls like: ~/get-data.aspx/instance/user/page.html -- where instance indicates the particular instance for the report and "user/page.html" is a path created by an external application that generates the content. This works pretty reliably with code in the application's BeginRequest method that translates the text after ".aspx" into a query string, then uses Context.RewritePath(). So far so good, but I've just tripped over something that took me by surprise: it appears that if any of the query string ("instance/user/page.html") happens to contain a plus sign ("+") the BeginRequest method is never called, and a 404 is immediately returned to the user.
So my question is two-fold:
Am I correct in my belief that a "+" would cause the 404, and if so are there other things that could cause similar problems? Is there a way around that problem (perhaps a different method than BeginRequest)? Is there a better way to preserve relative URL paths for generated content than what I'm using? I'd rather not require site admins to install a 3rd party rewrite tool if I can help it.
View 1 Replies
Dec 10, 2010
I'm busy writing a handler to serve various documents for download or presentation in web forms pages. The documents range from various image formats, to PDF, to MS Office documents, to generic binaries. My basic draft of the download process is as below:
[code]....
However, I have some misgivings about lumping all documents together as application/octet-stream, and I would prefer, if feasible, to use a more specific content type per document type. I have a DB table for document types where I could store this. Am I going in the right direction, and if so, where can I find a suitable starting list of content types for document types?
View 1 Replies
Oct 5, 2010
I have a project that will be assigned to me soon whereby I need to develop a survey which needs to support 40,000 users approximately. Now we are thinking of doing a staged approach so not all users are on the server at any one point of time. Probably splitting it so we can serve at least a few thousand of users...
I dont have much experience of how I can ensure to serve those levels of users on a server and how to manage this so I am after some advice?
From my understanding I need to do some stress testing on a server and obviously I need some figures i.e. average size of request, average size of response and content of response.
- Do I have to build the database and add records in to see what size is a typical survey row?
- Do I have to build the survey in .NET i.e. by adding controls etc and seeing what size is the page?
- The survey shouldnt be too instensive processing wise, it will be adding information into a backend sql database...
View 4 Replies
Oct 7, 2010
I have a scenario where...
1.) Have created a div with a dropdown list and ok, cancel button
2.) On document ready - registering div created on step 1 into a jQuery dialog
3.) on a javascript button click - I am opening this dialog box.
4.) Now, the problem is - the jQuery dialogbox which I have created, needs to be used by other button clicks as well on same page. Now, my div's (which is a dialog at runtime using jQuery) ok button click is already engaged with a javascript function (button1 click) and I can not associate other button's click events with it - thus stuck up here and have no clues or hit to resolve this.
View 2 Replies
Oct 28, 2010
What ASP.NET page lifecycle event can I write code in to determine the size of the viewstate that being sent out? Also, is it possible to determine the size without parsing through the rendered HTML (like a property on the page object) or is parsing the only way?
What I'd like to do is log the sizes, specifically if they cross a certain threshold.
View 3 Replies
Mar 31, 2010
I've been trying to get image caching working for the last 8 hours and I keep the same problem time and time again, I'm trying to cache Images at the moment and then when thats succesful, apply this to cache my js and css files. I have at the moment Sql Dependancy caching working on my dynamic pages but the page still takes to long due to images not caching.
What I have tried is going to IIS7 Management and adding HTTP Response Header for the images folder and setting various things for the cache control.i dont care how long it caches it on the client or on the proxy servers i just would like it to check when the file was modified and compare it with the one in the client or proxy cache and if they are different then fetch the new image which has been ftp up. i could solve this by changing the image name but the thing is the image name is generated when they are ftp'd to the site by an application and the name is a direct reference to the product so i cant change the name each time, as it would mean making a lot of otherpages accross the board.
so What i would like, is to set and expiry date of lets say 32 days or more on the images and then check to see if they have changed by date modified or some other way of checking(Etags maybe) I'm not sure, if they have changed on the server then redownload and recache them, I tried using post-check and pre-check together but that just permantly cached them, so when i change the image the only way it would display the new image is to just hit F5.
In Brief, how can i Cache images, on the client machine/ proxy cache and recache them when the modified date of the file has changed.
View 4 Replies
Mar 9, 2010
I want to show on one of my pages a slideshow type page. Basically I want it to show a selection of images from a folder and have the images scroll from right to left.
View 8 Replies
Jul 25, 2010
I want to write one program by visual studio 2008 (C# and ASP) that has web application and windows application.
I want to get clients images in web app(upload) and store them in DB (mysql) then send these images to windows app via web service (so i new web service, not web site). But i have 2 problems:
I have 2 ways to store images in mysql, first i should have BLOB field in DB -that it takes more space-, second i should save just name of each image in DB(so have image in one folder) -in this way i don't know how get image from clients and store them in that folder-. which one? Or what other? How (code) can i transfer image via web service(Byte[] or? ).
View 2 Replies