Cannot find the startup method defined in Default.json.

Answered
0
0

Dear Support,

I’m newbie in this Wisej, just trying to develop small program and upload to webhosting.

I have issue as per attached. It occurred on first time loading.

Error message is :

Cannot find the startup method
“SeaPass.Program.Main, SeaPass” defined in
Default.json.

at
Wisej.Web.Application.ResolveMainMethod(Configuratic
configuration) at
Wisej.Web.Application.Load(WisejContext context,
Object message) at
System.Dynamic.UpdateDelegates.UpdateAndExecuteVo
(CallSite site, T0 arg0, T1 arg1, T2 arg2) at
Wisej.Core.ResponseManager.OnLoad(Session session,
Object message)

Please somebody can assist me.

Thanks,

Dodo

 

  • You must to post comments
Best Answer
0
0

Hello,
There are a couple of things that could be causing this issue and it’s hard to say for sure which one without seeing a test case. If none of these work, please upload a simple test case that reproduces the issue and I’ll have a look.
Try these things:
1. It could be a clean/rebuild issue, caused by renaming the project or changing the namespace. To fix it, delete the bin and obj folders, then rebuild.
2. Verify that Program.cs looks like this:
namespace SeaPass
{
static class Program
{
[STAThread]
static void Main()
{
Application.MainPage = new MainPage();
}
}
}

3. Open the .csproj file and confirm that the AssemblyName is SeaPass.
4. Verify that your default.json looks like this:
{
"url": "Default.html",
"startup": "SeaPass.Program.Main, SeaPass"
}

5. It could be an IIS issue, might be loading an old DLL. Try this: Stop app pool, deploy, delete old files, start app pool again
Hope this helps,
Julie

  • Dodo Baskoro
    Hi Julie, All the configuration is correct. I just realized that the issue started since I changed Target framework from net481;net8.0 set only to net8.0. Do we need to change the bin folder? Any configuration need to update? Please advise. Thanks in advance.
  • Julie (ITG)
    Net481 is needed for the designer, however removing it shouldn’t be causing you this error. See if you can reproduce the issue in a new project- if so, attach the zip file here. Otherwise, you’ve unfortunately reached the end f what we can provide as free support- you can see paid support options here. https://wisej.com/services-packages/
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.