Developer forum

Forum » Dynamicweb 10 » Fresh DW10 + Swift installation problems

Fresh DW10 + Swift installation problems

Ivan Marijanović
Ivan Marijanović
Reply

Hi

I am trying to install DW 10.2.0 (Suite) + Swift 1.26 using Visual Studio. 

Everything is working from Visual Studio but when I try to deploy to my local IIS I am constantly getting bunch of errors saying ERR_ABORTED 503 (Server has been shutdown).

I installed ASP.NET Core 8.0.2 Hosting Bundle, setup folder permissions to everyone but still having this errors!

Any advices?

Ivan


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Ivan

Did you follow the information here: https://doc.dynamicweb.dev/documentation/fundamentals/setup/hosting/running-in-IIS.html

503 is service unavailable. You have to look in event viewer in Windows to figure out what can be wrong.

You have to show your entire setup if you want us to guess what could be wrong in your setup...

 
Ivan Marijanović
Ivan Marijanović
Reply

Hi Nicolai

I did. I did not add host name since I wont to use localhost!

This is my web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments="C:\inetpub\wwwroot\HelardiDW10\DyW10 - Heraldi.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
  <system.web>
    <customErrors mode="On" />
  </system.web>
</configuration>

Ivan

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Ivan

And what did your Windows Event Log say?

Did you check this: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-8.0

Try to install the Visual C++ Redistributable which is listed as a requirement - it could be missing from your installation.

BR Nicolai

 
Ivan Marijanović
Ivan Marijanović
Reply

This is from log:

Application 'C:\inetpub\wwwroot\HelardiDW10\' started successfully.

Category: Microsoft.Extensions.Hosting.Internal.Host
EventId: 9

BackgroundService failed

Exception: 
System.UriFormatException: Invalid URI: The hostname could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString)
   at Dynamicweb.Host.Core.KeepAlive.KeepAliveBackgroundService.ExecuteAsync(CancellationToken stoppingToken)
   at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)

 

Category: Microsoft.Extensions.Hosting.Internal.Host
EventId: 10

The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.

Exception: 
System.UriFormatException: Invalid URI: The hostname could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString)
   at Dynamicweb.Host.Core.KeepAlive.KeepAliveBackgroundService.ExecuteAsync(CancellationToken stoppingToken)
   at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)

 

Application 'MACHINE/WEBROOT/APPHOST/DW10HERALDI' has shutdown.

 

Ivan

 

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Try to assign a hostname to your iis. I.e. mysolution.local.dynamicweb.dk which will use 127.0.0.1

Votes for this answer: 1
 
Ivan Marijanović
Ivan Marijanović
Reply

I did and backend is working now ok but on frontend I get only "No layout selected for website" text,

Thank you very much for your effort!

Ivan

 
Ivan Marijanović
Ivan Marijanović
Reply

It looks like my Files folder is not published to publish folder!

Ivan

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Was that a question? Or did you get it to work?

 
Ivan Marijanović
Ivan Marijanović
Reply

Hi Nicolai

No. This was constatation and after that I make it work! Thank you!

Ivan

 
Ivan Marijanović
Ivan Marijanović
Reply

Nicolai

 

I am getting this error in log and cannot save anything form backend:

"[2024-03-14 09:43:56.894] C:\inetpub\wwwroot\DW10\HeraldiDW10\runtimes\win\lib\netcoreapp2.1\System.Data.SqlClient.dll Unable to load one or more of the requested types.Could not load type 'SqlGuidCaster' from assembly 'System.Data.SqlClient, Version=4.6.1.6, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field."

Ivan

 

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

What is the target framework of the project used for building the assembly? C:\inetpub\wwwroot\HelardiDW10\DyW10 - Heraldi.dll

Check the project and make sure that target is .net 8

<TargetFramework>net8.0</TargetFramework>

Try to manually delete existing /obj and /bin folders from your project and then rebuild.

When creating new projects make sure that you have installed the latest version of Dynamicweb.ProjectTemplates.

See Installation | Dynamicweb 10 Developer Documentation

 
Ivan Marijanović
Ivan Marijanović
Reply

Hi Morten!

Yes this is file content:

<Project Sdk="Microsoft.NET.Sdk.Web">
 
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RazorCompileOnBuild>false</RazorCompileOnBuild>
</PropertyGroup>
 
<ItemGroup>
<PackageReference Include="Dynamicweb.Suite" Version="10.*" />
</ItemGroup>
</Project>

 

You must be logged in to post in the forum