Web Forms :: Restric Multiple Download Concept Implemented By Rapidshare And Hotfile
Feb 8, 2010
rapidshare,hotfile and many site they restric user to download more than one file at a time. what is their concept and how can i implement this concept by asp.net
I have some documents in a folder ..i am creating zip file using the following code..but i am not able to download it at client side.
Imports ICSharpCode.SharpZipLib.Zip Imports ICSharpCode.SharpZipLib.Core Public Function ByteArrayToFile(_FileName As String, _ByteArray As Byte()) As Boolean Try
I am working with Microsoft web developer 2008 Express (asp.net) and coding in VB.
I have coded a routine that creates a series of excel files in a folder called "SaveExcelFiles". This routine works fine. What I now want to do is to create a routine that will let my user download (copy) the entire folder to his PC. I do not want to have the user have to download each excel file separately if this can be avoided. Also I would like to have a routine that deletes all of the excel files in the folder.
I was hired to do some contract work for a short contract. I am looking at this code on this Aspx web form. What they do is load the labels for a radio button list from an ObjectDataSource object. Well this is the first time I have ever heard of an ObjectDataSource. The problem is that I don't even know where this object is pulling data from. With a SqlDataSource object, I can easily view the flyout menu to see the sql query where the data is being pulled from. Anyway, I need some figuring out where objectDataSourcePlanType lives and where it is pulling data from. I know I can't list the entire project, but I am sure someone who is familiar with ObjectDataSource
<tr> <td>Type of Plan</td> <td><img alt="Required" src="/Images/arrow.png" /></td> <td> <asp:RadioButtonList ID="radioButtonListPlanType" runat="server" AutoPostBack="True" DataSourceID="objectDataSourcePlanType" DataTextField="PlanTypeName" DataValueField="PlanTypeId" OnSelectedIndexChanged="RadioButtonListPlanType_SelectedIndexChanged" RepeatColumns="1" RepeatDirection="Vertical" AppendDataBoundItems="true"> </asp:RadioButtonList> <asp:RequiredFieldValidator ID="requiredFieldValidator10" runat="server" ControlToValidate="radioButtonListPlanType" ErrorMessage="Type of Plan is required." SetFocusOnError="true" /> <asp:ObjectDataSource ID="objectDataSourcePlanType" runat="server" SelectMethod="ListPlanTypes" TypeName="Candle.Web.PlanRequest.CommonWeb"> </asp:ObjectDataSource> </td> </tr>
Am implementing the threadpool concept and have doutbt in threads being created.
[Code]....
Initially i gave (1,1) in semaphores and only one thread was created and it did only one task, and (5,5) created one thread and it used for all the times.
Is ter anything wrong in wat i did or any other way of doin other than semaphores. And mainly wat abt the remaining 20 threads in threadpool? its a waste of CPU right. Can i create only 5?
We need to download multiple files from remote servers. It is a process that would take few hours to complete, since we are talking about images ~50kb each and more than 250.000 in total. Each images will downloaded, resized and then imported to SQL.DB, so we do not need to write files to the disk. Also the applications need to use network credentials, since it is behind ISA.
From your experience, what is the best method to implement this? Should we use WebClient or HttpSockets? Should we use Async methods or Threads ? How can we implement for example 5 simultaneously download to achieve better speed, since we may getting files from many different servers at once?
I'm a junior programmer, i do not get the concept of MVC! My method of coding is seperating my application design into 3 layers:
Presentation Layer Business Layer Data Access Layer
I find it very practical to a junior developer or at least to me, so i do not really get the point of MVC since i believe MVC just tries to separate logic from UI. Right?
I decided to have this book to help me have a better idea on code design:
Is it possible to take 10 (or more or less) pdf files in a directory and merge them into a single PDF file to display to the user? Obviously I would prefer to not pay for something if I don't have to
I'm working in ASP.NET 4.0 with C# in the code behind.
I was wondering if there's anybody that can give me an idea how the component Calendar (even button) is implemented. Do you know a place where I could see it?
I have own control implemented in "CommonControls" assembly (the same namespace). It us 'Custom control' inherited from 'WebControl' class and implemented without ascx file.
It is necessary to use this control in "main" web site. how to register this control?
I have just been dabbling in MVC over the last couple of weeks. Knew I wanted to go in this direction but have been putting it off due to comfort/familiarity with webforms. Also knew that with my first MVC site I wanted it to support mobile devices. One of the first tutorials I saw implemented an Area for mobile support. I started that way as well.
Since I want to get off on the proper footing here I guess I'd like to ask you guys. What would the best practice be? Is it just a matter of preference? Are there any specific pros or cons to using or not using Areas when it comes to support for mobile devices?
suggest me a good design pattern for implmenting the following? I have an object say myObject. This myObject is created using few inputs from the UI. After the creation of myObject. This object will be passed to few methods.. like method1(myObject);
method2(myObject);... method5(myObject);etc. Each methods will prepare the input for successive methods call. For example method1(myObject) will set the values necessary for the operation of method2.Then method2(myObject) will set up the values necessary for the operation of method3 and so on..Same object is used as the argument for every method calls.Which design pattern can be implemented?
how to download selected files from grid view. Initial I will display list of files with file paths in grid view along with check boxes. when user select some files, I should be able to download selected files in a zip file.
I am new to ASP.Net i dont understand the concept of sessioncookiesWhat is a sessioncookie,what are the advantages of sessioncookie whats is sessioncookie is all about,how to create a sessioncookie,how to retreive values from sessioncookies,how to store values in sessioncookies.i searched in net but i dont get clear idea about the sessioncookie concept can anyone pls clarify whats is sessioncookies and its concepts and provide some code samples if possible.
I want to implement a restful service in ASP.NET. I want it to be compatible with .Net 2.0 and IIS 5+. I am constrained to not use ASP.NET MVC or REST starter kit. By reading on internet I have learned that it can be implemented using HTTPHandlers. The problem is, the request will come in as a POST request. And I want to URL to be like:
http://abc.com/MyService/MyMethod1/ and http://abc.com/MyService/MyMethod2/
I tried to figure out NHibernate (a first) First went through chapter 23 in Asp.Net MVC in Action 2, and read some articles to get the drift.
Then I modified the sample in the above book to work with my own database and my own table. Finally got that working. (Started messing with this yesterday afternoon....it's 7:30 AM, so .... I'm tired...)
Then I worked this into my own project (the shared mvc template some of you might have looked at).
Now my application became completely unstable. Sometimes it work, but other times it bombs out where my controller factory (Castle) set the component lifestyles:
[Code]....
Each time with some LoaderException that read like {"Could not load file or assembly 'Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc"}
Man I fiddled all over the place, having xcopy copy dll's (see krok.web properties got a post build event) and many other things I that does not really make sense.
And from the darned instructions, having all your dll's in a folder which get copied out to the web project's bin folder and dont know what else.
Seriously...if someone can download this and have a look (better not if you dont know Castle Windsor and NHibernate)