check if page is already opened and Send parameter to it - asp.net

How can I check if an asp.net/html page is already opened, and if it is, send a parameter and not open it again, and if it isn't opened, open it and send the parameter as usual..
What I want to do is: I have an asp.net page which execute a specific functionality and has status line to show to the user, I want to display the status line in another page (let's call it 'statuspage'), but because the status is changed many times I don't want to open the statusPage again and again.
How can I implement Thanks.

One way could be to open the new status window using a custom name.
Any subsequently windows opening calls should refresh the already created window.

Related

Find out the transport request of an application

I Have created a application, in SAP ABAP and also I have generated a request number for that application, no I have forgot which is my request number since there are many requests in development server.
So, can someone help me how I can find out my request number, from my application.
Either you start transaction SE10, if necessary enter your user name (should be there by default) and hit Enter. You'll get a complete list if your transports, you just have to find the one, you need.
Or you start the transaction where you developed your application (you did not specify, if it is a program than SE38 or SE80, if it is a function module than SE37, SE24 for classes, etc (however in SE80 you can see everything)) enter the program name and go to menu: Goto / Object directory entry, a popup comes up, now click the button 'Lock overview'. Another popup comes up and tells you, which transport contains your object.
Steps to Identify all the request numbers of an object/application.
Open 'SE38'.
Provide your object/application name.
Click on 'Display Button'.
In the Menu bar click on 'Utilities'.
Click on 'Versions' --> 'Version Management'.
Now we can find all the request numbers of that object/application.

Using SignalR to display row by row processing of Excel fileUpload

I am trying to figure out how can i use FileUpload along with signalR where i can start processing the uploaded Excel file row by row(without waiting for the file to be fully uploaded).
So i have a large(could be upto 2GB, but consider on average to be 100 mb) Excel file being uploaded, i want to start display the progress in Percentage as well as display all the rows that were processed and if any error occurred during the processing of that row.
Any links to an article will be appreciated.
I have created a decoupled message bus proxy (Eventaggregator proxy) for SignalR.
This fits your use case perfectly, in your case I would fire events while processsing the file. This will be automatically forwarded to the cients, you can also constraint so that only the user that uploaded the file will see events generated by that file upload.
Please check this blog post I made for a insight into the library
http://andersmalmgren.com/2014/05/27/client-server-event-aggregation-with-signalr/
Demo
https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy/tree/master/SignalR.EventAggregatorProxy.Demo.MVC4

How to send only one email when error occurs in aspx.net

So I have an aspx application that generates an error when the database goes down. I would like the application to send one and only one error when this occurs. Otherwise if multiple users hit the application I could get tons of emails, especially because the page refreshes.
I don’t want to use a database because that may be the reason for the error. I tried using a session variable, but it didn’t work. Any ideas?
My session variable code:
'We only want to send out this email if we it has not yet been sent this session
If Session("AlreadySentStaleDBemail") Is Nothing Then
SendEmailToTeam("The Results Database has not inserted any entries in over 60 minutes.")
Session("AlreadySentStaleDBemail") = "email sent already"
End If
Try using an application variable:
Application("AlreadySentStaleDBemail")

Stop Processing Of ASP.Net Web Form on Opening an Exe

In my ASP.net application, i have to open a EXE on click of button. When the EXE is open, User should not be allowed to perform any action on the web form, i.e. the exe should behave like a modal popup. I am using the current code to open and return value from EXE.
Dim p As Process
p = Process.Start("D:\VS2010Projects\SignatureCaptureWindows\bin\Debug\SignatureCaptureWindows.exe")
p.WaitForExit()
If (Not p.ExitCode.Equals(0)) Then
Response.Write("Image Successfully saved in Database with ID = " + p.ExitCode.ToString())
DisplaySavedImage(p.ExitCode)
End If
The Exe is opening fine and returning the correct value. However, the user is able to perform action on the web form when the exe is open...
What will be the best way to handle such a scenario ??
Its impossible to do the way you won it. From the moment the user send a submit, or try to open the page, and on code behind you run this exe, then user is wait for the results - in this time you can not make the user to not do anything else - you can not lock the browser, user can close it, reload it, open again the same page, etc.
What you can do is to lock this process using Mutex and not allow to run again if all ready run it.
Mutex on msdn with example : http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx

Sending alert to pages in asp.net

I am working on web application , in my project there is some type of testing and task assignment to employees.
Now when an employee complete a task and assigned to a user the user automatically get the message on his page ( there is 3 user accessing application , one is admin , second is tester and third is verifier ...both of them works on different pages , now when admin assign a task the tester automatically get a notification " new message " ( for this i am using master page)..on whatever page the tester is on working... now if the tester is completes it 's task and assign to verifier , verifier must get notification "new message" ... and so on..)
for this a have put a button on master page ..and also i have make a windows service that runs on every minute , now my problem is how i sent the message from windows service to my master page button ( that i change text of button).
Is this idea working ?
Why do you need to window service to run in background? Is there any specific reason to have the windows service for these requirements?
As per your detailed description what I understood is that when the employee completes a task and assigned to a user the user automatically get the message on his page. So when the employee is working and completed means they will click on some button that their work is completed. Then while clicking on the button, you just write the code for sending the mail to the tester. like the same way, when the tester is completed their work and click on the testing completes, send a mail to the reviewer and so on..Then where is the need to have a window service for this to send the mails?
All the requirements can be achieved through the simple send mail code.
Let us know if you need any more help or if you don't understand the exact scenario or if anything is missing in the requirements.
Hope it will be helpful to you.
I don't think it is possible to send from a windows service informations to asp.page. You can create a button that can query a webservice about new tasks (but you are counting on the user to press it).
Another more "friendly" way is to have a timer in javascript that uses ajax requests to get new tasks.

Resources