C# - Ajax Server Process With Live Interface Progress Status?
Oct 24, 2010
I have a process that retrieves html from a remote site and parses it. I pass several URL's into the method, so I would like to ajaxify the process and give a screen notification each time a URL completes parsing. For example, this is what I am trying to do:
List<string> urls = ...//load up with arbitary # of urls
foreach (var url in urls)
{
string html = GetContent(url);
//DO SOMETHING
//COMPLETED.. SEND NOTIFICATION TO SCREEN (HOW DO I DO THIS)
}
public static string GetContent(string url)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET"
using (var stream = request.GetResponse().GetResponseStream())
{
using (var reader = new StreamReader(stream, Encoding.UTF8))
{
return reader.ReadToEnd();
}
}
}
In each iteration in the loop, I want to show the URL was completed and moving on to the next one. How can I accomplish this?
I am doing so many process in a single button click.It is taking more time.So I want to show a progress bar with percentage or status of the process.Is there any way to implement this.
I want to know how to show the progress bar in WEB while updating the status of progress bar percentage and Status of the application I am trying to built a web application in which I update the scripts from SQLServer to another SQLServer using TransactionScope using Stored Procedures. Here in my app I want to show the progress bar. and its percentage completion of the SP or task and simultaneously updates of the scripts execution.
i.e., Table 1 created, Table2 creation in progress like that or updates etc. Status of application.
I am executing time consuming task in a new thread. ParameterizedThreadStart pts = new ParameterizedThreadStart(WorkingFoo); Thread thread = new Thread(pts);
The WorkingFoo executing the task and keeps track of the progress steps (it can return the total number of "steps" and the current step).
I want to display this information in a progress bar (simple div or ajax control, I don't mind).
I don't want, ofcourse, visually refresh the page that will display the progress. Also I want to reduce as much as possible the number of postbacks. So how do I do that? How to show the current progress from new thread on the web page? Also the page that shows the progress can be closed and re-opned and still get the current status.
I'm the first time using VS2010 deployment tool. I selected FTP publish, and all the configurations are correct. I'm just confused that after I clicked publish, there is no window or text shows the status of the uploading progress. When would it be finished? It's taking so long, and in the meantime I can't do anything.
I have an asp.net page that calls a dll that will start a long process that updates product information. As the process is running, I want to provide the user with constant updates on which product that process is on and the status of the products. I've been having trouble getting this to work. I add information to a log text file and I was thinking that I'd redirect to a new page and have that page use Javascript to read from the text file every few seconds. My question is has anyone else tried this and does it work fairly well?
Note:- i don't want to use updateprogress etc. control of ajax
on button click, long task(e.g thread) runs in my webpage for about 4-5 minutes.I want to show status to user either by a processing image through javascript(image must be shown in a certain part of page other part of page will remain intact) or an exact status of process if possible. i have tried a lot but all in vein.
I have a web form used for importing data from a CSV file. It contains a result panel and a result label, which either show a success message or an error message after the import process. Let me say here I know the page should not be doing the import, but this is legacy code and the client expects only small changes.
My problem is that the result message (label) retains it's previous content and visibility during the next import process, because clearing it during Page_Load or at the beginning of the import method only has effect when the import method is complete and thus the postback is complete.
At the moment, the only solution I can see is to move the import code into a separate class (as it should be), call the import method asynchronously, clear the result message, and thne set then result message when the complete or error callback from the import process is called.
I've got a plain C# web page that uses jQuery to call a handler page using AJAX. While the handler content is loading, a message "Please Wait, loading..." is displayed. Once I've got the content back from the handler I hide the loading message and display the content.What I'd like to do is after the loading message, display a percentage of how far through the handler page is. All the handler page does is loop through a list of members, powered by a web service, and adds them to the database so I know exactly how many members are being added to the database so I can tell how far I am through.The problem I'm having is because all of this goes on in a handler, how can I send the progress percentage back to the main web page while the handler was still loading.Any ideas? If I could do the exact same task but differently which would allow me to create the progress bar,
I'm trying to make a progress bar that updates the user on the progress of the AJAX call.
My immediate thinking was that I need an AJAX call to start a thread on the server, allowing the starting AJAX call to finish, and allowing the thread to send updates back to the user.
For the purpose of simplicity, disregard the actual progress bar functionality (I was thinking of implementing one of those JS bars, with fancy colors and effects ;), but if I can get an update from the thread, then updating a simple JS progress bar becomes trivial ;) )
I have a wierd issue with the update progress control in ie8. I have a modal popup that loads a pdf in an iframe, then i have a button click that navigates away from the pdf and shows a form in the same modal. All this is wrapped in an update panel, which i have an update progress control associated with. The control shows correctly in ie7, firefox, safari, and chrome. But in ie8 when the async post back is complete the progress indicator does not hide, until I click on the screen or scroll the page, then it hides and the form shows.
I want to display photo of employee who is login but our company doesn't want to expose the photos of all employees publically that is why we put that employees photos on a server that is not live but connected with the live server.Now problem it that when I run my website on localhost the photos of employees display but as soon as I publish it on IIS it doesn't display images.
I'm having a bit of trouble cancelling an asynch postback. I have an update panel with an update progress which contains a cancel button so that the user can cancel the postback. When the user clicks a button to generate a report the update progress is shown. The report can take a bit of time as it has to loop through a thousand or so times creating an excel spreadsheet. If the user decides to cancel running the report for any reason then they can click the cancel button which I then call abortPostBack() in javascript which stops the update progress and the page is shown again. However, the user can't do anything else like navigate to another page as the server is still processing the loop. How would I stop the loop on the server processing when the user has clicked the cancel button?
I have a stored procedure which fetches data after joining 8-9 tables and inserts that into a temp table. It was running fine till now, but now when the amount of data fetched have exceeded 20000, the SP is breaking. I have debugged the sp and found that this main query is failing after returning arround 15000-16000 records.
The error message says Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. I know what is deadlock, but when i checked with SP_LOCK stored proc i only found that my process is running on database only. So how is this getting deadlocked when there are no other processes running simultaneously on server.
So this interface allows one server to request data from another server. The catch is that all xml for the interface is transmitted entirely over http posts followed by an empty status code 200 response. No data is sent in a response. So if my application wants to requests data, we send an http post with the xml request and receive a blank 200. Then, shortly after our request, we'll receive an http post to a predetermined URL with the xml data which we then send a blank 200. This data will then be stored in a SQL database. This interface cannot be altered.
The reason this is problematic is because our server is handling requests from clients that need that data in the response. If a user requests for data that isn't available in our database, it needs to be requested from the interface and then returned in the response. I'm just not sure how to get this to work out. I've thought about polling the database, but I'm worried about thread pool issues. I've also looked into using ManualResetEvent.WaitOne to halt the processing of the client request and then calling Set when the interface sends the data (as a request). I've read that wait threads are shared, but just don't know if this will scale well. Does anyone have any insight or I'm pretty much stumped on this one...
i am developing an online mmorpg game . so speed is very important . i have a complex map system which is coded by me . at this map system for walking i am using ajax . using iis 7.5 and netframework 3.5 .
at this page you can use w,a,s,d or keyboard arrow keys for walking [URL] ( username : test1234 , password : test1234 )
as you can see at image below when a player pushes the movement buttons faster ( without waiting to move completed ) status being aborted so it really prevents walking faster i want to prevent this is from happening ( disable buttons to be pushed so fast until post event completed )
Live Chat is a very famous tool on websites, and the operators use a special web/windows interface to talk to the clients.What I want to implement is to specify some email accounts, and when the client click's the live chat and starts typing, his/her instant messages are delivered to the available email account. My operators can talk back to them as if they are on their friends list.I don't need to require any login or registration for clients to use this Live Chat.So are there any ideas about how to implement such a thing? Are there any good third-party-modules that already do that?
I am using a generic handler (indicator.ashx) to create a graphic that is overlayed from information from a table (called LIVE) from our SQL database. This is working very well and I am very happy with the results.
However I am having an undesirable issue where the query string that is used for this is also being accessed by another page (called ReceiveLive.aspx) which is populating our LIVE table with data when we don't want this. I have been able to track this issue down to our generic handler that seems to populate this table with data whenever the handler is accessed.
The query string that is used to access our graphic through our generic handler is http://mydomain.com/indicator.ashx?ID=ABC001.
Our other page that writes data to our LIVE database used the query string http://mydomain.com/live.aspx?ID=ABC001 which is normally only accessed by a small piece of software that sits on the users PC and sends the data when necessary.
My question is this: How do I prevent data from being written to our LIVE table via the Live.aspx page everytime a query string is processed by my indicator.ashx is accessed?
We had a website deployed on IIS server remotely say www.liveserver.com.
We recently decided to make a copy of the website internal to the organisation so we brought a server and copied all the code from live server and configured it and say it is http//archives-testserver.com
Everything seems to work fine but while navigating and clicking on certain module links within http//archives-testserver.com......the domain name is getting rewritten to www.liveserver.com and user is made to navigate on the live site. I wonder where this configuration is with in IIS...
I looked under properties under website identification and everything is referring it as http://arhives-testserver.com. also thr is a file called securityRedirect.inc and ifor handling errors and all the references have been changed and couldn't find anything in web.config. where else to look for probable reference to live site?
We had a website deployed on IIS server remotely say www.liveserver.com.
We recently decided to make a copy of the website internal to the organisation so we brought a server and copied all the code from live server and configured it and say it is http//archives-testserver.com
Everything seems to work fine but while navigating and clicking on certain module links within http//archives-testserver.com......the domain name is getting rewritten to www.liveserver.com and user is made to navigate on the live site. I wonder where this configuration is with in IIS...
I looked under properties under website identification and everything is referring it as http://arhives-testserver.com. also thr is a file called securityRedirect.inc and ifor handling errors and all the references have been changed and couldn't find anything in web.config.
I've currently developing a web application in asp.net and a smsgateway moderm connected to my server (currently my laptop). is there a way for the asp.net to interface with the moderm that is connected to the server? so i'll be able to send/receive message in a web interface
I'm using a an Ifram that switches between several pages, each page contain a report viewer and takes time to load (about five seconds) since I'm using an Ifram the end user will not notice the loading of the page behind the seen (report pages) he will only notice a quick loading of the Ifram page ! so I tried to use the update panel and the update progress to show a waiting or loading progress image when the page loads or post back . but this doesn't work in Ajax since Ajax is not compatable with the report viewer .is there any way to show a progress waiting message during the page load using Javascript ?I Found many scripts like this that show a waiting message or image BUT the script starts after the page loads completely (a silly loop for 3 seconds maybe then hide the message )
I have a developed a new website for online document management. I have setup everything on the local network and the site is available on localhost. What I want to do is to make it available on internet. Its my first web project and configuring IIS and resolving database problems after publishing was real headache for me apart from development work (thats another long story). But i have made it up to here and now there is one more step.
How to make a web server live?
I am using asp .net 3.5. The server is in my home (windows xp, IIS 6, microsoft sql server 2005, 10MB bandwidth for internet connection).
I dont want to buy a domain because the website is not commercial. Its just me and my friend who will be using the website and we dont mind putting in ip address. Also, do I have to get a static ip from my ISP?