Skip to content

Troubleshooting

When I access the Accounts API using the default Accounts repository (accounts.json) it gives me an error: "Access to the path 'C:\inetpub\wwwroot\MyWebSite\App_Data\accounts.json' is denied".

Whenever the web server needs to write to the json files, you need to provide 'modify' privileges to the two machine accounts IIS_IUSRS and IUSR.

When I run my Web API through the IIS I get an error: "An error occurred while starting the application".

In the web.config file, change stdoutLogEnabled="false" to stdoutLogEnabled="true" and create the folder "logs" in the root of the folder. Run the web application again and inspect the log file created.

After deploying the Web API, the following error message occurs:

“Assets file 'C:\Users\abc\source\repos\WebApi\WebApi\obj\project.assets.json' doesn't have a target for '.NETFramework,Version=v4.7.2/win7-x64'. Ensure that restore has run and that you have included 'net472' in the TargetFrameworks for your project. You may also need to include 'win7-x64' in your project's RuntimeIdentifiers.”

The projects Platform Targets are set to "Any CPU". Set them to x64.

After deploying a Web API with the MIKECore provider component, the following error message occurs:

“Could not load file or assembly 'DHI.Chart.Map.dll' or one of its dependencies. The specified module could not be found.”

Ensure that the Application Pool the web service runs in does not have “Enable 32-bit Applications” set to true and that “Load User Profile” is set to true.