Showing posts with label back. Show all posts
Showing posts with label back. Show all posts

Thursday, March 29, 2012

Server side operation from javascript

Hi
I want to do some server side operation on close of a browser. I created
a server side html button and invoked a post back event on close of
browser something like
__doPostBack('btnUnlock',''); What I realised this is unreliable as the
operation is yet not completed when the browser has closed and
essentially the thread would have been killed. Is there any way in
javascript wherein I post a message to the server, wait for the response
and then the window closes something like send message and wait for the
response.
Regards
RJN
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!RJN <rjn@.yahoo.com> wrote in news:#uju2BxoEHA.556@.tk2msftngp13.phx.gbl:

> Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
>
There is no way to ensure this will fire. Client side javascript can be
disabled or stopped in many ways.
Instead, use the Session End event handler in the Global.asax.
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
[url]http://members.ebay.com/aboutme/spot18/[/url]
Yes, there is a very simple way. Post your message (it doesn't have to be
hacker style _doPostBack, it can be any value passed to the server in one of
legal and documented ways) and, in the response, get server-side to emit
window.close() javascript statement.
Eliyahu
"RJN" <rjn@.yahoo.com> wrote in message
news:%23uju2BxoEHA.556@.tk2msftngp13.phx.gbl...
> Hi
> I want to do some server side operation on close of a browser. I created
> a server side html button and invoked a post back event on close of
> browser something like
> __doPostBack('btnUnlock',''); What I realised this is unreliable as the
> operation is yet not completed when the browser has closed and
> essentially the thread would have been killed. Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
> Regards
> RJN
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

Server side operation from javascript

Hi

I want to do some server side operation on close of a browser. I created
a server side html button and invoked a post back event on close of
browser something like
__doPostBack('btnUnlock',''); What I realised this is unreliable as the
operation is yet not completed when the browser has closed and
essentially the thread would have been killed. Is there any way in
javascript wherein I post a message to the server, wait for the response
and then the window closes something like send message and wait for the
response.

Regards

RJN

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!RJN <rjn@.yahoo.com> wrote in news:#uju2BxoEHA.556@.tk2msftngp13.phx.gbl:

> Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.

There is no way to ensure this will fire. Client side javascript can be
disabled or stopped in many ways.

Instead, use the Session End event handler in the Global.asax.

--
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Yes, there is a very simple way. Post your message (it doesn't have to be
hacker style _doPostBack, it can be any value passed to the server in one of
legal and documented ways) and, in the response, get server-side to emit
window.close() javascript statement.

Eliyahu

"RJN" <rjn@.yahoo.com> wrote in message
news:%23uju2BxoEHA.556@.tk2msftngp13.phx.gbl...
> Hi
> I want to do some server side operation on close of a browser. I created
> a server side html button and invoked a post back event on close of
> browser something like
> __doPostBack('btnUnlock',''); What I realised this is unreliable as the
> operation is yet not completed when the browser has closed and
> essentially the thread would have been killed. Is there any way in
> javascript wherein I post a message to the server, wait for the response
> and then the window closes something like send message and wait for the
> response.
> Regards
> RJN
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Monday, March 26, 2012

Server side-error occurred on sending debug HTTP request.

I got a new machine this week. Prior to that, I backed up my WWWROOT folder.

Now I have the new machine, moved my files back.

I have one projet, though, that refuses to debug/launch:

================================================
Error while trying to run project: Unable to start debugging on the web
server. Server side-error occurred on sending debug HTTP request.

Make sure the server is operating correctly. Verify there are no syntax
errors in web.config by doing a Debug.Start Without Debugging. You may also
want to refer to the ASP.NET and ATL Server debugging topic in the online
documentation.
================================================

According to MS, the likely cause is a bad web.config file. However, this is
the same file that worked on my last machine, and it's the exact same file
currently running on our live server just fine.

So, could there be another culprit here? Anything else I should look at?

-DarrelIs your IIS configured right... You have to config your folder as a
application folder in the IIS
"darrel" <notreal@.nowhere.com> escreveu na mensagem
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this week. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ================================================
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ================================================
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
Is it possible that you had the Web declared as an Application in IIS but
you have done that on the new machine?

Ken

Microsoft MVP [ASP.NET]

"darrel" <notreal@.nowhere.com> wrote in message
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this week. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ================================================
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ================================================
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
> Is your IIS configured right... You have to config your folder as a
> application folder in the IIS

Yea. I dunno what happened. I destroyed all my project files, made a new
project, reimported all the files (including the web.config) and things were
back to normal.

Must have been a VS.net bug.

Surprise. ;o)

-Darrel

Server side-error occurred on sending debug HTTP request.

I got a new machine this w. Prior to that, I backed up my WWWROOT folder.
Now I have the new machine, moved my files back.
I have one projet, though, that refuses to debug/launch:
========================================
========
Error while trying to run project: Unable to start debugging on the web
server. Server side-error occurred on sending debug HTTP request.
Make sure the server is operating correctly. Verify there are no syntax
errors in web.config by doing a Debug.Start Without Debugging. You may also
want to refer to the ASP.NET and ATL Server debugging topic in the online
documentation.
========================================
========
According to MS, the likely cause is a bad web.config file. However, this is
the same file that worked on my last machine, and it's the exact same file
currently running on our live server just fine.
So, could there be another culprit here? Anything else I should look at?
-DarrelIs your IIS configured right... You have to config your folder as a
application folder in the IIS
"darrel" <notreal@.nowhere.com> escreveu na mensagem
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this w. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ========================================
========
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ========================================
========
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
>
Is it possible that you had the Web declared as an Application in IIS but
you have done that on the new machine?
Ken
Microsoft MVP [ASP.NET]
"darrel" <notreal@.nowhere.com> wrote in message
news:eVOxrZb1FHA.3256@.TK2MSFTNGP09.phx.gbl...
>I got a new machine this w. Prior to that, I backed up my WWWROOT
>folder.
> Now I have the new machine, moved my files back.
> I have one projet, though, that refuses to debug/launch:
> ========================================
========
> Error while trying to run project: Unable to start debugging on the web
> server. Server side-error occurred on sending debug HTTP request.
> Make sure the server is operating correctly. Verify there are no syntax
> errors in web.config by doing a Debug.Start Without Debugging. You may
> also want to refer to the ASP.NET and ATL Server debugging topic in the
> online documentation.
> ========================================
========
> According to MS, the likely cause is a bad web.config file. However, this
> is the same file that worked on my last machine, and it's the exact same
> file currently running on our live server just fine.
> So, could there be another culprit here? Anything else I should look at?
> -Darrel
>
> Is your IIS configured right... You have to config your folder as a
> application folder in the IIS
Yea. I dunno what happened. I destroyed all my project files, made a new
project, reimported all the files (including the web.config) and things were
back to normal.
Must have been a VS.net bug.
Surprise. ;o)
-Darrel

Server Transfer and Back/Refresh...

Apparently, our developers used "server transfer" in our ASP.NET, and
because of this Back/Refresh presses by users are problematic. Apparently
the server has information about state and other things that the browser
does not. The application could get very on Back/Refresh presses.
Is the use of "server transfer' just a bad idea for our type of application?
Can we prevent or nullify Back/Refresh presses using javascript? Bad idea?
Any words or links will be greatly appreciated!
JamesHi James,
I think you have to set EnableViewStateMac property of page directive
to true for not to tamper your session or view state values. Also set
SmartNavigation to true.
Check the below link.
http://msdn.microsoft.com/library/d... />
onPage.asp
Cheers,
Kris
> Is the use of "server transfer' just a bad idea for our type of
> application?
Yes and no. Everything has it's place but mostly you should avoid to use
Server.Transfer just because of those problems.

>Can we prevent or nullify Back/Refresh presses using javascript?
Afraid no. The user is in control and it's hard to prevent him doing that.
George.
"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:%23H0blalNGHA.1288@.TK2MSFTNGP09.phx.gbl...
> Apparently, our developers used "server transfer" in our ASP.NET, and
> because of this Back/Refresh presses by users are problematic. Apparently
> the server has information about state and other things that the browser
> does not. The application could get very on Back/Refresh
> presses.
> Is the use of "server transfer' just a bad idea for our type of
> application?
> Can we prevent or nullify Back/Refresh presses using javascript? Bad
> idea?
> Any words or links will be greatly appreciated!
> James
>
Thus wrote James,

> Apparently, our developers used "server transfer" in our ASP.NET, and
> because of this Back/Refresh presses by users are problematic.
> Apparently the server has information about state and other things
> that the browser does not. The application could get very on
> Back/Refresh presses.
> Is the use of "server transfer' just a bad idea for our type of
> application? Can we prevent or nullify Back/Refresh presses using
> javascript? Bad idea?
Bad idea. Turn off scripting and... boom.
There's really just one way to fix this: Make your application immune agains
t
these effects, like using Redirect-After-Post or applying synchronizer token
s
in your web forms.
Cheers,
--
Joerg Jooss
news-reply@.joergjooss.de

Server Transfer and Back/Refresh...

Apparently, our developers used "server transfer" in our ASP.NET, and
because of this Back/Refresh presses by users are problematic. Apparently
the server has information about state and other things that the browser
does not. The application could get very confused on Back/Refresh presses.

Is the use of "server transfer' just a bad idea for our type of application?
Can we prevent or nullify Back/Refresh presses using javascript? Bad idea?

Any words or links will be greatly appreciated!

JamesHi James,

I think you have to set EnableViewStateMac property of page directive
to true for not to tamper your session or view state values. Also set
SmartNavigation to true.

Check the below link.
http://msdn.microsoft.com/library/d...l/cpconPage.asp

Cheers,
Kris
> Is the use of "server transfer' just a bad idea for our type of
> application?
Yes and no. Everything has it's place but mostly you should avoid to use
Server.Transfer just because of those problems.

>Can we prevent or nullify Back/Refresh presses using javascript?

Afraid no. The user is in control and it's hard to prevent him doing that.

George.

"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:%23H0blalNGHA.1288@.TK2MSFTNGP09.phx.gbl...
> Apparently, our developers used "server transfer" in our ASP.NET, and
> because of this Back/Refresh presses by users are problematic. Apparently
> the server has information about state and other things that the browser
> does not. The application could get very confused on Back/Refresh
> presses.
> Is the use of "server transfer' just a bad idea for our type of
> application?
> Can we prevent or nullify Back/Refresh presses using javascript? Bad
> idea?
> Any words or links will be greatly appreciated!
> James
Thus wrote James,

> Apparently, our developers used "server transfer" in our ASP.NET, and
> because of this Back/Refresh presses by users are problematic.
> Apparently the server has information about state and other things
> that the browser does not. The application could get very confused on
> Back/Refresh presses.
> Is the use of "server transfer' just a bad idea for our type of
> application? Can we prevent or nullify Back/Refresh presses using
> javascript? Bad idea?

Bad idea. Turn off scripting and... boom.

There's really just one way to fix this: Make your application immune against
these effects, like using Redirect-After-Post or applying synchronizer tokens
in your web forms.

Cheers,
--
Joerg Jooss
news-reply@.joergjooss.de

Saturday, March 24, 2012

server.execute - can i call a perl script on another server ?

How can I call a perl script from my asp.net page and get back the results ?

What problem have you had when you tried?

Jeff