• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

DeanMachine
#1 Posted : Sunday, April 12, 2009 7:18:21 AM(UTC)
DeanMachine

Rank: Member

Joined: 4/11/2004(UTC)
Posts: 186

Hello,


I have been having this problem for the past couple of years and have just put up with it. I need to fix it now. Here goes:



My BVC 5.3.2 site works fine and I have no problems until my server is rebooted. Once the server comes back online I get the error below. If I Remote Desktop into the web server and pull up a command prompt and type IISReset, all is well again and the site works?!?! Can anybody tell me why and how I can get the site working after a reboot without having to do an IISReset everytime?



Thx.








<H1 style="MARGIN: auto 0in"><SPAN style="mso-fareast-font-family: 'Times New Roman'">[color=#ff0000>[1]
[/color]</H1>
<H2 style="MARGIN: auto 0in">[color=#800000><SPAN]Object reference not set to an instance of an object.<SPAN style="mso-fareast-font-family: 'Times New Roman'"> <o:p></o:p>[/color]</H2>
Descript<b>ion: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Exception Details: <SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">System.NullReferenceException: Object reference not set to an instance of an object.

<SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Source Error:<SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">

[table style="WIDTH: 100%; BACKGROUND: #ffffcc; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" class=MsoNormalTable border=0 cellPadding=0 width="100%"]
[tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"][td style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; PADDING-BOTTOM: 0.75pt; BACKGROUND-COLOR: transparent; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8; PADDING-TOP: 0.75pt"]<CODE><SPAN style="COLOR: black; FONT-SIZE: 10pt">An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.[/code]<SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">
[/td][/tr][/table]<SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">
<SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Stack Trace:<SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">

[table style="WIDTH: 100%; BACKGROUND: #ffffcc; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" class=MsoNormalTable border=0 cellPadding=0 width="100%"]
[tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"][td style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; PADDING-BOTTOM: 0.75pt; BACKGROUND-COLOR: transparent; PADDING-LEFT: 0.75pt; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8; PADDING-TOP: 0.75pt"]<SPAN style="COLOR: black; FONT-SIZE: 9pt"> [/1]</PRE>
<SPAN style="COLOR: black; FONT-SIZE: 9pt"><FONT face="Lucida Console">[NullReferenceException: Object reference not set to an instance of an object.]</PRE>
<SPAN style="COLOR: black; FONT-SIZE: 9pt"> BVSoftware.Bvc5.Core.Utilities.UrlRewriter.RewritePath(HttpApplication&amp; app, Uri sourceUrl) +314</PRE>
<SPAN style="COLOR: black; FONT-SIZE: 9pt"> BVSoftware.Bvc5.Core.Utilities.UrlRewriter.app_BeginRequest(Object sender, EventArgs e) +69</PRE>
<SPAN style="COLOR: black; FONT-SIZE: 9pt"> System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92</PRE>
<SPAN style="COLOR: black; FONT-SIZE: 9pt"> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +64</PRE>[/td][/tr][/table]
<SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">

<SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt; mso-fareast-font-family: 'Times New Roman'">
<HR style="COLOR: silver" align=center SIZE=1 width="100%" noShade>


<SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt">Version Information:<SPAN style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: black; FONT-SIZE: 8.5pt"> Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
[url=http://www.internetcityusa.com][/url] Jason
Andy Miller
#2 Posted : Sunday, April 12, 2009 1:47:13 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
My guess is that the web server is starting *and* someone is making a request to the web site *before* the database server is ready. Later, when you restart the web sites, the database server is ready and all is right with the world (at least on the server).

I'm not sure what, if anything, you can do. Most people put the database server on a separate computer which is not restarted when the web server is restarted. If both SQL Server and IIS are on the same computer, then you can't help but affect both when you restart the computer. You might try writing a script to run IISRESET n minutes after the OS starts. Or you might be able to configure IIS to be dependent on the SQL Server service (that will typically cause a service to wait for the dependency). The best solution would probably be to move the database to a different computer.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
Customizer
#3 Posted : Sunday, April 12, 2009 10:14:24 PM(UTC)
Customizer

Rank: Member

Joined: 9/26/2008(UTC)
Posts: 121

Andy is right. This error happends when the database server is not accessible. You can for example create the batch file to restart IIS and put it into Autostart folder. Thus each time the server machine is rebooted the iis will be restarted automatically.
http://www.software-development-innovations.com - affordable web customization and development service
DeanMachine
#4 Posted : Monday, April 13, 2009 7:49:22 AM(UTC)
DeanMachine

Rank: Member

Joined: 4/11/2004(UTC)
Posts: 186

My database is on a seperate server, so next time I reboot I will make sure to reboot the DB sever first but......I guess the question is; Why does the error not go away once the DB is accessible?? It seems like BV looks at the database once and if it's not there it never tries to reconnect again until IIS is reset.


Thanks for your replies!
[url=http://www.internetcityusa.com][/url] Jason
Marcus
#5 Posted : Monday, April 13, 2009 10:31:37 AM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

BV is checking in the application_start of the global.asax file to run some tasks on the database. Since the application has already "started" the system doesn't try to load in settings and objects again.

I think that I changed this in SP4 to give a friendly error message if the connection string isn't working instead of the scary error page. I think it also will check again on the next request but I'm not sure.
Customizer
#6 Posted : Monday, April 13, 2009 10:44:29 AM(UTC)
Customizer

Rank: Member

Joined: 9/26/2008(UTC)
Posts: 121

I think this is not done because in case of real database problem it's better to be informed asap. In general I think the best approach here would be:
1. Add the ability to control if bv should try to reconnect db server
2. Add control over number of attempts
3. Wrap the above error into real db server unavailable error in order not to confuse users.
http://www.software-development-innovations.com - affordable web customization and development service
DeanMachine
#7 Posted : Monday, April 13, 2009 12:41:26 PM(UTC)
DeanMachine

Rank: Member

Joined: 4/11/2004(UTC)
Posts: 186

Okay so what is the fix? We don't want to upgrade to SP4 just yet because in my testing I have identified some things we are not ready for. If the BV sees that the DB is down, there's gotta be a way for it to keep checking so eventually the site will come back up when the DB comes back up. IMO this is a huge bug. What if I am on vacation and there is a minor network hiccup between the DB and web server. If I don't have access to the server so I can reset IIS, my site will be down until I get back. That is totally not acceptable.

Please advise.
[url=http://www.internetcityusa.com][/url] Jason
Matt@9BallDesign
#8 Posted : Monday, April 13, 2009 2:17:13 PM(UTC)
Matt@9BallDesign

Rank: Member

Joined: 12/23/2003(UTC)
Posts: 909

Anytime this happens I tap my host and it's all set in 5 minutes. It tends to happen at or around MSoft updates.
Matt Martell


http://www.9balldesign.com - Web, Print, Graphic


http://www.martellhardware.com/ - Decorative &amp; Builder's Hardware

------------------------------------------------
DeanMachine
#9 Posted : Monday, April 20, 2009 10:13:59 AM(UTC)
DeanMachine

Rank: Member

Joined: 4/11/2004(UTC)
Posts: 186

Marcus,

Any way to fix this? Does the 5.5 SP address this?
[url=http://www.internetcityusa.com][/url] Jason
Marcus
#10 Posted : Monday, April 20, 2009 12:32:09 PM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

BV 5.4 and 5.5 added some intermediate error pages that report in a friendly manner if the site isn't able to connect to the database.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012