Web Forms :: Copying The Folder Along With Its Files?
Sep 8, 2010i want to copy the entire folder along with its contents from the client machine to the server where the application is deployed. i am using asp.net 3.5.
View 3 Repliesi want to copy the entire folder along with its contents from the client machine to the server where the application is deployed. i am using asp.net 3.5.
View 3 RepliesI have few files in FolderA on the web server.
I want the users to select a fews files from FolderA and copy them to FolderB on the same web server.
I want to list all the files in FolderA and allow the user to select a few files and copy.
I want to copy the files programatically when the user selects a few files and click on Copy button.
How to copy the files quickly from folderA to FolderB?
Lately it's been taking about 15-30 seconds for my site to respond after copying new files into the bin folder. I do updates throughout the day to fix bugs, add new features, etc. It used to only take a couple seconds.
I have 4 files that get copied into the bin directory regularly. 2 DLLs and 2 PDB.s I use debug mode (I prefer it for the errors since right now I'm updating frequently), but have also tried release mode and it didn't make a difference. 3 files are 1MB and the other is 400KB. I've also cleaned and re-built but still the same.
It was only taking a couple seconds for the app to restart until a day or two ago. I'm not sure what changed. This is an active site so having a long delay is a problem. I've been tempted to try an iisreset, but that'll really create a problem for users on the site.
This is with IIS6, Win 2003, and .NET 3.5.
I looked in the .NET temp folder and it's not filled with garbage.
I am new to MVC. I am using MVC and VS2010. I am trying to publish my website to a remote server. All files are copied except some static pages i have kept inside a folder. for e.g. i have a folder named Content. I have around 5 .pdf files inside this folder and also a .css. When i do Build->Publish <appname> all the files including the .css is copied but not the .pdfs.
View 2 RepliesI have several web sites, all of which use the same JavaScript library. How can I "reference" this library from each of my web sites? If I just import the library into my web site in Visual Studio, I get in trouble as soon as the library changes, because I then have to update it in all web sites manually. It would be much easier to place the library in an external folder and just reference it from my web sites. How can I do this with Visual Studio?
View 9 RepliesApparently, DNN installations do not like to be precompiled (they won't be able to find any localized strings then). Our installation is safely put in SVN, which means I cannot just copy the whole directory. To publish everything, I need to copy the whole website directory without the SVN files and directories. So far, I've been messing with good old DOS commands, which is time consuming and error prone.
an MS-Built script or step to do just this? Or can I do this using default Visual Studio 2010 commands?
Note: this is a website, not a web application.
is there any way to copy/transfer files directly from client to ftp server through my web application? user will select files through fileupload control.
copying via webserver takes too much time.
there may be several files of 0 kb to 10 mb.
I know you can copy a Website intact to the server and have it run normally (security and compilation time aside). What about the projects that are in the solution? [whose dll's are copied to the bin when built]. Is there a way to copy the projects' code files to the server as well?
My goal is to be able to debug [by modifying code in the project if needed] directly on the server without having to install an IDE [or keep building on dev machine and copying over dlls]. I can debug/modify the website files, but not the projects.
I have been struggling with an issue that sounds like it should be quite common but I can't seem to get the thing working no matter how much I research it!
I am using an AJAX file uploader to upload files (up to 100MB) to the webserver and when the user clicks a button to complete navigate to the next page, I then attempt to move the files off the webserver onto a file server on Page_Load. Both servers are WinServer 2003. There just isn't enough space on the webserver to hold all the uploads once we go live with this solution so I have to get the files off the webserver.
Uploading the file and creating a new subdirectory on the webserver (to hold the file) works no problem at all. When I do the file copy to our file server locally on VS2008, again, no problem. However, when I delopy to the live server and try the same thing, the upload happens ok, but the file copy does not. I get an UnauthorizedAccessException. I don't have access to the webserver myself (but can request it if absolutely necessary) and our file server sits within the same domain (Active Directory).
I do not want to use Impersonation at a high level (web.config), so I tried it programmatically for the purposes of the copy file but it did not work. I used one of our general clerical accounts to pass in the credentials and gave full permission to this account on the file server to create/modify files.
Stack Trace:
[code]...
And the Copy code is:
[Code]....
I have a folder with png images that are not shared or public (the folder is outside my application folder). Now I want my users to be able to view thoose images only if they are logged in (different users, different images). All images have a name that correspond to the users id. My idea is to stream thoose images into the asp:Image control, is that possible? How do I do that? Other (better) solutions?
View 6 Replies I have created roles and users using ASP.NET configurations for login validations, it works fine if I run my application within project but when I publish my site and try to run from my Inetpub it giving this error. I tried all shorts of solutions posted in website but nothing worked for me.
"Failed to generate a user instance of SQL Server due to a failure in copying database files. The connection will be closed"
I was following the tutorials from this two sites:
http://www.15seconds.com/issue/070104.htm
http://aspnet.4guysfromrolla.com/articles/020404-1.aspx
Following the first site, it had worked but when I´ve moved the pages and files to other folders and set the web.config file on this folder, now it won´t work at all!!!
The file is an *.swf object. I did put the asapi.dll to map the extension on the website root, I´ve put the
[Code]....
on the web.config new folder and on the web.config website´s root.
It won´t work!!! I can access the file directly!!! on the web.config of the folder that contains the file, there is a <deny users="*" /> line.
Actually I want move files from one folder to another folder after reading files.So while moveing the files i want rename those file
My Code is :
[Code]....
showing some error also the folder using another process, How to rename while moving..
ex:ss.xls need to 20100429.xls
ss1.xls need to 201004291.xlx
it should increment file name
how to get the count of the number of files, if the file already exists in folder in C#.
View 2 RepliesI have a simple user control which needs to output a list of images in a particular folder. I'm passing a property containing the folder path into the method so the same method can be used with different folders on other occasions.
What I have is almost working, but there seems to be a problem with the format of the file paths. Here's the usercontrol:
[Code]....
This loops through the files absolutely fine, but they don't render because the 'src' attribute is a local file path as opposed to a web-safe file path or a relative path. It renders like this:
<img src="C:UsersMeDocumentsMy Web Sitesmysiteiconsflagsad.png" /><img src="C:UsersMeDocumentsMy Web Sitesmysiteiconsflagsae.png" /><img src="C:UsersMeDocumentsMy Web Sitesmysiteiconsflagsaf.png" />
how to update my code so that it looks for files in the folder relatively, or uses correct absolute paths for the website to render the images correctly?
I need to process files xml files which are present in Transfiles folder and then need to move that files to processed folder.Here is my code.I am getting issue asÂ
Could not find file :'file path'
string Tranfiles, ProcessedFiles;
//Tranfiles = Server.MapPath(@"~goduriansth100 ransfiles" + Filename);
Tranfiles = Server.MapPath(@"~ ransfiles" + Filename);
if (File.Exists(Server.MapPath(@"~ ransfiles" + Filename)))
{
File.Delete(Server.MapPath(@"~ ransfiles" + Filename));
}
//ProcessedFiles = Server.MapPath(@"~goduriansth100ProcessedFiles");
ProcessedFiles = Server.MapPath(@"~ProcessedFiles");
File.Move(Tranfiles, ProcessedFiles);
My client asked me to Process XML files(convert XML Data into SqlServer) Â and transfer processed files from one folder to another which are present in remote server,I know how to read(process) XML files and convert XML data into SQL as I have done earlier, Nedd transferring processed files into another folder.
View 1 Repliesnew to asp.net I'm trying to dynamically delete a folder so far I have this code
[Code]....
This works well when there are no files or folders in the directory. But if the directory is not empty then I get an error. How can I delete all the files and folders within that directory
i m using fileupload concept and saving the files to a folder download.hw can i check the files names saved in that folder while site is hosted on webserver.is there any way to delete some of files from that folder runtime.
View 2 Replieshow to retrieve sub folders and files from a particular folder as like windows explorer?
for example ..i am having a folder "config"..
within this folder i am having subfolders as like "images","rss" and also config files..
how to get this in tree view as like windows explorer?
I want delete all the datas in server side folder 'documents' when the page load.I am using following codeÂ
string filePath = Server.MapPath("documents");Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â System.IO.File.Delete(filePath);Â Â
when i run the following error occur.Access to the path 'D:Librarydocuments' is denied.How to delete server side folder either it has data or not?
I have a directory folder with PDF images files: 1234567.pd, 7654321.pdf, 3212345.pdf, 9876321.pdf. Now, see my code below (everything in the code is working  good), except that I am trying to search for the image file number doesn’t exist in that directory.
<table><tr><td>
<asp:Label
ID="lblImageFileNumber"
runat="server">Entry Number:</asp:Label>
</td>
<td >
[code]....
For example If the image file pdf number: 4455668.pdf doesn’t exist in that folder it will redirect or display error.I am getting an error that says: AspPDF. NET 2.1.0.15816 has generated error #110: [ Could not find a part of the path 'C:XXXX-Image4455668.pdf', which means the image file number doesn’t exist in the path directory. Yes, the error is correct, there is not image file number I type.
I am creating a website using ASP.NET (C#) using FTP
problem:
I have assigned a folder with a storage space let say 1GB to a user now what i want is to keep track of the storage space ulitilized by the user. for eg if a user saves/deletes a file in his folder, how to know that user has saved/deleted something to/from his folder.
I am trying to tweak a ASP intranet website that was created for my company. It uses a control to show all files in a folder, so they can be selected with ease by our employees. What I would like to do if possible is set it up where if a new form is added a bubble notification will appear next to the tabbed section. See the image below to see what I am refering to. I spoke to our site designer and he stated it is not possible. I feel that with all the creative minds in the world anything is possible. [URL]
View 2 RepliesI 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.