MVC :: Handling Large Number Of Images Downloaded From Server?
Feb 17, 2011Handling large number of images downloaded from server
View 4 RepliesHandling large number of images downloaded from server
View 4 RepliesHow to resize large number of images in a folder in c# windows application. I am using following code to resize images of my folders. If images are less than 1600 ( in number) then no problem but if images are more than 1600 then i am getting error. My code is given below:-
public static Image ResizeImage(string file, int width, int height, bool onlyResizeIfWider) {
using (Image image = Image.FromFile(file)) {
// Prevent using images internal thumbnail
image.RotateFlip(RotateFlipType.Rotate180FlipNone);
image.RotateFlip(RotateFlipType.Rotate180FlipNone);
[Code] ....
Thumbnail creation in ASP.Net: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI
i want datalist to show only 6-8items ,as these datalist is connected to datasource which has more than 20 items..
like in facebook,we have lots of friends but in friend box only 6 friends is shown and when we click that we go to next page which display all list of friends...
I have a database of about 50 tables and some of the tables have more than 9999999 records. When I try to fetch some data on some SQL statements, sometimes it takes more then 5 minutes. I would like to know if there is good searching approach to get data from that much records in many tables.
View 6 RepliesMy problem is I have handled timeout error in client of WCF error in such a way that if data is large to fetch, after 10 minutes(as all timeout in web config of client are set to 10 minutes) it should show me customize message 'Too many records to fetch, please modify criteria'. It works on my local system as per expected but if I put it in test server(Service is in one test server and Client application in one test server) it gives me following runtime error.
The message could not be processed. This is most likely because the action [URL] is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding. The thing is if I set SendTimeout in test server client config less than 20 seconds then it works fine but we should not be limited upto 20 seconds as it is awfully short.
I am working on a website in which more than a thousand users can login at a time and there may be more than 50000 total users. I am worried about the performance of the application in case of concurrent access.
what is the best way to manage that, so that my application runs without any performance issues.
I'm running a ASP.NET website on my development box (.NET 2.0 on Vista/IIS7).
The Session_Start method in global.asax.cs logs every call to a file (log4net).
The Session_End method also logs every call.
I'm using InProc session state, and set the session timeout to 5 mins (to avoid waiting for 20 mins).
I hit the website, wait for 5 minutes unit I see the Session_End logging. Then I F5 the website. The browsers still has the session cookie and sends it to the server. Session_Start is called and a new session is created using the same session id (btw: I need this to be the same session id, because it is used to store data in database).
Result:
Every time I hit F5 on a previously ended session, the Session_Start method is called.
When I open a different browser, the Session_Start method is called just once. Then after 5 minutes the Session_End each F5 causes the Session_Start method to execute.
Update:
After the Session timeout, all subsequent requests have a session start & session end. So in the end my question is: why are the sessions on these subsequent request closed immediatly?
[code]....
I'm developing a CMS of sorts, and I want to give my users the possibility of customizing the display. More precisely, I want to give them the ability to choose to display or hide the left column, the right column and/or the top div. The middle column cannot be hidden since this is where the actual content will show, whereas the other columns are for navigation or side menus.
I've been looking for a way to make this as smart and flexible as possible. For now I'm using a MasterPage, but that seems to be too constraining. For instance, with MasterPage you need to add a ContentPlaceHolder control in every of your ASPX pages.
What are the best practices in this area? I guess a simpler way of saying this would be "I want to create a template system over which I have complete control".
internet Explorer cannot display the webpage when trying to upload a large image.I have a webform for inserting images. There are four FileUpload controls on the page, allowing the user to upload 4 images at the same time. It inserts them directly into database, in Image field, but before that I am resizing them to 200px x 160 px.
The problem I am having is as follows: If I try to upload larger images (over 2MB), one at the time, everything goes fine. But if I try to upload 2 or more larger images at the same time, I get the message: Internet Explorer cannot display the webpage, and there is a button below: Diagnose Connection Problems.
Can you please point me to what could be an issue? It obviously has something to do with the image size, but I have no idea what.
I want to insert a large amount( approx 7000 records) of data into a table, My scenarios is that i need to check whether the record already exists then it will not insert it. Currently i am using a stored procedure for this which gets called for each record.
IF EXISTS(SELECT 'True' FROM MYTABLE WHERE ID = @ID)
BEGIN
--This means it exists, return it to ASP and tell us
SELECT 'This record already exists!'
END
ELSE
BEGIN
--This means the record isn't in there already, let's go ahead and add it
SELECT 'Record Added'
IF EXISTS(SELECT 'True' FROM [Aadil].[dbo].[SharePointSitesData] WHERE ID <> @ID)
Working on a heavy ajax based site with over 100 methods from all the ajax calls inside each of each controller all with basically the same code.Was thinking of changing them to a big case statement for readability which would keep the code a bit more dry and make it easier to read.What I am wondering is: Will there be a performance hit and is there a better way to deal with it?
View 4 RepliesI have one application and there are 1500 users of that application.When 200 users logged in application that time login page and other pages of applications are not opend. I want to manage 1000 of users at a time.
View 1 RepliesI have 65 columns in the grid, if the columns are reduced to 20 then the speed when accessing from client is more or less similar to that accessing from web browser. Does it mean that all this performance issue is due to the data only ???
View 1 RepliesI wanted to gather some methods on how to add a variable number of fields to my form (with Add New and Remove buttons). I know that ASP.NET MVC has easy methods, but I'm unable to find any easy methods for WebForms.
Here's what I've used so far:
Adding a new UserControl to a PlaceHolder on PostBack (I've had to fiddle with ViewState to make this work correctly, huge pain) Adding a new row to a grid and having a template field in a grid (works decently but kind of awkward) Actually having several fields on the form by default and hiding/showing them dynamically (fairly easy but you have a set number of fields.)
Is there anyway of handling images from database to jquery image swapper or any other type of image swapper. the images should be populated depending on the number of images generated from the databse. I can get all the images from the databse but I cant find a way to show those images on the jquery image swapper. I can display all the images by using datalist but with data list i cant use the jquery image swapper.
protected void showDetails(int makeID)
{
conn.Open();
SqlCommand cmd = new SqlCommand("Select Price,image,make from productDetail Where (makeID LIKE @makeID)" , conn);
SqlParameter param = new SqlParameter();
param.ParameterName = "@makeID";
[Code]....
I have an ASP.net VB Web app I'm working on that has a requirement to provide a list of all our component part numbers to our engineers for selection into a custom Bill of Materials for reworking of an assembly. The list of part numbers is currently generated from a stored proc in our MRP systems/SQL database. The number of records being generated is slightly over 39K part numbers.
Although the SP only takes a few seconds to generate the data the web page is taking a couple of minutes to load, primarily because of the time to fill the control presenting the records to the engineers. I've bound the data to a combobox control to the engineer. They want to be able to type the first few characters of the part number if they know it and have the list filtered or be able to just scroll the data to find the part they are looking for.
I've read elsewhere that they may be a way to only populate a certain quantity of records rather than all 39K then filter based on the users actions. Unfortunately the discussions about doing this didn't provide any examples, references, etc.
My questions are these...
Is there a better way to handle this quantity of records than a stored proc and combobox? A
ny examples of a method to populate a certain number of records then filter based on user action?
I am having nearly more than 80 thousand records and i need to export in .csv format.
I need to export to woksheet.
I need to export nearly 65 thousands of records in one sheet,
When it reached the limit, it should exported in the next sheet.
In my database m having 1000 record and I want to display 10 record on each page on gridview so every time it fetch 1000 record so while page loading it is quite time consuming ..
View 1 RepliesI follow the following link for add dropdownlist in gridview.Adding Dynamic Rows in GridView with DropDownLists in ASP.Net..In this template field the drop down list contain 500 items how can i search the paticular item
View 1 RepliesI have this file saved in the server. I do not want anyone to download with out authentication. How do I do that?
View 3 RepliesAssumptions: Microsoft stack (ASP.NET; SQL Server).
Some content management systems handle user-generated content (images, file attachments) by storing it in the file system. Others store these items in the back end database.
Some examples of both:
[code]....
What's the best approach, and why? What are the pros and cons of keeping user files in the database? Is there another approach?
I have around 100 rdl report files...what i have found in google is -> open RS Admin site upload each report...doing this manually takes a lot of time... We don't want to use Target report server url method and clicking deploy option to deploy the reports or report project onto the report server...because we are not provided with such production server url information...!! In client perspective...We just give the reports as a rar file...now client will have to extract the report files...and what should be the next step...!! Is there anyway to deploy or upload all the reports at a time...!!
View 1 RepliesI tried to find out about subject but with no success. The point is that in the beginning I've made many user controls. My site is too slow. I have not idea yet if it is because of user controls.
View 7 Repliesas all we know that we can create very simple chat using ajax timer & web service , it runs well for few users .
i want to leaverage same idea for site where 5000+ users will be there in chat room , messages are stored in queue hold in memory * dispatched as user request that is through java script timers calling page method or service ,
how well it will perform ? i know GTalk implements XMPP protocol(jabber) for the web chat
seems it will be difficult to got XMPP way ?
I have developed one simple application in that i am using mysql database. but my database size more thatn 4,50,0000, as well as ecah and every second my database is updated i.e record ll be added to the table how can i get the details for one single click.
View 1 Replies