简体   繁体   中英

Publish .NET Standard to IIS throws 403.14 error

I have published multiple .NET Core projects through VSTS to IIS and had no problems. However when I try to add a .NET Standard project I get a 403.14 - Forbidden error page. If I try and type in a specific route for the API to get a response it throws a 404 - Not Found error page.

I am using .NET Framework 4.6.1 which is also installed on my my IIS 8.0 server.

Is there any way to debug this issue or a way of fixing this issue?

You should check the Authentication the application is set to use in IIS.

If you aren't using Authentication, make sure that you have anonymous authentication enabled. You also need to make sure that the IIS user has access to the directory that your application is in.

If you want to use your domain account as authentication, then make sure Windows Authentication is turned on, and the account you are using has access to the directory your application is in. Also, make sure you are applying authentication at the action, controller, or application level in your code.

For more info, you can read the MSDN info here

.NET Standard is for non-executable assemblies (class libraries) so they can be shared between different executable assemblies.

When you publish an application to IIS, you need to use an executable DLL (.NET Framework or .NET Core), which rules out using .NET Standard. You can reference .NET Standard libraries from your application, but the entry point of the application cannot be .NET Standard.

However, it isn't clear why you are only discovering this when publishing to IIS, since an ASP.NET application that targets .NET Standard shouldn't run locally, either.

I was pointing to the wrong location on the server. I was pointing to the bin folder when I needed to be pointing to the project folder. Thanks for the help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM