Web Connection
Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
Gravatar is a globally recognized avatar based on your email address. Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Paul Nesci
  All
  Jun 13, 2021 @ 09:51pm

Hi Rick ent All - I am getting this error message from a previously working site. The issue is the site was completely overwritten by a 3rd party and I am not sure if they did a fresh IIS install.

See image below.
LHS is the site and PPG (my APP) but I had to use MyAPP.EXE CONFIG to get it back. RHS is my DEV machine as a sample.

I have tried remendy at: https://support.west-wind.com/Thread5FJ0PIFI3.wwt But no fix.

Can somebody please advise other options with this error.

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Rick Strahl
  Paul Nesci
  Jun 14, 2021 @ 09:48am

I don't think that's coming from Web Connection.

What's running on the main site? I suspect the root site web.config has some dependencies that are not present in the Web Connection virtual folder and have to be explicitly removed from the configuration.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Paul Nesci
  Rick Strahl
  Jun 14, 2021 @ 05:55pm

Hey Rick When you say "and have to be explicitly removed from the configuration" which configuration are you talking about? And how do you explicitly remove them from where?

Also can I assume that "Clubsign" should of been installed under the "Default Web Site" and not in Root?

Thanks In Advance, Paul

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Rick Strahl
  Paul Nesci
  Jun 14, 2021 @ 06:01pm

Clubsign is the root Web site, and any settings that are made there, will ripple down to the Virtual in PPG. If there's some component that you use in ClubSign in an ASP.NET app, that component has to be present on the child site unless you explicitly remove the module or handler dependency.

It's usually a really bad idea to nest multiple .NET applications hierarchically underneath each other because it's really difficult to tell what might be causing a conflict. Look in the root site's app to see what references and modules/handlers are being loaded. If there are references in web.config you need to explicitly remove those in your virtual's web.config. Start with the one that's giving you the error hopefully, but it's possible that that's a nested dependency in which case you may not know where exactly it's coming from.

Can't remember the exact syntax or which section you need to look at but whatever the offending module is, you have to <remove> it in the child virtual application.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Paul Nesci
  Rick Strahl
  Jun 16, 2021 @ 11:21pm

Hi Rick What a drama! So got that site removed, even reinstalled IIS but getting an error: "Couldn't create virtual" - I tried to map it through source but not sure what these are? The error from running MyAPP.EXE CONFIG

Obviously something behind the scences with permissions has changed 😦 Any suggestions where to look or how to fix/brut force this?

EDIT: So I used Add Application but feared the CONFIG script is bombing out half way through.

OK, any help here from anyone would be appreciated as I do not understand why this bit of code is failing: WAIT WINDOW NOWAIT "Creating virtual directory " + lcVirtual + "..."

*** Create the virtual directory
IF !loWebServer.CreateVirtual(lcVirtual,lcVirtualPath)   
   WAIT WINDOW TIMEOUT 5 "Couldn't create virtual."
   RETURN
ENDIF

using this from the INI file:

[ServerConfig]
Virtual=PPG
ScriptMaps=wc,wcs,md,csvc
IISPath=IIS://localhost/w3svc/1/root

Is IISPAth used in the subfunction? As that does not exisit but does not exist in other installs... Thanks PAul

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Rick Strahl
  Paul Nesci
  Jun 17, 2021 @ 05:16pm

Sorry don't know without looking at the setup directly...

Permissions are set at the Application Pool level. Make sure you use SYSTEM or Network User or an Admin that can launch DCOM objects and not the default Application Pool User which can't.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Paul Nesci
  Rick Strahl
  Jun 17, 2021 @ 05:30pm

I hate permissions errors!
So can you please describe what the CONFIG code is trying to do here when it fails and returns:

"Couldn't create virtual."

Thanks Paul

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Rick Strahl
  Paul Nesci
  Jun 17, 2021 @ 05:38pm

You need to run as an Admin?

Otherwise, the folder has to exist.

Maybe you're missing the IIS Management Tools required for this to work in the IIS Installation.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Paul Nesci
  Rick Strahl
  Jun 17, 2021 @ 05:45pm

Thanks Rick So the APP sits in "C:\webconnectionprojects\ppg" where should the Virtual DIR exist in "C:\inetpub\wwwroot" - sorry for the ignorance?

Running as ADMIN and manually added the Application so it appears under Default Web site, but calls are returning the COM permission error as highlighted above?

Regards Paul EDIT: Checked the Tools as use .ps1 script under ADMIN to install

I tried to install WConnect as this is the error is get:

Does that give you any ideas?

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Paul Nesci
  Paul Nesci
  Jun 17, 2021 @ 09:55pm

UPDATE:

I have this running now by manually adding the Virtual Directory. One mistake I was making, manually, was ensure you change the Application Pool to West Wind 😃 that may have lead to the COM Error.

Both install scripts for WConnect and MyApp still fail but I just live with that and keep an eye on it. Core Restful AI services running again.

Thanks for the suggestions Rick.

Gravatar is a globally recognized avatar based on your email address. re: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies
  Rick Strahl
  Paul Nesci
  Jun 18, 2021 @ 04:12pm

Moniker cannot open file means you don't have the IIS Management components installed or you lack permissions (although if you have a recent version that shouldn't happen because it should elevate automatically when you run).

Manually Installing IIS Features

+++ Rick ---

© 1996-2024