Without any changes to the code, I went from having my site run fine (on Chrome) to switching to IE (for javascript debugging purposes) and having it not run, and then when I switched back to Chrome, it fails with a similar error to where it failed in IE, but not in the same place - it made it past the place IE balked at, and died later:
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: 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.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 30: End If
Line 31:
Line 32: OrderGuideName.Value = Request.QueryString("OrderGuide").ToString
Line 33: CustNo.Value = Request.QueryString("CustNo").ToString
Line 34: OrderNo.Value = Request.QueryString("OrderNo").ToString
Source File: C:\MembersOrderEntryRedux\MembersOrderEntry\MembersOrderEntry\SearchWindow.aspx.vb Line: 32
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
SearchWindow.Page_Load(Object sender, EventArgs e) in C:\MembersOrderEntryRedux\MembersOrderEntry\MembersOrderEntry
\SearchWindow.aspx.vb:32
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491
Why would swapping out browsers, and subsequently reverting back to the original (Chrome), cause it to fail where it hadn't before?
I pulled the plug on the browsing session via Shift+F5 in VS, then tried a Build in an attempt to verify that all was well.
There was no error, but it also didn't say that it built successfully; instead, it just says 0 succeeded, 0 failed, 1 skipped. Why is it skipped (even when I try Build > Rebuild Solution?
So then I tried Build > Website and got, not only many Warnings, but one error:
Error 17 compiler initialization failed unexpectedly: Project already has a reference to assembly System.Web.Extensions. A second reference to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework
\v3.5\System.Web.Extensions.dll' cannot be added. vbc : Fatal
I found one StackOverflow question about this, but I don't see why this problem would just pop up all of a sudden, or why such a convoluted series of steps to resolve it would be necessary.
Microsoft info about this simply says to, "Remove the second reference. It is unnecessary because it refers to the same assembly."
Thanks, Redmondians! Where it's supposedly being referenced a second time would be the logical thing to tell me, and even offer to do it for me if I so elected, but no, you think it swell to play a cat-and-mouse game with your long-suffering developers!
When I run Build > Run Code Analysis on Solution, it says, "No code analysis issues were detected"; the same happens when I run Build > Run Code Analysis on Website.
It kind of gives me the fantods that I can build and analyze code for both project and website; aren't they the same thing? This is a VS project that generates a website, so why do the twain not meet?!?
If I select View in Browser, it runs fine; but, of course, it's not then running in the IDE.
UPDATE
Is it possible that IIS Express needs to be restarted, or reset or something, or that website?
This is what I see when I right-click the IIS Express icon:
Should I select the "Stop Site" option? Is this to be expected - that the site is "on" (so that it is stoppable), when the site is not running (that is to say, when the IDE does not show the project as running).
This is what I see when I select "Show All Applications"
UPDATE 2
Stopping it did not good - trying to re-start the site from the IDE invokes the same exception as before/shown above.
UPDATE 3
I discovered the reason why the build neither succeeded or failed: the "Build" checkbox was not selected in Configuration Manager; I did not uncheck it; why would it not be built by default? It's the only project in the solution...?!? Some of these default settings VS uses seem awfully macabre to me.
Anyway, at least now I get a real attempt to build the project, but get the error:
Error 1 compiler initialization failed unexpectedly: Project already has a reference to assembly System.Web.Extensions. A second reference to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll' cannot be added. vbc : Fatal
And yes, when I look at the list of references, it does appear there twice:
Again, why? How did it get there? I certainly did not and, again, it was running before and stopped without any code changes.
I assume the "1.0*" version is the one to 86...