Server Side Set of Request.Form Variables?
Server Side Set of Request.Form Variables?
am 11.05.2007 19:04:54 von Thomas Lunsford
I have inherited a set of asp pages that I now need to augment. In
order to minimize changes to production code, I would like to make a
"call" to an asp page from a new asp page. Existing code is using
many Request.Form variables, and I would very much prefer not to
change this code. The new page will retrieve data that I would like
to fill into Request.Form variables that are used in the old code.
So, is it possible for me to set Request.Form variables from within an
asp page and then fire off a second page that uses those variables as
well as any Request.Form variables that were passed to the original
page. Additionaly, it should all occur on the server, and the client
would only get a response after all on the server is complete.
Thanks.
-Thomas
Re: Server Side Set of Request.Form Variables?
am 11.05.2007 19:18:43 von reb01501
Thomas Lunsford wrote:
> I have inherited a set of asp pages that I now need to augment. In
> order to minimize changes to production code, I would like to make a
> "call" to an asp page from a new asp page. Existing code is using
> many Request.Form variables, and I would very much prefer not to
> change this code. The new page will retrieve data that I would like
> to fill into Request.Form variables that are used in the old code.
>
> So, is it possible for me to set Request.Form variables from within an
> asp page and then fire off a second page that uses those variables as
> well as any Request.Form variables that were passed to the original
> page. Additionaly, it should all occur on the server, and the client
> would only get a response after all on the server is complete.
>
No. the Request object collections are readonly.
However, you can use Server.Execute to execute code in another page
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: Server Side Set of Request.Form Variables?
am 15.05.2007 22:16:04 von Thomas Lunsford
On May 11, 12:18 pm, "Bob Barrows [MVP]"
wrote:
> Thomas Lunsford wrote:
> > I have inherited a set of asp pages that I now need to augment. In
> > order to minimize changes to production code, I would like to make a
> > "call" to an asp page from a new asp page. Existing code is using
> > many Request.Form variables, and I would very much prefer not to
> > change this code. The new page will retrieve data that I would like
> > to fill into Request.Form variables that are used in the old code.
>
> > So, is it possible for me to set Request.Form variables from within an
> > asp page and then fire off a second page that uses those variables as
> > well as any Request.Form variables that were passed to the original
> > page. Additionaly, it should all occur on the server, and the client
> > would only get a response after all on the server is complete.
>
> No. the Request object collections are readonly.
>
> However, you can use Server.Execute to execute code in another page
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
Bob, Thanks for the reply. I have tried a number of things, and it
appears that I need to create and populate a form on my new page that
gets submitted to the other page. I would like to do this server side
only. Is this possible? I have tried ServerXMLHTTP, and which works
great, but Microsoft has warned against using it in IIS because it can
cause thread deadlocking. So, if I could just perform the submit from
the server, I think my problem would be solved.
-Thomas
Re: Server Side Set of Request.Form Variables?
am 15.05.2007 22:41:16 von reb01501
Thomas Lunsford wrote:
> On May 11, 12:18 pm, "Bob Barrows [MVP]"
> wrote:
>> Thomas Lunsford wrote:
>>> I have inherited a set of asp pages that I now need to augment. In
>>> order to minimize changes to production code, I would like to make a
>>> "call" to an asp page from a new asp page. Existing code is using
>>> many Request.Form variables, and I would very much prefer not to
>>> change this code. The new page will retrieve data that I would like
>>> to fill into Request.Form variables that are used in the old code.
>>
>>> So, is it possible for me to set Request.Form variables from within
>>> an asp page and then fire off a second page that uses those
>>> variables as well as any Request.Form variables that were passed to
>>> the original page. Additionaly, it should all occur on the server,
>>> and the client would only get a response after all on the server is
>>> complete.
>>
>> No. the Request object collections are readonly.
>>
>> However, you can use Server.Execute to execute code in another page
>>
>
> Bob, Thanks for the reply. I have tried a number of things, and it
> appears that I need to create and populate a form on my new page that
> gets submitted to the other page. I would like to do this server side
> only. Is this possible? I have tried ServerXMLHTTP, and which works
> great, but Microsoft has warned against using it in IIS because it can
> cause thread deadlocking.
Could you provide a citation for this? I know they advise against using
the XMLHTTPRequest object in server-side code, but I've never seen an
admonishment against using the XMLHTTPServer object which was designed
to be used in the IIS environment.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: Server Side Set of Request.Form Variables?
am 15.05.2007 23:31:15 von Thomas Lunsford
The following link is a newsgroup posting from a Microsoft employee...
http://groups.google.com/group/microsoft.public.xml.msxml-we brelease/msg/ed0c25d38c8680c2
Our production environment is hallowed ground, so I'm leery of taking
chances, especially after reading the posting in the above link. I
have not yet found a good explanation of all the repercussions of
Isolated Application Protection in IIS, so that spooks me a bit.
I would like to know whether using ServerXMLHTTP is common practice
and whether it has other known limitations/problems. I'm still
learning and researching.
Any information you can provide is greatly appreciated.
Thanks.
-Thomas
Re: Server Side Set of Request.Form Variables?
am 16.05.2007 01:38:25 von reb01501
Thomas Lunsford wrote:
> The following link is a newsgroup posting from a Microsoft employee...
>
> http://groups.google.com/group/microsoft.public.xml.msxml-we brelease/msg/ed0c25d38c8680c2
>
> Our production environment is hallowed ground, so I'm leery of taking
> chances, especially after reading the posting in the above link. I
> have not yet found a good explanation of all the repercussions of
> Isolated Application Protection in IIS, so that spooks me a bit.
>
> I would like to know whether using ServerXMLHTTP is common practice
> and whether it has other known limitations/problems. I'm still
> learning and researching.
>
> Any information you can provide is greatly appreciated.
>
Ah! Now I remember that.
I did not realize you were posting back to the same server.
There are no repercussions outside of extra resource use to using Isolated
Application Protection that i am aware of.
That post was written back in 2001 so this may no longer be an issue for
IIS6. I will run it by my fellow mvps.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: Server Side Set of Request.Form Variables?
am 16.05.2007 16:44:24 von Thomas Lunsford
Great. Thanks for the update. I am interested in hearing what your
colleagues have to say.
Thanks again.
-Thomas
Re: Server Side Set of Request.Form Variables?
am 16.05.2007 16:54:29 von exjxw.hannivoort
Thomas Lunsford wrote on 16 mei 2007 in
microsoft.public.inetserver.asp.general:
>
> Great. Thanks for the update. I am interested in hearing what your
> colleagues have to say.
What update?
[please always quote on usenet]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: Server Side Set of Request.Form Variables?
am 16.05.2007 17:38:47 von Thomas Lunsford
http://groups.google.com/group/microsoft.public.inetserver.a sp.general/browse_thread/thread/d77516b4d97413d2/3f2c1eb9a8b 6f27b?lnk=st&q=tlunsford&rnum=1&hl=en
Re: Server Side Set of Request.Form Variables?
am 16.05.2007 21:24:33 von reb01501
Bob Barrows [MVP] wrote:
> Thomas Lunsford wrote:
>> The following link is a newsgroup posting from a Microsoft
>> employee...
>>
>>
http://groups.google.com/group/microsoft.public.xml.msxml-we brelease/msg/ed0c25d38c8680c2
>>
>> Our production environment is hallowed ground, so I'm leery of taking
>> chances, especially after reading the posting in the above link. I
>> have not yet found a good explanation of all the repercussions of
>> Isolated Application Protection in IIS, so that spooks me a bit.
>>
>> I would like to know whether using ServerXMLHTTP is common practice
>> and whether it has other known limitations/problems. I'm still
>> learning and researching.
>>
>> Any information you can provide is greatly appreciated.
>>
> Ah! Now I remember that.
> I did not realize you were posting back to the same server.
>
> There are no repercussions outside of extra resource use to using
> Isolated Application Protection that i am aware of.
>
> That post was written back in 2001 so this may no longer be an issue
> for IIS6. I will run it by my fellow mvps.
>
No replies to my queries as yet. However, I do want to point out that
the version of ServerXMLHTTP in that article was 4.0. Version 6 of the
MSXML Parser is the current version. Unfortunately, I do not know if the
new version corrects the problem pointed out in that article. I'm not
even certain whom I could ask, given the .Net emphasis these days.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: Server Side Set of Request.Form Variables?
am 16.05.2007 21:59:24 von exjxw.hannivoort
Thomas Lunsford wrote on 16 mei 2007 in
microsoft.public.inetserver.asp.general:
> http://groups.google.com/group/microsoft.public.inetserver.a sp.general/
> browse_thread/thread/d77516b4d97413d2/3f2c1eb9a8b6f27b?lnk=s t&q=tlunsfo
> rd&rnum=1&hl=en
>
Are you replying on something I wrote?
[please always quote on usenet]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: Server Side Set of Request.Form Variables?
am 17.05.2007 07:38:20 von Thomas Lunsford
On May 16, 2:24 pm, "Bob Barrows [MVP]"
wrote:
> Bob Barrows [MVP] wrote:
> > Thomas Lunsford wrote:
> >> The following link is a newsgroup posting from a Microsoft
> >> employee...
>
> http://groups.google.com/group/microsoft.public.xml.msxml-we brelease/...
>
>
>
>
>
>
>
> >> Our production environment is hallowed ground, so I'm leery of taking
> >> chances, especially after reading the posting in the above link. I
> >> have not yet found a good explanation of all the repercussions of
> >> Isolated Application Protection in IIS, so that spooks me a bit.
>
> >> I would like to know whether using ServerXMLHTTP is common practice
> >> and whether it has other known limitations/problems. I'm still
> >> learning and researching.
>
> >> Any information you can provide is greatly appreciated.
>
> > Ah! Now I remember that.
> > I did not realize you were posting back to the same server.
>
> > There are no repercussions outside of extra resource use to using
> > Isolated Application Protection that i am aware of.
>
> > That post was written back in 2001 so this may no longer be an issue
> > for IIS6. I will run it by my fellow mvps.
>
> No replies to my queries as yet. However, I do want to point out that
> the version of ServerXMLHTTP in that article was 4.0. Version 6 of the
> MSXML Parser is the current version. Unfortunately, I do not know if the
> new version corrects the problem pointed out in that article. I'm not
> even certain whom I could ask, given the .Net emphasis these days.
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.- Hide quoted text -
>
> - Show quoted text -
Bob,
Thank you very much for your help. Having done more research and not
finding and significant issues myself, I am proceeding with using
ServerXMLHTTP. If you do happen to find out additional info, please
update the thread. I will do the same if this turns out badly. :-)
-Thomas
Re: Server Side Set of Request.Form Variables?
am 17.05.2007 08:09:18 von Thomas Lunsford
On May 16, 2:59 pm, "Evertjan." wrote:
> Thomas Lunsford wrote on 16 mei 2007 in
> microsoft.public.inetserver.asp.general:
>
> >http://groups.google.com/group/microsoft.public.inetserver. asp.general/
> > browse_thread/thread/d77516b4d97413d2/3f2c1eb9a8b6f27b?lnk=s t&q=tlunsfo
> > rd&rnum=1&hl=en
>
> Are you replying on something I wrote?
>
> [please always quote on usenet]
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
Evertjan,
Ok, enough already. EXCUUUUSSSEEE ME for breaking the "rules". I
looked at your last twenty or so posts (Google Groups is very handy
for such things, as well as for viewing an entire entire thread), and
in most cases you provide little-to-no useful information. Your
efforts at policing the newsgroups are actually producing more noise
than you're preventing. You seem to know a thing or two about a thing
or two, but enough with the policing already. You may be the greatest
person around, but take a look at your posting history and try to
think objectively about how the type of person who seems to be behind
those posts.
Don't make me type your email address here without the x'es... LOL...
Just kidding... I wouldn't really do that.
-Thomas
Re: Server Side Set of Request.Form Variables?
am 17.05.2007 10:10:48 von exjxw.hannivoort
Thomas Lunsford wrote on 17 mei 2007 in
microsoft.public.inetserver.asp.general:
> On May 16, 2:59 pm, "Evertjan." wrote:
>> Thomas Lunsford wrote on 16 mei 2007 in
>> [please always quote on usenet]
> Ok, enough already. EXCUUUUSSSEEE ME for breaking the "rules".
Excuse accepted. You seem to have learned from it.
> I
> looked at your last twenty or so posts (Google Groups is very handy
> for such things, as well as for viewing an entire entire thread), and
> in most cases you provide little-to-no useful information.
So you think usenet is for providing useful information?
That is what I think too, but that is not in itself the goal of usenet,
as I read it in the Netiquette.
The "rule" [your word] of quoting is in netiquette and is an important
one helping people to quickly and easily understand what you are
responding to. I hope you have learned from it.
> Your
> efforts at policing the newsgroups are actually producing more noise
> than you're preventing.
It could be youe meaning, not mine. But that could be because you are
easily annoyed if someone shows you your mistake publicly.
> You seem to know a thing or two about a thing
> or two, but enough with the policing already.
> You may be the greatest person around,
If you say so, not my words or idea. To be such is not my goal in
cyberlife. Perhaps it is yours?
> but take a look at your posting history and try to
> think objectively about how the type of person who seems to be behind
> those posts.
Why would I? I really don't think that is very useful, unless one thinks
a person should leave his principles behind and just act to be liked.
> Don't make me type your email address here without the x'es... LOL...
> Just kidding... I wouldn't really do that.
I am glad you don't.
Giving the possibility to be privately emailed seems polite to me,
as I have done for the last 12+ years on usenet.
I am glad you practice the same principle, Thomas.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: Server Side Set of Request.Form Variables?
am 17.05.2007 13:29:25 von Dave Anderson
"Thomas Lunsford" wrote:
> ...You seem to know a thing or two about a thing or two, but
> enough with the policing already...
Evertjan isn't the only one of us who takes offense when posters treat
USENET like email. He is just the most vocal. Personally, I had the same
"WTF?" reaction to your post when I read it. I had discarded the earlier
part of the thread after reading it hours earlier, so your post appeared to
be a non sequitur.
This is not to say I was ignoring the thread. On the contrary, I was
interested in Bob's answer. But even as a follower of the thread who reads
the group in a threaded fashion, I had no idea who or what you were
responding to, and thought Evertjan's response was perfectly reasonable.
I will part with a final thought. Speculating on the "type of person" behind
Evertjan's posts is rude. Before levelling such charges, I try to remember
that plain text is a poor medium for some types of nuanced expression.
Something written as humor may read as anger. More importantly, plain text
may mask (as I believe it does with Evertjan) cultural and language
differences. Do you believe you always know when someone is using his native
language?
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Re: Server Side Set of Request.Form Variables?
am 18.05.2007 11:17:58 von Anthony Jones
"Thomas Lunsford" wrote in message
news:1179380300.593283.34930@e65g2000hsc.googlegroups.com...
> On May 16, 2:24 pm, "Bob Barrows [MVP]"
> wrote:
> > Bob Barrows [MVP] wrote:
> > > Thomas Lunsford wrote:
> > >> The following link is a newsgroup posting from a Microsoft
> > >> employee...
> >
> > http://groups.google.com/group/microsoft.public.xml.msxml-we brelease/...
> >
> >
> >
> >
> >
> >
> >
> > >> Our production environment is hallowed ground, so I'm leery of taking
> > >> chances, especially after reading the posting in the above link. I
> > >> have not yet found a good explanation of all the repercussions of
> > >> Isolated Application Protection in IIS, so that spooks me a bit.
> >
> > >> I would like to know whether using ServerXMLHTTP is common practice
> > >> and whether it has other known limitations/problems. I'm still
> > >> learning and researching.
> >
> > >> Any information you can provide is greatly appreciated.
> >
> > > Ah! Now I remember that.
> > > I did not realize you were posting back to the same server.
> >
> > > There are no repercussions outside of extra resource use to using
> > > Isolated Application Protection that i am aware of.
> >
> > > That post was written back in 2001 so this may no longer be an issue
> > > for IIS6. I will run it by my fellow mvps.
> >
> > No replies to my queries as yet. However, I do want to point out that
> > the version of ServerXMLHTTP in that article was 4.0. Version 6 of the
> > MSXML Parser is the current version. Unfortunately, I do not know if the
> > new version corrects the problem pointed out in that article. I'm not
> > even certain whom I could ask, given the .Net emphasis these days.
> >
> > --
> > Microsoft MVP -- ASP/ASP.NET
> > Please reply to the newsgroup. The email account listed in my From
> > header is my spam trap, so I don't check it very often. You will get a
> > quicker response by posting to the newsgroup.- Hide quoted text -
> >
> > - Show quoted text -
>
> Bob,
>
> Thank you very much for your help. Having done more research and not
> finding and significant issues myself, I am proceeding with using
> ServerXMLHTTP. If you do happen to find out additional info, please
> update the thread. I will do the same if this turns out badly. :-)
>
> -Thomas
>
I don't think there have been any significant changes in the way WinHTTP /
IIS works to make the danger of deadlocks go away allthough IIS6 does
contain a means to kill a dead process. The fundemental problem will be
that a worker thread in the process will be waiting for a request to
complete that requires the use of another worker thread in the process.
You could use a test machine to reproduce it. Set AspProcessorThreadMax to
2. Have Page1.asp do something that takes a few seconds to complete
(preferable not too CPU intensive, I use a small VB6 dll that exposes the
sleep API) then makes a ServerXMLHTTP (or WinHTTP) request to Page2.asp.
What page2.asp does doesn't really matter.
Now fireup a couple of browser instances (don't use tabs in the same
browser) and in each in quick succession visit page1.asp. If you have a
dual processor machine you may need 4 (or even 8 if you have a monster).
Now, if the deadlock problem remains, what will happen is that the page1
executions will be occupying all the available worker threads by the time
each of them make a request to page2. All requests to page2 will queue
waiting for a worker thread to become available, however, none ever do
because they all busy waiting for these queued requests to complete.
There is also another deadlock situation relevant to what you are trying to
do if the application makes use of session variables. In order make the
original form target believe that the request is coming from an existing
session the ASPSESSIONxxxxxx cookie will need to be copied from the original
request to the WinHTTP one.
Unfortunately that will imeadiately deadlock no matter how many worker
threads are available. The problem is that the Session object single
threaded. Since the current thread making the request all ready has the
session object the request is queued waiting for the current thread to
release it, however, that won't happen until the queued request is
completed. Deadlock.
Hence if the form target page uses the session object this approach is
doomed.
I think you may need to reconsider the 'untouchable' status of the existing
page.
Re: Server Side Set of Request.Form Variables?
am 19.05.2007 17:18:32 von reb01501
Thomas Lunsford wrote:
>>>> Our production environment is hallowed ground, so I'm leery of
>>>> taking chances, especially after reading the posting in the above
>>>> link. I have not yet found a good explanation of all the
>>>> repercussions of Isolated Application Protection in IIS, so that
>>>> spooks me a bit.
>>
>>>> I would like to know whether using ServerXMLHTTP is common practice
>>>> and whether it has other known limitations/problems. I'm still
>>>> learning and researching.
>>
>>>> Any information you can provide is greatly appreciated.
>>
>>> Ah! Now I remember that.
>>> I did not realize you were posting back to the same server.
>>
>>> There are no repercussions outside of extra resource use to using
>>> Isolated Application Protection that i am aware of.
>>
> Thank you very much for your help. Having done more research and not
> finding and significant issues myself, I am proceeding with using
> ServerXMLHTTP. If you do happen to find out additional info, please
> update the thread. I will do the same if this turns out badly. :-)
>
Just had a response from Carl Daniels, a fellow MVP:
**************************
I can't say absolutely for certain, but I wouldn't expect the situation to
have changed in IIS6, since it's not really an IIS bug, nor is it really a
ServerXMLHTTP bug. Rather, it's a natural consequence of thread starvation
in the IIS worker thread pool. As long as the target application and the
requesting application are served by different processes ("high" isolalation
or different app pools) there shouldn't be a problem.
**************************
Definitely look into assigning separate app pools to each application
involved. This will remove the requirement for "high" isolation.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: Server Side Set of Request.Form Variables?
am 19.05.2007 21:25:35 von Anthony Jones
"Bob Barrows [MVP]" wrote in message
news:e2IMujimHHA.3760@TK2MSFTNGP05.phx.gbl...
> Thomas Lunsford wrote:
> >>>> Our production environment is hallowed ground, so I'm leery of
> >>>> taking chances, especially after reading the posting in the above
> >>>> link. I have not yet found a good explanation of all the
> >>>> repercussions of Isolated Application Protection in IIS, so that
> >>>> spooks me a bit.
> >>
> >>>> I would like to know whether using ServerXMLHTTP is common practice
> >>>> and whether it has other known limitations/problems. I'm still
> >>>> learning and researching.
> >>
> >>>> Any information you can provide is greatly appreciated.
> >>
> >>> Ah! Now I remember that.
> >>> I did not realize you were posting back to the same server.
> >>
> >>> There are no repercussions outside of extra resource use to using
> >>> Isolated Application Protection that i am aware of.
> >>
> > Thank you very much for your help. Having done more research and not
> > finding and significant issues myself, I am proceeding with using
> > ServerXMLHTTP. If you do happen to find out additional info, please
> > update the thread. I will do the same if this turns out badly. :-)
> >
> Just had a response from Carl Daniels, a fellow MVP:
> **************************
> I can't say absolutely for certain, but I wouldn't expect the situation to
> have changed in IIS6, since it's not really an IIS bug, nor is it really a
> ServerXMLHTTP bug. Rather, it's a natural consequence of thread
starvation
> in the IIS worker thread pool. As long as the target application and the
> requesting application are served by different processes ("high"
isolalation
> or different app pools) there shouldn't be a problem.
> **************************
> Definitely look into assigning separate app pools to each application
> involved. This will remove the requirement for "high" isolation.
>
Using a separate app pool is the same as "high" isolation, its just that the
former is a IIS6 concept where the latter is IIS5 concept. They deliver
somewhat similar advantages but with app pools being more flexable.
Thomas hasn't actually specified the version of IIS involved, if 5 then
"high" isolation mat still be necessary to avoid the chance of a dead lock.
Assuming he wishes to pursue this approach at all now.
Problem with having two separate apps may be that the two parts of this
problem may need to share session info.
Re: Server Side Set of Request.Form Variables?
am 20.05.2007 07:40:57 von Adrienne Boswell
Gazing into my crystal ball I observed Thomas Lunsford
writing in news:1179382158.487771.220030
@q75g2000hsh.googlegroups.com:
> EXCUUUUSSSEEE ME for breaking the "rules". I
> looked at your last twenty or so posts (Google Groups is very handy
> for such things, as well as for viewing an entire entire thread)
The problem is that a lot of people use newsreaders and get their news from
news servers, not Google. Those servers may only keep a message for a
short amount of time, so the preceding message(s) may be gone by the time
someone else is reading the response.
If you already have your newsreader open, why would you want to open a
browser as well to Google something?
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share