Architecture :: How To Automatically Load Records To A Db From Files FTP'd To App_Data
Jan 28, 2011
The sequence of events is as follows:
1. A piece of software running locally on my pc periodically uploads (approximately every three minutes) to my webserver an xml file comprised of six fields. The file size is < 1K.
1a. The file name is always the same. ie. filename.xml is uploaded. Three minutes later, filename.xml is uploaded again, this time with different contents. I have no control over renaming this file.
2. A chunk of code that parses the xml and inserts the six fields into a database
3. Deletes the xml file
4. Waits for the next xml file to appear in the folder
5. Goto 2.
The locally running software uploads the file without issue. So far, I'm able to parse the xml, do the database insert and delete the file manually by refreshing the browser window and subsequently running the code in the .cshtml file. What I'm having a hard time conceptualizing is what the best way is to set up an automated event/method that watches the folder and when a new file appears, write it to the db without user intervention. Also, where would I put this code? _AppStart? Do I need to start a FileSystemWatcher event on the server somehow? I'm kinda stumped as to how best to proceed.
View 3 Replies
Similar Messages:
Apr 1, 2011
I have a number of XSLT files in my ASP.NET Web Application solution. Should these go in the App_Data folder?
The MSDN 'Project Folder Structure' article suggests that the App_Data folder is for 'data files'. As XSLT files are not strictly 'data files' then should they go elsewhere?
I do not want end users to be able to access the XSLT files from their browsers, so App_Data seems like an obvious location for this, but I am not sure.
View 1 Replies
Sep 16, 2010
I have secured some files on my webserver by putting them into the App_Data folder in the root (I do not have the option to secure folders using the ASAPI filter)The user gets access to these files by requesting them through a handler, fx. by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpgNow, I want to make all the content in a specific folder called "Members" (a single subdirectory of the App_Data folder) available only by passing a specific password. That is by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpg&password=xxxxIn my Handler.ashx I have written some logic seeking if InStr(context.Request.QueryString("file"), "Members") = 0 before sending the file.If inStr <> 0 a password is required.Is this a good way to secure a folder in and its content? Is there a way of getting access anyway, like using some kind of "sub-directory" line in the path (the same way as you can request parent directory by using "../../Myfile.jpg)? I know there will be a problem if someone fx. legitimately tries to access the file App_Data/Members.jpg
View 15 Replies
Aug 14, 2010
In myapplication i have done a thing like if some one purchase a tool for and if the license provided is for some few days (suppose for a week or an year).. How to send a mail automatically to the ID given by him before a day or a few days .
View 3 Replies
Sep 1, 2010
I would like to achieve the following.
1- if a user goes to a web page in a web application hosted on the Internet and selects a FUTURE date from a "Calendar control" the date selected and the URL for the page are stored in the database (I know how to do this step)
2- when the date selected arrives the URL will be embedded in an email that is sent out AUTOMATICALLY to the user. How can I trigger the email to go out AUTOMATICALLY on the selected date??????
Does the link below help me answer this question?? I just need a high level steps on how to do this. .
http://msdn.microsoft.com/en-us/magazine/cc163821.aspx
View 3 Replies
Mar 16, 2010
I just started learning WCSF,but I encounterd a problem on the menu which the application automatically generated. But I don't know how to reorder the menu.
View 2 Replies
Jan 21, 2011
I am building a small mass email application for my department. Which basically emails out a notice to a large list of email addresses. Because the company email server limits the amount of email addresses that can be contained in a single email I have to break the list apart into smaller 100 email groups.
I've create the query to pull all email addresses needed, stuffed them into a collection but I am not sure how to grab 100 emails at a time and send it off to another sub to perform the email send before grabbing the next 100.
This is what I have so far.
[Code]....
View 5 Replies
Jul 3, 2010
We have a file upload feature in one of our websites developed in ASP.NET and C#.NET. We would like to scan the files for viruses automatically before they are being uploaded into our server. We are using AVG server edition on our server. How can we enable this feature.
View 1 Replies
Jan 30, 2010
In my application i am saving the worddocuments in a folder,I should delete all the prev date files.can i do it automatically? and i am not using any database for the application
View 21 Replies
Jan 8, 2011
i have a web application with sql server 2008 i wanna know if its possible to load the data automatically after its been inserted to DB..i have a alerts table which store message and user name to which the alert is to be send i wanna display the alert msg to user after it has been inserted...
View 3 Replies
Apr 27, 2016
I want to set the div to automatically print when the webpage loads how????
View 1 Replies
Feb 8, 2011
I am a very new programmer.. A website is providing a lot of zip files that i needed. It will be updated/uploaded new zip files weekly. What I need to do is write a program/script to do auto downloading from the web weekly.. for example, this is the web link
http://www.google.com/googlebooks/uspto-patents-applications-yellowbook.html ( you can see a lot of zip files there )
so my question is What script i have to write(i got no experience in writing any script, so what can you suggest?) so i can download the zip file programmatically? then how should i make it to download the new zip file uploaded weekly?Is it i have to use DOM...unix? if yes, i will do some research on tat to make it work.
View 3 Replies
Apr 23, 2010
I want to restore .bak files from a server directory into database. The problem is it should behave automatically. Whenever a .bak file will be uploaded in that specified directory of the server that file will be restored. It may happen by using sql procedure which will restore all the .bak file which it will find at a certain time in that specified directory. Or, it may happen by using asp.net program which will run exclusively on server and call a sql procedure to restore a backup file whenever a backup file will come in that specified directory. But I am not getting how to figure out this ideas programetically.
View 2 Replies
Mar 10, 2014
How to fill username and password automatically when load a web page in asp.net ....
View 1 Replies
Mar 31, 2010
I'm frequently adding a lot of content files (mostly images and js) to my ASP.NET project. I'm using VS publish system, and on publish, new files are not published until I include them in the project. I would like to auto include all files in specified directory. Is there a way to specify wich directories should be auto-included in csproj file or anywhere else?
View 3 Replies
Apr 28, 2010
We are currently updating our policy page on our intranet. Currently the page is written in ASP and connects to an Excel spreadsheet that serves as an index, which contains policy name and number. We also have a directory that contains all of the policiesnamed the policy number. The control that is currently being used will get all of the policies listed in the index and create links for them. We do not have to manually create the hundreds of links we just update the index. Does anyone have an idea of a control or a way I can accomplish this in asp.net?
View 1 Replies
Nov 21, 2010
Users turn on their computers and XP boots up.I have an ASP.Net website.Is there a way such as a login script that runs that will run the default.aspx inmy ASP.Net website so that the first thing that the user sees after XP boots up is the default.aspx web page in my ASP.Net website?
View 1 Replies
Jun 14, 2010
I just inherited an ASP.NET WebForms web application that I was tasked with refactoring. One of the features is a file upload and while debugging I noticed that as soon as a file is posted to a certain page/handler, it is automatically uploaded to the root directory of the application. The file is then moved to the proper location. I can't seem to figure out whats causing this automatic upload of the file. Is there something I'am overlooking in ASP.NET WebForms that allows this to happen? Is it an IIS configuration or something?
View 1 Replies
Feb 17, 2011
I am using 2 combobox , In form_load event i am loading the combobox using dataset and In selectedIndexChanged event of the combobx1 we have to load combobox2
I am having a problem that when i load the form, combobox selectedIndexChanged event is firing automatically So how can i avoid this.
I understand that if it's a web application then IsPostBack method will be useful, but what to do as it's a windows (desktop) application.
View 2 Replies
Dec 6, 2010
Here's what I want to do, however I'm not sure of the best place for Excel. Excel files are sent via e-mail from various sources, from each source, they are sent in different versions of Excel and different information layouts, though from each source they are consistent.
Overview.
I want to give the user a front end to enable them to place the excel files into a drop zone and specify which files have come from which source. I then want to pass the file names and source origin to a workflow service. Based on this info the workflow service will then take 1..n workflow routes based on the source with the ultimate aim that data will be placed into an SQLServer 2005 DB or if the Excel lines cannot be processed, then output for the user to see with a reason. Because this is quite a complex task, I'm taking each source in turn.
Initial Problem.
My first set of Excel files come in 4 seperate files. I need to first merge the data in the Excel sheets to make 1 File for Processing. Some of the rows in the spreadsheets can be merged into a single line under certain conditions which will make the business logic much easier further on. So, first off After the user has dropped the Excel files into the drop zone I need to open the spreadsheets and merge them. I then need to feed each line to a 'rules' engine to determine the data and business logic that needs to be processed before updating the DB. So I thought I'd use a Workflow service for this since there will be no reason not to work on multiple sources at the same time as I progress through the development of the program. The problem I have is that unless I download the CP1 for workflow I cannot use this directly (so it appears) for working with Excel. So I was looking at using possibly WCF as the 'feed' to the workflow service, but can I use WCF to do the possible long running process of merging the Excel spreadsheets before pasing a row at a time down to the workflow service?
View 1 Replies
Nov 16, 2010
I have a listview to display items from database and I need to automatically select the first item when the page first loaded, how can I do it?My listview is in one of the steps of a wizard control, and this wizard control is inside a popcontrol extender with updatepanel.
View 3 Replies
Apr 23, 2010
We are storing the WAV file into a database table as VARBINARY(MAX). We want to play the WAV file directly in a web page. We want to use PLAY, PAUSE and STOP for these WAV files.
We want the user to have a Control on the page to play the WAV file.
Here we DO NOT want to store the FILE in the Web Server's file structure. It is againt the SECURITY policy.
We tried different ways. Nothing is working. We used SoundPlayer class. Using this, we can only PLAY and STOP but can not PAUSE the WAV file.
View 2 Replies
Nov 19, 2010
I am building a command line application and I need to transform data within my application's classes to text.
It would make my life easy if I could use ASPX files to render my data into the target text format.
To achieve that, I need to be able to render an aspx file outside IIS. The following article explains how:
[URL]
The article is developed in 2003.
Is there any better way to so achieve similar result in .NET 4.0? Does MVC make this easier? Is this very memory/performance intensive? I have to create a new ApplicationHost anytime my command line application is executed. Is this approach reliable enough to be used in an environment with high throughput?
View 6 Replies
Aug 18, 2010
I have two projects (Project A and Project B), these projects are hosted in different locations and on different servers. Project B want to access the files of Project A. which technique is required to fulfill my requirements.
View 1 Replies
Jul 25, 2010
my subprojects creates serveral web.config files? I have solution that consists of 10 projects and I want everyone to compalie but the one in the top root. Now my problem is that my subprojects are all located inside folders in the root and my subprojects generates each a web.config. Thhis doesnät work very good so what should I reconfigure would you say?
View 2 Replies