Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

__doPostBack weirdness

Status
Not open for further replies.

thysonj

Programmer
Jul 6, 2001
240
US
I am really new to .NET here so forgive me if this ends up being something silly.

I have a page here that does a postback and displays a subform. It works perfectly fine within our domain. We have deployed the dev site to a staging site and now the post does not work. It does the post back but the subform is not displayed. I would give more details but I am at a total loss as to what is even wrong. My guess is that there is a server setting that needs to be changed or that there is a firewall issue. Anyone ever seen something like this? How do I fix it?
 
Is it possible that the security is not allowing internet users the correct permissions and therefore the postback doesn't work correctly?
 
Hard to say I'd guess.

Have you tried running the app in debug from the dev site?
Is there trust between the domains?
What authentication are you using?
Is the correct version of the framework installed correctly on the dev Web server?

Apologies for the questions rather than answers, I'm just kind of thinking out loud and looking for pointers for you.

Rhys

Be careful that the light at the end of the tunnel isn't a train coming the other way.
 
Yeah...since I am so new to this I don't even know where to begin so the questions help out. I will answre as best as possible.

-We have not run the app in debug from the dev site since it works well there...what would be the reason for this?
-There is no trust between the domains set up.
-Right now I believe the developer has set the actual site to have no authentication...what does this mean server side?
-The frameworks are both the same so there is no issue.

One curious bit of information may help to lead us down the right path here...
It seems on the dev(side that works perfectly fine) when you browse to the site there is no authentication(or it is totally transparent to the user), but when we go to the staging site(doesn't work yet) we are presented a standard widowns authentication dialogue box. Now I have tried to cancel out of the box, enter nothing and submit, and use my domain authentication here and all three processes produce the same result... basically it seems to try authentication and then takes you to the site and everything appears fine until the postbacks(and other thing i suspect) aren't working. I strongly suspect this is all part of the same problem and most likely is something I just haven't grasped yet. Thanks for your help.
 
Sorry, misread the first bit, is there any way you can put the solution onto a mirror of the (or actual) staging site to run through it in Debug?

In IIS there are the settings for the Web Application, have you ensured they're the same on the development and staging server? (i.e., Anonymous Access Allowed etc.) The settings in IIS control to some extent how the application is run on the server, so you should check these as differences can produce funny results, as I've found out the hard way some time ago. I know we had problems with one of our applications as the development site had anonymous access disallowed but our pre-production site anonymous access was allowed. You also need to make sure the Site is set up as a Web Application under IIS as well.


Rhys

Be careful that the light at the end of the tunnel isn't a train coming the other way.
 
It seems to me that we have isolated a very liekly cause here. Indeed the access was different for the two servers. The directory service was set to use domain authentication on the dev server(working server) while on the staging server it is set to use anonymous access. It seems like it would be easy to set it up to use domain on the staging but wouldn't this mean that only those on our domain would be able to reach the site? I'd rather change it so anonymous access was able to have the permissions needed for postbacks to work. I can't seem to figure out how to accomplish this...
 
It kind of depends what your site is doing as well. For example, if your accessing a database using the Windows login of the person accessing the site, and you're spoofing their NT login to the database you need the Login, and Anonymous Access disabled, for the site to work. Or you'll need to capture the login and create the connection string within the code by using this captured information.

In asp.Net, the authentication method is controlled within the Web.config file which is part of the solution, but IIS also has the Anonymous Access settings. I think it really depends on what your site is doing and accessing to best ascertain the approach you should be taking, but getting the Server settings the same in dev and staging would be the first step.

Rhys

Be careful that the light at the end of the tunnel isn't a train coming the other way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top