Solved

"The Page cannot be displayed" error message on Postback (.net 1.1/Win2000Server/IIS 5.0)

Posted on 2009-04-07
33
912 Views
Last Modified: 2012-05-06
Hi,

I am maintaining a web application created in .net 1.1 with SQL server 2000 as database.
The website is hosted on Windows 2000 server with IIS 5.0
Till date the site has worked fine without any problems.
Recently it was notified by a client that the site shows "Page cannot be displayed" on click of any button which postbacks to the server on the login page (Login page is displayed correctly).
On further investigation, it came to light that the problem occurs on some machines while using LAN or on some other machines while using wireless for networking (switching to other mode of networking - the page works fine).
I have traced the IIS logs which show HTTP 500 error (Win32 status code 87).
Also, through some trial and error by publishing dummy sites I found out that the problem can be regenerated only if I connect to the database, pull some data and display it on page or store in session. Otherwise the postback works okay.
I have tried configuring session states to both InProc and ServerState without any change.
I am really stumped and am not sure how to proceed with this issue.
Any help or guidance whatsoever would be really appreciated.

Thanks and Regards,
Fassier
0
Comment
Question by:Fassier
  • 18
  • 10
  • 3
33 Comments
 
LVL 14

Expert Comment

by:GiftsonDJohn
ID: 24094683
Have you enabled Customer Errors and a redirect options?
0
 
LVL 14

Expert Comment

by:GiftsonDJohn
ID: 24094686
Apologies for the typo error.

Have you enabled Custom Errors and a redirect options in web.config?
0
 

Author Comment

by:Fassier
ID: 24094980
Thanks GiftsonD for your reply,

My custom error settings is   <customErrors mode="Off" />

Would you like me to try with some other options?

Regards,
Fassier
0
 

Author Comment

by:Fassier
ID: 24095068
Tried setting custom error...no change...
me thinks, setting it wont affect the outcome as HTTP error code is 500 which cannot be handled through custom errors...in fact i have tried tracing logs thr global.asax at application_start event...the request never reaches to that point..it seems the IIS (I am not sure abt this one) rejects the postback b4 that..
0
 
LVL 14

Expert Comment

by:GiftsonDJohn
ID: 24095120
The application start will execute only once when the application begins to service for the first time. The Session_Start should get fired every time a new session is created. Try debugging. One more thing I need to check.

If .net ISAPI filter is not registered it will throw the same error. Please check whether .net is enabled on your website.
0
 

Author Comment

by:Fassier
ID: 24103738
Sorry for the errata...
I meant Application_BeginRequest event...Also tried with Session_Start as you mentioned..

About .net ISAPI filter, I am not sure what is needed to be explicitly set here?
Also, the site is working fine for last 4 years. This problem started occuring when the client accessed the site from a new network domain he created. Most of the users on this domain use laptops, and may connect to the network using either LAN or Wireless...the problem differs per machine (i.e. "Page not found" error on some machines for LAN and on some machines for wireless access)
Also, other asp.net test sites I deployed work fine too (so I dont think there is ISAPI problem). The only way I found to regenerate the scenario was DB connectivity. Whenever I load some data or get date time for instance from the DB, data gets loaded...page is displayed okay. It is the postback which is giving the headache.
If I strip the code for SQL server, the postback problem resolves.

My apologies for repeating the same thing again, just thought it would help make the picture a bit more clear to you.

Regards.
0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24120876
OK, so to be clear 500 is a server side error and status code 87 is an invalid parameter.  However, based on your description, not all clients are experiencing the problem.  So, we need to know what code on the server is executed differently because the client has taken a different route through the code.

Has anything changed in the environment even if it seems unrelated?  Especially service packs et cetera on the servers.

Does the database use impersonation to connect?
0
 

Author Comment

by:Fassier
ID: 24127739
Sorry for delayed reply...I dont  have internet excess on weekends...responding today from workplace.
Appreciate your response.

About different route, I dont think the Postback request ever reaches the code.
I tried putting trace logs in Application_BeginRequest event for trying to follow code route.
On proper execution I get all the trace logs correctly.
On improper execution no log is written.

This is what happens on postback:
Login button click->Page posts to the server->Progress bar in browser's task bar shows "Opening Page path/xxxx.aspx" and green progress bar keeps increasing->after about 2 minutes (time varies) browser shows "The page cannot be displayed" (if HTTP show friendly msgs is on, else the page just goes blank)

Nothing on the server has changed. But this creepy problem showed up on accessing the website from new network domain (I am not aware of its details) and is specific to machines on this domain only.
 I am really naive as far as networking is concerned. Is it possible that there something wrong in networks domain settings or maybe installed client machines which may be causing this erratic behaviour?

Database does not use impersonation.
Does asp.net do something peculiar in a page life-cycle if I am doing DB connectivity? Asking because the trial site of mine reflects the problematic behaviour only on DB access pages.

Thanks and Regards.


0
 

Author Comment

by:Fassier
ID: 24128018
aplogies for the type: i meant to say internet "access" and not "excess" :)
0
 
LVL 51

Assisted Solution

by:tedbilly
tedbilly earned 125 total points
ID: 24135341
It does sound like a routing problem from the other domain.  If for example you use Windows Authentication it might not be relayed from the other domain.  Or if they have their routers running incorrectly you can suffer problems.
0
 

Author Comment

by:Fassier
ID: 24135689
Okay..got it.
So how about I go on from here on?
I am supposed to give the client a solution to the problem. If I just tell them routers may have been set up incorrectly, they may get defensive and ask me to prove it.
And as I said before I am absolutely dumb when it comes to networking or hardware.
Please guide.

Regards.
0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24139917
Do you use Windows Authentication?  I need more details about the design of your web application to diagnose.

Diagnosing connectivity issues has to be done at the client as well as the server and with your lack of experience and it sounds like like of access to the details of their routing this would be very difficult to diagnose.

Maybe a design flaw in your web application is the issue.  You mentioned it only fails if the database connection is used.  How are you authenticating on the database?  Is there code you are transmitting to the client to connect to the database?  For example I've seen VBScript that is sent to the client browser to connect to a database (which isn't a good design)
0
 

Author Comment

by:Fassier
ID: 24145938
Thanks for your feedback tedbilly...
I will get back to you tomorrow on this...bear with me till then.
Rgrds.
0
 

Author Comment

by:Fassier
ID: 24153913
Hi tedbilly,
No we don't use windows authentication.
Below is the connectionstring for your reference
"uid=user1; password=testpswd; database=TRIAL_ONE; server=ABC112; Connection Reset=false"

>>Is there code you are transmitting to the client to connect to the database?
I did'nt understand the part of transmitting code to client to connect to database. Is that possible in asp.net? Anyways, I fetch the data on server, get it in datatable then set it in datagrid to set the view.
In the response to the server everything is transmitted as HTML so the datagrid becomes table tag.
This is ofcourse where I want to show something huge in quantity.

The problem occurs even simple for showing one field, say date on screen or trying to validate user login/pswd by simple select statement (we dont use any forms authentication or such)

Rgrds.


0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24154233
It's possible to write ASP pages with embedded VB script that will run on the client.  It's rarely used because only IE supports it but I have seen problems because of it.  If you aren't using it it's not the problem in this case.

Can you tell me the security settings for the website?  Do you have Anonymous AND Windows Authentication selected?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:Fassier
ID: 24154587
Yes, Both Anonymous and Windows Authentication are selected in IIS settings for the website.

Rgrds.
0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24154659
What do you have set in your web.config file for authentication in your .NET application?
0
 

Author Comment

by:Fassier
ID: 24154848
It is set to Windows...
For your reference copying the web.config contents below. Apart from these no other settings are being done specially.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   
  <system.web>
  <httpHandlers>
      <add verb="*" path="*.log" type="System.Web.HttpForbiddenHandler" />
      <add verb="*" path="*.xml" type="System.Web.HttpForbiddenHandler" />
  </httpHandlers>

    <compilation defaultLanguage="c#" debug="true" />

    <customErrors mode="Off" />

    <authentication mode="Windows" />


    <authorization>
        <allow users="*" />
    </authorization>

    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />


   
    <sessionState
            mode="InProc"
            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
            cookieless="false"
            timeout="1"
    />

    <globalization requestEncoding="Shift-JIS" responseEncoding="Shift-JIS" />

    <pages validateRequest="false"></pages>
   
  </system.web>
    <appSettings>
            <!-- application specific settings -->
            <add key="ConnectionString" value="uid=user1; password=testpswd; database=TRIAL_ONE; server=ABC112; Connection Reset=false"></add>
    </appSettings>

</configuration>

0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24162768
Wait a minute, your post http:#24153913 states "No we don't use windows authentication." but according to your IIS settings and that web.config you ARE using Windows Authentication.  If your domain doesn't trust the domain of the remote users on the other domain they will NOT be able to connect.
0
 

Author Comment

by:Fassier
ID: 24165423
Sorry for creating the misunderstanding...
In ID: 24139917 as you mainly queried about database connectivity, I replied about windows authentication related to database connectivity...hence you can see my next line is about connectionstring..
>>No we don't use windows authentication.
>>Below is the connectionstring for your reference
>>"uid=user1; password=testpswd; database=TRIAL_ONE; server=ABC112; Connection Reset=false"

My aplogies for the same.
Okay I understood the domain trust part.
What changes should I implement in web.config. Are there other authentication mode settings which can be used as way-around?

Rgrds.
0
 

Author Comment

by:Fassier
ID: 24165452
Hmm...
Hold on...
>> If your domain doesn't trust the domain of the remote users on the other domain they will NOT be able to connect.
Agree..But if this was the reason than I should not be able to connect at all shouldn't it?
In this case though the Login Page is displayed correctly means the scenario does not fit the above bill.
It is the postback which hangs-up.
What do you think?

Rgrds.
0
 

Author Comment

by:Fassier
ID: 24166197
Signing out for the day...the week in fact..
Will be back in office on Monday the 20th..
0
 

Author Comment

by:Fassier
ID: 24181942
came..saw nothing...went back
:(
0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24182233
Sorry, I've been quick sick with a head cold! :(  Still am but will point you in the write direction.  Are you attempting to use 'Form Based Authentication'?

If yes, then your web.config isn't setup correctly.  Here is a simply sample of how to do it: http://www.ondotnet.com/pub/a/dotnet/2003/01/06/formsauthp1.html

You'd simply change the if statement that uses hardcoded name and passwords to a database call.  There are lots of good samples on the web.

0
 

Author Comment

by:Fassier
ID: 24190041
Ha haa...i am out with cold too...but cant skip work for rest..
:)
back to business...as i said in comment #24153913 we do not use forms authentication...
we maintain own userid/pswds in DB....and user are asked to login on login.page using these userid/pswds....user enters values...click login button...on server we get the values from DB, check if it is correct UserID/Pswd..if yes show him the menu page...if not...simply show label "login failed"...thats it.
Yep, its pretty primitive way of authentication but I didnt make it so cant comment. I am the maintenance guy, stuck up pretty bad on this problem.

Rgrds.
0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24190541
OK, well to be honest, simple 'Forms Authentication' does exactly what you described with less code!  ASP.NET maintains the session log in state for you with very little code and effort.  It sounds like the original developer reinvented the wheel.

You probably have code on each page that verifies if the user is logged in.  'Forms Authentication' does all that for you automatically.

Anyway, the easy fix is to change <authentication mode="Windows" /> to <authentication mode="None" />  That will eliminate the Windows Authentication and should fix this issue.  However, I'd test thoroughly.  Your original developer might not have implemented the security properly and this might expose the whole site.
0
 

Author Comment

by:Fassier
ID: 24202590
TedBilly..YOU ROCK!
My test application ran fine in both wireless and LAN settings on the new network domain of the client after changing the authentication mode to None..
I will make the changes to the main application tomorrow and report back to you.
Buddy, you really made my day today...
God bless you.
:))
0
 

Author Comment

by:Fassier
ID: 24211098
Sorry to say, but its only my machine which worked in the domain...
All others are playing the same game of LAN/Wireless as usual.
The laptop which I was using for testing and which is working like charm from yesterday - the only change I did on this machine was to install IIS 6.0, Visual Studio 2003 and Visual sourcesafe 6.0.
That too since I had to move about for testing and wanted to keep development stuff on a portable machine.
Can you have any inkling to what this is about or what installation or library could have solved it?
And if this is the solution, in reality its absurd. I can't ask my customer to reinstall stuff on their client machines rather than server. Clients are supposed to be dumb machine..isn't it?

I am supposed to leave for a vacation of 3 weeks in about 3 hours...It would have been great if I could have solved this one...rather than have it on back of mind while I am supposed to rest.

Really appreciate you sticking with me on this for so long...
Rgrds.

0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24211636
Well if you get this message, relax, enjoy your vacation and we will tackle this when you get back.  Cheers
0
 

Accepted Solution

by:
Fassier earned 0 total points
ID: 24417735
I am back...refreshed after long hiatus from work.
Hope you are doing well ted..

About the problem, well it sort of solved itself when I was away...I mean literally.
Well, I got a mail from network team of the client (whom I had blamed at the very beginning for the unknown blunder) saying they found that "MTU for one of the core switches was set whereas for the other core switch it wasn't which created the LAN/Wireless access as well as PostBack problems on my site." Tell you what, I am too relieved to even curse them now for fretting me out for no reason.

Anyways thanks a lot Tedbilly. I sincerely appreciate your help and I did learn a lot from various things we tried out. It wasn't futile exercise afterall.
:)
Now let me know how to award these points to you as I am new here and this was my first question on experts-exchange.

Cheers and keep up the good work.

Best Regards.
0
 
LVL 51

Expert Comment

by:tedbilly
ID: 24417883
Wow.  Lesson learned for me too.  I've seen performance problems with bad MTU settings but I've never heard of it interfering like this.  You could have split the points by marking your last comment as an answer and splitting it with one of my comments.  However, your alert will go to a moderator who will do the same.  Glad you had a good vacation! ;)  Cheers
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now