Saturday, March 31, 2012
Web server cluster related problem
the Network Load Balancing feature of Application Center. We have
synchronized the machineKey in machine.config on the 3 web-servers, so we
can utilize a random algorithm for server selection for requests. The
application does not use either session state or application state.
We recently upgraded to .NET Framework 1.1 (including the hotfix for the
"doPostback bug"), and after that we experience a mysterious problem on our
production servers:
Let's call the servers A, B and C. Let's say you select a page (a GET
request), and it is served by either server A or B. The page contains a
form, so when you post it back and server C gets to handle the request, the
response appears to be like the original GET request. The page does not seem
to process the page as a POST request.
The same thing happens if the original page comes from server C, and the
postback is processed by server A or B.
Obviously, it seems that there is something wrong on server C.
We have checked everything we can think of. Among them the .NET Framework
installation, machine.config, and that the web application files are the
same.
Since this is a production environment, we are not allowed to use debug
tools. However, we have enabled tracing. When this problem occurs, we see
that
1) The form collection contains the posted data
2) That LoadViewState and ProcessPostData has been executed, both of which
are not executed on a GET request.
3) SessionId is unchanged
But even so, when the request is processed by the called page, it is
processed as a GET request.
Now I don't know where to keep on looking. Does it ring a bell for anyone?
Thanks,
HelgeAn ASP.NET webform detects if a request is a postback by comparing the
hash value in the viewstate of a page. This hash value is generated
by using a validation key. In the default setting, ASP.NET will
automatically generate an random validation key for each web server.
Thus, sending a POST request to a webform on a different web server
will not be recognized as a POST request because the validation key is
different.
Try changing the machine.config or web.config on each web server to
use a static validation key.
For example,
<machineKey validationKey="Some static key" validation="SHA1"/
Tommy,
"Helge Kalnes" <helge.kalnes@.electricfarm.no> wrote in message news:<ejjxuus#DHA.2072@.TK2MSFTNGP11.phx.gbl>...
> We are running an ASP.NET application on a cluster of 3 web-servers, using
> the Network Load Balancing feature of Application Center. We have
> synchronized the machineKey in machine.config on the 3 web-servers, so we
> can utilize a random algorithm for server selection for requests. The
> application does not use either session state or application state.
> We recently upgraded to .NET Framework 1.1 (including the hotfix for the
> "doPostback bug"), and after that we experience a mysterious problem on our
> production servers:
> Let's call the servers A, B and C. Let's say you select a page (a GET
> request), and it is served by either server A or B. The page contains a
> form, so when you post it back and server C gets to handle the request, the
> response appears to be like the original GET request. The page does not seem
> to process the page as a POST request.
> The same thing happens if the original page comes from server C, and the
> postback is processed by server A or B.
> Obviously, it seems that there is something wrong on server C.
> We have checked everything we can think of. Among them the .NET Framework
> installation, machine.config, and that the web application files are the
> same.
> Since this is a production environment, we are not allowed to use debug
> tools. However, we have enabled tracing. When this problem occurs, we see
> that
> 1) The form collection contains the posted data
> 2) That LoadViewState and ProcessPostData has been executed, both of which
> are not executed on a GET request.
> 3) SessionId is unchanged
> But even so, when the request is processed by the called page, it is
> processed as a GET request.
> Now I don't know where to keep on looking. Does it ring a bell for anyone?
> Thanks,
> Helge
Thanx, but as you can see in my original message we have already done that.
If the machineKeys hadn't been synchronized we would have got an exception.
And in addition when switching between servers A and B there is no problem.
We have of course double checked the machineKeys several times.
I found a KB article
(http://support.microsoft.com/defaul...b;EN-US;323744), but the
problem described here is related ASP.NET 1.0 and is supposed to be fixed in
1.1. I am not able to reproduce a problem as described in this article, but
it is of course possible that the problem is related to this.
:) Helge
"Tommy" <Websoftwares@.Hotmail.com> wrote in message
news:a85edaaf.0402241033.7fa789b8@.posting.google.c om...
> An ASP.NET webform detects if a request is a postback by comparing the
> hash value in the viewstate of a page. This hash value is generated
> by using a validation key. In the default setting, ASP.NET will
> automatically generate an random validation key for each web server.
> Thus, sending a POST request to a webform on a different web server
> will not be recognized as a POST request because the validation key is
> different.
> Try changing the machine.config or web.config on each web server to
> use a static validation key.
> For example,
> <machineKey validationKey="Some static key" validation="SHA1"/>
> Tommy,
> "Helge Kalnes" <helge.kalnes@.electricfarm.no> wrote in message
news:<ejjxuus#DHA.2072@.TK2MSFTNGP11.phx.gbl>...
> > We are running an ASP.NET application on a cluster of 3 web-servers,
using
> > the Network Load Balancing feature of Application Center. We have
> > synchronized the machineKey in machine.config on the 3 web-servers, so
we
> > can utilize a random algorithm for server selection for requests. The
> > application does not use either session state or application state.
> > We recently upgraded to .NET Framework 1.1 (including the hotfix for the
> > "doPostback bug"), and after that we experience a mysterious problem on
our
> > production servers:
> > Let's call the servers A, B and C. Let's say you select a page (a GET
> > request), and it is served by either server A or B. The page contains a
> > form, so when you post it back and server C gets to handle the request,
the
> > response appears to be like the original GET request. The page does not
seem
> > to process the page as a POST request.
> > The same thing happens if the original page comes from server C, and the
> > postback is processed by server A or B.
> > Obviously, it seems that there is something wrong on server C.
> > We have checked everything we can think of. Among them the .NET
Framework
> > installation, machine.config, and that the web application files are the
> > same.
> > Since this is a production environment, we are not allowed to use debug
> > tools. However, we have enabled tracing. When this problem occurs, we
see
> > that
> > 1) The form collection contains the posted data
> > 2) That LoadViewState and ProcessPostData has been executed, both of
which
> > are not executed on a GET request.
> > 3) SessionId is unchanged
> > But even so, when the request is processed by the called page, it is
> > processed as a GET request.
> > Now I don't know where to keep on looking. Does it ring a bell for
anyone?
> > Thanks,
> > Helge
Wednesday, March 28, 2012
Web Server on Port 8080
different port for the web server. On one particular machine I'd like to
change the web port to 8080, but then when I try to start a new ASP.NET web
project and it goes out to check the server, it doesn't find it. I've tried
playing with the proxcfg.exe utility to change the default http: proxy
server to localhost:8080 but that doesn't seem to help.
Any help would be appreciated.
ThanksAre you using VS.NET? If you specify the address http://mysite:8080 when you
create the Web application in VS.NET, does it create it and find it?
"Comcast" <junkmail-sf@.comcast.net> wrote in message
news:LCWdnWeAC7kN5ImiXTWJiw@.comcast.com...
I have multiple development nodes on my network so each machine has a
different port for the web server. On one particular machine I'd like to
change the web port to 8080, but then when I try to start a new ASP.NET web
project and it goes out to check the server, it doesn't find it. I've tried
playing with the proxcfg.exe utility to change the default http: proxy
server to localhost:8080 but that doesn't seem to help.
Any help would be appreciated.
Thanks
Yes, I'm using Visual Studio.Net. Where would I specify this each time I
start a new project? Is there someplace where I could just tell it to
permanently look at http://localhost:8080 instead of http://localhost which
it is now? (picture attached)
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@.sympatico.ca> wrote in message
news:uVE6%23rzSDHA.2196@.TK2MSFTNGP12.phx.gbl...
> Are you using VS.NET? If you specify the address http://mysite:8080 when
you
> create the Web application in VS.NET, does it create it and find it?
>
> "Comcast" <junkmail-sf@.comcast.net> wrote in message
> news:LCWdnWeAC7kN5ImiXTWJiw@.comcast.com...
> I have multiple development nodes on my network so each machine has a
> different port for the web server. On one particular machine I'd like to
> change the web port to 8080, but then when I try to start a new ASP.NET
web
> project and it goes out to check the server, it doesn't find it. I've
tried
> playing with the proxcfg.exe utility to change the default http: proxy
> server to localhost:8080 but that doesn't seem to help.
> Any help would be appreciated.
> Thanks
Web Service - get remote machine/network parameters
about remote machine and network right from the user's browser using this
request:
NameValueCollection coll = Request.ServerVariables;
But what if we write a Web Service? What can we do in this case? How can we
get the remote machine IP and the HostName for example? Do we have any way
that can be used from the Web Service for that? I know that I probably can
get the same info at the remote machine and send it to the Web Service for
logging, but actually it's always easy, because some of the clients are
working from their LANs and the real IP exposed by their Internet Providers
is hard to be received.
The question - how can we get a reliable information about remote network,
user, machine, etc?
Just D.What if you try:
HttpContext.Current.Request.ServerVariables.ToStri ng();
Does that work?
Kind regards,
Nikander & Margriet Bruggeman
"Just D." wrote:
> I know that writing ASPX app we easily can get all required information
> about remote machine and network right from the user's browser using this
> request:
> NameValueCollection coll = Request.ServerVariables;
> But what if we write a Web Service? What can we do in this case? How can we
> get the remote machine IP and the HostName for example? Do we have any way
> that can be used from the Web Service for that? I know that I probably can
> get the same info at the remote machine and send it to the Web Service for
> logging, but actually it's always easy, because some of the clients are
> working from their LANs and the real IP exposed by their Internet Providers
> is hard to be received.
> The question - how can we get a reliable information about remote network,
> user, machine, etc?
> Just D.
>
>
yeah it will work definately...
From http://www.google.co.in/search?hl=en&q="HttpContext.Current.Request.ServerVariables().tost ring"&btnG=Search&meta=
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
yeah it will work definately...
From http://www.google.co.in/search?hl=en&q="HttpContext.Current.Request.ServerVariables().tost ring"&btnG=Search&meta=
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Web Service - get remote machine/network parameters
about remote machine and network right from the user's browser using this
request:
NameValueCollection coll = Request.ServerVariables;
But what if we write a Web Service? What can we do in this case? How can we
get the remote machine IP and the HostName for example? Do we have any way
that can be used from the Web Service for that? I know that I probably can
get the same info at the remote machine and send it to the Web Service for
logging, but actually it's always easy, because some of the clients are
working from their LANs and the real IP exposed by their Internet Providers
is hard to be received.
The question - how can we get a reliable information about remote network,
user, machine, etc?
Just D.What if you try:
HttpContext.Current.Request.ServerVariables.ToString();
Does that work?
Kind regards,
Nikander & Margriet Bruggeman
"Just D." wrote:
> I know that writing ASPX app we easily can get all required information
> about remote machine and network right from the user's browser using this
> request:
> NameValueCollection coll = Request.ServerVariables;
> But what if we write a Web Service? What can we do in this case? How can w
e
> get the remote machine IP and the HostName for example? Do we have any way
> that can be used from the Web Service for that? I know that I probably can
> get the same info at the remote machine and send it to the Web Service for
> logging, but actually it's always easy, because some of the clients are
> working from their LANs and the real IP exposed by their Internet Provider
s
> is hard to be received.
> The question - how can we get a reliable information about remote network,
> user, machine, etc?
> Just D.
>
>
>
Saturday, March 24, 2012
web service help
I am developing an "image server" that will perform image processing on
image files sent from many computers on a local network My concern is send
images as quickly as possible and not have the files crashing into each
other on the server. I have demonstrated sending images very quickly using
the vb.net socket class but I am wondering if a Web Service might be able to
do this also. I have looked at some Web Service examples but none of them
concern uploading large files.
Anyone able to provide some suggestions or better yet some coding examples?
Thanks
JohnThe difficulty of using service for large files deals with the fact that the
binaries have to be encoded/decoded to transfer as soap. With Remoting, you
might get around this, as long as your partner is using Windows. Otherwise,
for interoperability, you are stuck either with sockets or web services.
I am not saying a web service will not work, only that it could be
problematics, as it could time out on slower connections.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
****************************************
*********
Think outside of the box!
****************************************
*********
"ubars" <jjleiby@.verizon.net> wrote in message
news:lN43h.2335$bg7.519@.trndny04...
> Hello,
> I am developing an "image server" that will perform image processing on
> image files sent from many computers on a local network My concern is send
> images as quickly as possible and not have the files crashing into each
> other on the server. I have demonstrated sending images very quickly using
> the vb.net socket class but I am wondering if a Web Service might be able
> to do this also. I have looked at some Web Service examples but none of
> them concern uploading large files.
> Anyone able to provide some suggestions or better yet some coding
> examples?
> Thanks
> John
>
web service help
I am developing an "image server" that will perform image processing on
image files sent from many computers on a local network My concern is send
images as quickly as possible and not have the files crashing into each
other on the server. I have demonstrated sending images very quickly using
the vb.net socket class but I am wondering if a Web Service might be able to
do this also. I have looked at some Web Service examples but none of them
concern uploading large files.
Anyone able to provide some suggestions or better yet some coding examples?
Thanks
JohnThe difficulty of using service for large files deals with the fact that the
binaries have to be encoded/decoded to transfer as soap. With Remoting, you
might get around this, as long as your partner is using Windows. Otherwise,
for interoperability, you are stuck either with sockets or web services.
I am not saying a web service will not work, only that it could be
problematics, as it could time out on slower connections.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*************************************************
Think outside of the box!
*************************************************
"ubars" <jjleiby@.verizon.netwrote in message
news:lN43h.2335$bg7.519@.trndny04...
Quote:
Originally Posted by
Hello,
>
I am developing an "image server" that will perform image processing on
image files sent from many computers on a local network My concern is send
images as quickly as possible and not have the files crashing into each
other on the server. I have demonstrated sending images very quickly using
the vb.net socket class but I am wondering if a Web Service might be able
to do this also. I have looked at some Web Service examples but none of
them concern uploading large files.
>
Anyone able to provide some suggestions or better yet some coding
examples?
>
Thanks
>
John
>