Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 970
  • Last Modified:

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

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
Fassier
Asked:
Fassier
  • 18
  • 10
  • 3
2 Solutions
 
GiftsonDJohnCommented:
Have you enabled Customer Errors and a redirect options?
0
 
GiftsonDJohnCommented:
Apologies for the typo error.

Have you enabled Custom Errors and a redirect options in web.config?
0
 
FassierAuthor Commented:
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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
FassierAuthor Commented:
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
 
GiftsonDJohnCommented:
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
 
FassierAuthor Commented:
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
 
Ted BouskillSenior Software DeveloperCommented:
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
 
FassierAuthor Commented:
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
 
FassierAuthor Commented:
aplogies for the type: i meant to say internet "access" and not "excess" :)
0
 
Ted BouskillSenior Software DeveloperCommented:
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
 
FassierAuthor Commented:
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
 
Ted BouskillSenior Software DeveloperCommented:
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
 
FassierAuthor Commented:
Thanks for your feedback tedbilly...
I will get back to you tomorrow on this...bear with me till then.
Rgrds.
0
 
FassierAuthor Commented:
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
 
Ted BouskillSenior Software DeveloperCommented:
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
 
FassierAuthor Commented:
Yes, Both Anonymous and Windows Authentication are selected in IIS settings for the website.

Rgrds.
0
 
Ted BouskillSenior Software DeveloperCommented:
What do you have set in your web.config file for authentication in your .NET application?
0
 
FassierAuthor Commented:
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
 
Ted BouskillSenior Software DeveloperCommented:
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
 
FassierAuthor Commented:
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
 
FassierAuthor Commented:
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
 
FassierAuthor Commented:
Signing out for the day...the week in fact..
Will be back in office on Monday the 20th..
0
 
FassierAuthor Commented:
came..saw nothing...went back
:(
0
 
Ted BouskillSenior Software DeveloperCommented:
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
 
FassierAuthor Commented:
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
 
Ted BouskillSenior Software DeveloperCommented:
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
 
FassierAuthor Commented:
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
 
FassierAuthor Commented:
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
 
Ted BouskillSenior Software DeveloperCommented:
Well if you get this message, relax, enjoy your vacation and we will tackle this when you get back.  Cheers
0
 
FassierAuthor Commented:
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
 
Ted BouskillSenior Software DeveloperCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 18
  • 10
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now