The type or namespace name ‘AX’ does not exist

I was updating my enterprise portal server with Windows update and I had an enterprise portal site working on the machine before the updates. But after the update when trying to access the site then the application wouldn’t come up. So having a look at the event log there was a message in there something like this :

 

——————————————————-

Event code: 3007

Event message: A compilation error has occurred.

Event sequence: 3

Event occurrence: 1

Event detail code: 0

Application information:

Application domain: /LM/W3SVC/227106128/ROOT-1-130875914087696693

Trust level: Full

Application Virtual Path: /

Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\443\

Machine name: AXR3MAVM6

Process information:

Process ID: 5668

Process name: w3wp.exe

Account name: AXR3MOB\serviceac

Exception information:

Exception type: HttpCompileException

Exception message: c:\inetpub\wwwroot\wss\VirtualDirectories\443\App_Code\Proxies\TaxInformationLegalEntity_IN_Shallow.cs(12): error CS0234: The type or namespace name ‘AX’ does not exist in the namespace ‘Microsoft.Dynamics’ (are you missing an assembly reference?)

at System.Web.Compilation.AssemblyBuilder.Compile()

at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()

at System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed)

at System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories)

at System.Web.Compilation.BuildManager.CompileCodeDirectories()

at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

 

———————————————————————–

 

The key part of the message is this sentence

“The type or namespace name ‘AX’ does not exist in the namespace ‘Microsoft.Dynamics’ (are you missing an assembly reference?)”

It turns out this update refreshed the web.config file and so lost the applications settings for the Dynamics enterprise portal. I had a back-up of the web-config file so was able to just restore it back.

Here is a quick walk through of the error and correcting it.

I’ve also seen this happen when adding web servers to a web farm if you have the first site configured it can sometimes refresh the web.config and remove the settings.

Cheers

Lachlan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s