Custom ASP Page Error

SOLVED

Hi all,

I am building a custom asp page to run in CRM but when i open the page on the application I get the following error : 

Class: CRMWrapper - Method: ExecWebPageNew - Error: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)

Does anyone know what the origin could be ?

Thanks in advance !

  • 0

    It would probably help to see the code. The error suggests that the ASP page is calling a .NET assembly. Is it a standard ASP page?

  • 0 in reply to Vega

    It not standard, it is a .net. The code for the NewScreen page is : 

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Sage;
    using Sage.CRM;
    using Sage.CRM.Blocks;
    using Sage.CRM.Controls;
    using Sage.CRM.Data;
    using Sage.CRM.Errors;
    using Sage.CRM.Graphics;
    using Sage.CRM.HTML;
    using Sage.CRM.UI;
    using Sage.CRM.Utils;
    using Sage.CRM.WebObject;
    using Sage.CRM.Wrapper;

    namespace NewOpportunity.Pages
    {
    public class NewScreen : DataPageNew
    {
    public NewScreen()
    : base("Opportunity", "oppo_opportunityid", "OpportunityDetailBox")
    {
    UseTabs = false;
    }

    public override void BuildContents()
    {
    AddError("My Host Is" + Dispatch.Host);
    base.BuildContents();
    }


    public override void AfterSave(EntryGroup screen)

    {

    string elecSub = Dispatch.EitherField("oppo_elecsub");

    if (elecSub == "electSub1")

    {

    UrlAfterSave = $"http://{Dispatch.Host}/{Dispatch.InstallName}/eware.dll/Do?SID={Keys.GetKey("SID")}&Act=115&Mode=1&CLk=T&Key-1=4&Key0=7&Key7={Id}&B=WholesaleBlock&OBN=WholesaleBlock&J=WholesaleBlock&T=Opportunity";

    }

    base.AfterSave(screen);

    }

    }

    }

  • +1 in reply to Mimi Lepissier
    verified answer

    Are the versions of .NET correct on the dev and target machines?

  • +1 in reply to Vega
    verified answer

    Omg... I was building it for the wrong framework. Thanks for the help!

  • 0 in reply to Mimi Lepissier

    We've all done it! I'm glad the fix was that simple!