Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8711837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:59:02+00:00 2026-06-13T04:59:02+00:00

I am trying to rum my application and I am getting the following error

  • 0

I am trying to rum my application and I am getting the following error as :
System.Web.HttpUnhandledException: Exception of type ‘System.Web.HttpUnhandledException’ was thrown.

The exception is thrown near the ** line of code:

public void LoadFromEntity(bool editable, string TabKey)
    {
        //Getting the FormMaster collection
        **FormTemplate formTemplate = PolicyClassCollection.CachedPolicyClasses.FindBy((int)EnumPolicyClasses.PNI).FormTemplateCo**llection.Find(ft => ft.PolicyClassId == Utility.GetCurrentPolicyClassId() && ft.DocumentType.DocumentTypeId == (int)EnumDocumentTypes.Coverage_Summary && ft.PolicyTypeId == Utility.GetCurrentAccount().CurrentRisk.PolicyTypeId);

        if (formTemplate != null)
        {
            //Set context string with current option number
            this._Account.CurrentRisk.FormContextData = this.OptionNum.ToString();

            //getting FormMasterID
            Guid vsDatabaseId = formTemplate.FormFilingHistoryId;
            string accountXmlString = this._Account.ToXML();

            //Setting the parameters in PDFServiceParms class that are to be used in "PDFService.aspx" page.
            PDFServiceParms pdfParams = new PDFServiceParms(FORM_MODE_EDIT, vsDatabaseId.ToString(), Model.AppConstants.FORM_TYPE_SELECTED_FORM, accountXmlString);

            //Saving the parameters in the session. PDFService.aspx page reads the parameters from the session. Session key is passed in the 
            //query string when calling the PDFService.aspx page.
            Session[AppConstants.SK_SUMMARY_PDF_PARAMS] = pdfParams;

            //Setting the iFrame's source to PDFService.aspx page. The PDF document generated in this page is displayed in the iFrame.
            this.iframePdf.Attributes["src"] = ResolveClientUrl(AppConstants.PAGE_NAME_PDFSERVICE) + "?datakey=" + AppConstants.SK_SUMMARY_PDF_PARAMS;
        }
        else
            throw new ApplicationException("FormMaster not found for PolicyClass = " + Utility.GetCurrentPolicyClassId().ToString() + " and DocumentType = " + ((int)EnumDocumentTypes.Coverage_Summary).ToString());
    }

Exception thrown:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ApplicationException: FormMaster not found for PolicyClass = 2 and DocumentType = 27
   at PNI_SqbpeCovInfoPNISummary.LoadFromEntity(Boolean editable, String TabKey) in C:\TFS\Navigate Development\NavigateWebApp\PNI\SqbpeCovInfoPNISummary.aspx.cs:line 95
   at SQBPECoverageInformationMasterPNI.LoadFromEntity() in C:\TFS\Navigate Development\NavigateWebApp\PNI\SQBPECoverageInformationMasterPNI.master.cs:line 188
   at SQBPE.Page_Load(Object sender, EventArgs e) in C:\TFS\Navigate Development\NavigateWebApp\SQBPE.master.cs:line 55
   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.pni_sqbpecovinfopnisummary_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\navigatewebapp\253cae21\57ec5e1d\App_Web_sqbpecovinfopnisummary.aspx.41d7eb59.1z9y4p0a.0.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

can some one please let me know what need to be done for this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T04:59:03+00:00Added an answer on June 13, 2026 at 4:59 am

    Sorry, edit of whole answer, previous was only halfway correct

    The parent exception is a HttpUnhandledException. The internal exception seems quite clear and says:

    FormMaster not found for PolicyClass = 2 and DocumentType = 27

    That error is in your own code. The ApplicationException is not happening on the line you are referring to. The result of that line is that formTemplateis null and your code throws this exception.

    This is the line throwing the exception:

    throw new ApplicationException("FormMaster not found for PolicyClass = " 
        + Utility.GetCurrentPolicyClassId().ToString() 
        + " and DocumentType = " 
        + ((int)EnumDocumentTypes.Coverage_Summary).ToString());
    

    (a friendly tip, use string.Format instead)

    And this is the line returning null:

    FormTemplate formTemplate = PolicyClassCollection.CachedPolicyClasses
        .FindBy((int)EnumPolicyClasses.PNI).FormTemplateCollection
        .Find(ft => ft.PolicyClassId == Utility.GetCurrentPolicyClassId() 
        && ft.DocumentType.DocumentTypeId == (int)EnumDocumentTypes.Coverage_Summary
        && ft.PolicyTypeId == Utility.GetCurrentAccount().CurrentRisk.PolicyTypeId);
    

    (a friendly tip: write it out over multiple lines. That helps with setting breakpoints and with readability)


    Your next question should be: why is it returning null? The answer, I don’t know. In my previous attempt of answering I said something about third party code. And that’s exactly what this is, as the class PolicyClassCollection is not a well-known class, there’s no documentation on the internet on it. So either it is your own, in which case you can try stepping through (set a breakpoint) or it is someone else’s in which case you can try calling the vendor or try stepping through after removing the “just my code” setting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to develop hello world, but getting force close error on emulator. thanks in
Trying to build out an exception if move.UserId does not equal currentUserId then Redirect
Trying to copy the msdn refernce here doesn't work and gives an error I
Trying to install py-bcrypt on win7. Python is 64bit. First error unable to find
Trying to do a simple insert, and this one line is giving me issues.
Hi I am trying to use a simple ajax UpdatePanel..however keep on getting an
Trying to find the source code to the Open licenses AlertDialog screen (at least
Trying to parse time from string, but get this error. Tried few formatting string.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.