|
Hey everyone, have a fun one for ya'll
I am about to start working on a C# web service project. The primary goals of this application are to provide a web service interface for a DOS application. The crux of the problem is this application can run for a long time and therefore does not lend itself to a standard system.diagnostic.process mentality within an HTTP session thread.
Ideally, what I would like to have happen is a call is made to a web service, the objects are collected and/or created from that call, and then a call is made to a Windows service that handles the command execution via some kind of queueing mechanism. In other words, I want a web service to make a call to another process (windows service) that will perform the execution of a DOS application in a asynchronous fashion; the web service merely calls a public method in a windows service passing in variables and moves on. This would negate the HTTP timeouts that would normally come into play. An anicallary benefit of this ideology is I can do a 'pulse check' of the queue to determine how the items in the queue are progressing and therefore give the user a progress bar showing outcome.
Before you say it, yeah I know its bloated but the number of submissions to the queue would be very small (less than 20 per day) so scalability is not an issue.
At first blush, named pipes seemed to be the way to go. However, after doing some digging it seems that named pipes were designed more for modifying variables in another process whereas I want to call a method (or more specifically several methods...) in a windows service and then get some kind of response from the method quickly (such as a boolean that says the items were submitted to the queue, not the end result of their execution). More specifically, I want to call one method to submit the items into a queue and then make calls later on to determine the outcome of the items submitted to the queue.
|
|
|
|
|
A named pipe is the perfect solution. You send the request through the pipe to the Windows service, the service acts on the request, and then sends the result back through the pipe to the calling process.
There is no real way to directly call a method in another process, unless both processes are .NET apps and then you can use whatever .NET uses to accomplish that.
The MSDN has some good sample code for creating named pipes and using them.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
I have a table displayed on a page, each row contains a checkbox, before I hit the "Continue" button to go to the next page, I want to loop through the whole table, and check if any of the checkboxes are checked, if checked, I need to get column 3's value of that row. Multiple checkboxes can be checked,I need to pass a string contains all of the column 3 value, and pass this string to the next page.
I don't know how to loop through a table, and how to contruct and pass this string to the next page.
I don't have any ASP experience, can anyone help me write this?
Thanks so much.
kitty
|
|
|
|
|
I believe you need to give your checkboxes and controls Ids, so that you can get their values out of the form. But, I have to admit that it's a long time since I did ASP, ASP.NET is so much nicer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
As this has to be done in the browser, it has nothing at all to do with ASP. You have to use client script, i.e. Javascript.
Don't you have any more direct way to identify the fields than to loop through the elements of the document?
If the id of the checkboxes are for example Chk_1, Chk_2, et.c., and the id of the elements in column three are Data_1, Data_2, et.c., you can easily access them directly using document.getElementById.
---
Year happy = new Year(2007);
|
|
|
|
|
I've heard from a post on this forum that getElementsByName was discontinued, and that's a shame because it would have been very easy to retrieve your unique NAME of your checkbox collection into an array and work on this array.
Since it seems to be like this, i now use getElementByTagName to retrieve from the DOM, all tags that correspond to <INPUT> and then work on those whose ID correspond to what i want. First to get a count, and then iterate through id's
Example:
var objdiv = document.getElementsByTagName('DIV');
var contar = 0;
for (i=0;i < objdiv.length; i++)
{
if (objdiv[i].getAttribute("name")=='contentitemdiv_'+wid+windice)
contar ++;
}
for (i=1;i<=contar;i++)
{
var wobjcontentitem = document.getElementById ('contentitemdiv_'+wid+windice.toString()+i.toString());
}
if there's more simple, call me!
|
|
|
|
|
This is my second week using ASP and I've run into some problems with array and split. Please look at the following:
<%Dim x, y, t, z(3)
z = split(t, ".")
x = z(0)
y = z(1)
%>
t = 9.95
I keep getting the following error message:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
What am i doing wrong???
-- modified at 12:27 Tuesday 16th January, 2007
Ty
|
|
|
|
|
Well, for starters, t has no value.
Why are you learning asp ? It totally sucks. Is there any way you can switch to ASP.NET ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Dear Tyrone_whitey,
Remove the Dim statement and Execute. This solves your problem.
Regards,
Manowj
|
|
|
|
|
i have a static html page.
i have a link in it to download a pdf file.
i want to force download the file, not to open it, when user click on it.
but if user had installed acrobotreader in his/her pc, my link open the file directly. but i dont want to act so. i want file to be downloaded.
thanks
rastgar
|
|
|
|
|
You can't force anything with a static HTML page, I don't believe. You'd have to zip the file.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
how about with javascript?
Thanks
Rastgar
|
|
|
|
|
You can't go too far with JavaScript either. You can open in a new window.
|
|
|
|
|
On your server try configing the HTTP headers to include the "Content-disposition" header.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
just call a javascript function with an open command to the link in onclick event.
Example: open("download/file.pdf","_blank");
this will ask you if you want to open or save.
|
|
|
|
|
You want to pop up a message in the browser when the user moves their mouse over a control ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi all,
I have to load a HTML Page(Child) into my ASPX page(Parent) when the page is loaded.
Child Page: The child page is a portal page which requires authentication.Portal site reads my credentials from the header of the parent page when a request is made and navigates to requested page.
Problem: i am using XMLHttpRequest to call the child page, portal site authenticates me by writing a message("please wait while verifying the credentials"). At this point the readystate of XMLHttpRequest object is complete, so i am getting authenticating HTML Page instead of getting the child page.
Is there another way to load the page or what am i doing wrong. Please see the Java script code below
Thanks in Advance.
CODE IS BELOW
function AjaxTest()
{
var xmlHttpObj= (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
//Portal Web page
var Url='http://imsportal.dev/ims/secure/portal/external/tooltip/?cId=45059139&cId=45059152';
if(xmlHttpObj)
{
xmlHttpObj.open("GET",Url,false);
xmlHttpObj.onreadystatechange= function (){
if (xmlHttpObj.readyState==4 || xmlHttpObj.readyState=="complete")
{
var xmlopt=xmlHttpObj.responseText;
document.getElementById('divVnetText').innerText=xmlopt;
document.getElementById('txttest').innerText=xmlopt;
}
}//Function Change state End
xmlHttpObj.send(null);
}
}
Thanks,
Sravan
|
|
|
|
|
Can you not just use an iframe?
|
|
|
|
|
First thanks for replying.
No we are not allowed to use iframes. But even if I use iframes the requesting page is on a portal page, so after authenticating it would redirect me to the requesting page using window.open().
so the entire page is redirected not just the iframe.
Can you tell how i can do this server side with credentials being passed.
Thanks
Thanks,
Sravan
|
|
|
|
|
Sir/Madam
I am Final Year Engineering student. I want to get information about connection of computers at different cites.
Actually if I want to computerize a department of any company which have its offices at several cities then what steps I should follow.
Means how I can connect that no of computers in appropriate manner to get desired output.
I want to make it just like railway reservation system through in which if I enter data at same time then database must be able to prioritize data in sequence to enter in database.
Which database & platform or language I should use to code this kind of project.
Thank You
Ashish Porwal
|
|
|
|
|
Wow! I think he would love to have a checkbox besides the textarea which says 'Post in all forums' in one click, to save trouble of copy paste and cross posting.
|
|
|
|
|
Excellent idea. Should be one for the Suggestions.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Interresting. Then he can actually make a post in Suggestions that actually belongs there...
---
Year happy = new Year(2007);
|
|
|
|
|
Hi,
I've been working on local host to create a webform in asp.net. now I'supposed to deploy it on another server how could I do this?
Thank you
|
|
|
|
|
You could use Visual Studio to copy the project over. In VS2003, it was Project > Copy Project.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|