After attempting to slog my way through about 50 pages of printed out articles on Error handling, I'm at my wits end!
I have an application group that was working fine. I added my first "Class" module in the "Aoo_Code" folder and ran the modified application locally. I carefully followed the breakpoints and everything just seems fine.
Now, I upload the file changes to my Server system and when the page which first uses the new Class is redirected-to, I get the YELLOW screen of death. It points to:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
Per the apparent pointers there, I added the following to my web.config file:
I supplied the "CatchError.aspx" file which contains an atttempt to get the "real" contents of the error by a reference to<customErrorsmode="RemoteOnly"defaultRedirect="CatchError.aspx"/>
Server.GetLastError.Message
However, I still get the FIRST yellow errors and no further!
Any clues? Is there a SIMPLE, straightforward white paper on "minimal error handling for detecting errors which erupt on your server but NOT in your local testing"?
Mahalos/thanks in advance for any pointers/hints! :) KevInKauai
LATE WORD:
After setting<customErrorsmode="Off"/>
I now get a compilation error that doesn't show up on the local/debug run:
My single Class module is contained in the "App_Code" folder (named "DoMail.vb") and the class line is:Microsoft (R) Visual Basic Compiler version 8.0.50727.832
for Microsoft (R) .NET Framework version 2.0.50727.832
Copyright (c) Microsoft Corporation. All rights reserved.d:\hosting\tohchair\p2\ContactUs.aspx.vb(280) : error BC30002: Type 'DoMail' is not defined.
Dim MyMail As DoMail = New DoMail()
~~~~~~
d:\hosting\tohchair\p2\Tickets.aspx.vb(213) : error BC30002: Type 'DoMail' is not defined.Dim MyMail As DoMail = New DoMail()
PublicClass DoMail
WHY would that be just FINE in local/debug mode and not be "known" in the Server deployment?
Curiouser and curiouser! KevInKauai
Permission issues, project not deploying correctly, modified the compiled code and not the source code, deploying to an incorrect location and trying to run an older version and not the new, etc...
These are just some of the reason for your question. Hope it helps.
Aloha, onSlaught, and thanks for humping into this thread, but none of the reasons you cite seem to be the culprit in this case.
The stumblinb block was the "DoMail" Class not being "seen" from where it was called. I found another thread that mentioned some mumbo-jumbo about having to ESTABLISH the "App_Code" folder through a right click (rather than simply doing a "New Folder", so I copied the whole project into a new directory, omitted the single Class "DoMail.vb" file and then did the right-click trip ("Add ASP.NET FOlder ->" then "App_Code"). NO DIFFERENCE.
Here are the basics of my Class:
Imports Microsoft.VisualBasic
Imports System.Net.MailPublic Class DoMail
And the Invocation:
Dim MyMail As DoMail
If Session("SkipEmailSending") = "Y" Then
lvSendOrNot = False
End If
MyMail.New(lvMsgBody, True, _
lvSubject, _
lvEmailSender, pEMail, _
lvBcc1lvBcc2, lvSendOrNot)
The CONFOUNDING part here is that "DoMail" is simply not being recognized. Am I missing something fundamental here? I think I've cross-checked the syntax and and getting NO errors while running in local mode -- only when it deploys onto the intended server.
Mahalos in advance for any hints or observations -- :) KevInKauai
Hi Kev,
Based on my understanding, you deployed your asp.net application on the server. When you update the class file in the App_Code folder and try to access this class on the server, you get the error message above. If I have misunderstood you, please feel free to let me know.
The class files, in the App_Code folder, will be dynamically compiled when the application is executed. Please try to redeploy your asp.net application on the server.
I hope this helps.
0 comments:
Post a Comment