Developer forum

Forum » Dynamicweb 10 » Portnumber missing while running IISExpress (Kestrel)?

Portnumber missing while running IISExpress (Kestrel)?

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

I have a dw10 solution, and added the Swift files. Now the preview of the homepage does show something but al lot of links to css and other resources cannot be loaded.

Turns out these links point to http://localhost omitting the IISExpress portnumber.

If I add the portnumber these files do load correctly.

Is there any wat around this, or would I be better of just conbfiguring IIS instead of IISExpress?

Thanks,

Justin


Replies

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

...

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Do not use IISexpress? And not use IIS either.

Use Kestrel using 'dotnet run'

But I do not think that is the issue.

Do your template output contains a base href? And how is your settings in web & http section?

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Thanks Nicolai, learning to find a new checkbox every day.

Checking "Do not add base href" solves the issue.

Honestly I thought IIS Express was the same as kestrel, so now I have learned at least two important things today.

To be able to dotnet run the project I did have to add <Compile Remove="wwwroot\Files\**" /> to the project, or all Swift files would generate build errors, but I guess that makes sense.

Thanks again for moving me closer to converting my project from 9 to 10 :-)

 

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Dynamicweb - The Checkbox CMS (TM)

 

You must be logged in to post in the forum