After the. Net Core Web application is published to IIS, the following error occurs: "An error occurred while starting the application", occurredstarting

Source: Internet
Author: User
Tags microsoft iis

After the. Net Core Web application is published to IIS, the following error occurs: "An error occurred while starting the application", occurredstarting

An error occurred while starting the application.

. NET Core X64 v4.1.1.0 | Microsoft. AspNetCore. Hosting version 1.1.0-rtm-22752 | Microsoft Windows 6.3.9600

This error is reported, and the Environment is correctly configured according to the official documentation. What should I do?

1. Modify the web. config file and change stdoutLogEnabled to true, as shown below:

<aspNetCore processPath="dotnet" arguments=".\Dialysis.WebApi.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />

2. Open the website again and report the above error. Don't worry. Check the root directory of the release and find that there is an additional Logs folder to open the stdout_xxx.log file.

Application startup exception: System. IO. FileNotFoundException: cocould not find file 'G: \ FTP \ DialysisWebApi \ Dialysis. WebApi. xml '.
File name: 'G: \ FTP \ DialysisWebApi \ Dialysis. WebApi. xml'
At System. IO. Win32FileStream .. ctor (String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
At System. IO. Win32FileSystem. Open (String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
At System. IO. FileStream. Init (String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
At System. IO. FileStream... ctor (String path, FileMode mode, FileAccess access, FileShare share)
At System. Xml. XmlSystemPathResolver. GetEntity (Uri uri, String role, Type typeOfObjectToReturn)
At System. Xml. XmlTextReaderImpl. FinishInitUriString ()
At System. Xml. XmlTextReaderImpl .. ctor (String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
At System. Xml. XmlReaderSettings. CreateReader (String inputUri, XmlParserContext inputContext)
At System. Xml. XmlReader. Create (String inputUri)
At System. Xml. XPath. XPathDocument.. ctor (String uri, XmlSpace space)
At Swashbuckle. AspNetCore. SwaggerGen. SwaggerGenOptions. <> c _ DisplayClass24_0. <IncludeXmlComments> B _ 0 ()
At Swashbuckle. AspNetCore. SwaggerGen. SwaggerGenOptions. CreateSwaggerProvider (IServiceProvider serviceProvider)
At Microsoft. Extensions. DependencyInjection. ServiceLookup. CallSiteRuntimeResolver. VisitTransient (TransientCallSite transientCallSite, ServiceProvider provider)
At Microsoft. Extensions. DependencyInjection. ServiceProvider. <> c _ DisplayClass16_0. <RealizeService> B _ 0 (ServiceProvider provider)
At Microsoft. Extensions. Internal. ActivatorUtilities. ConstructorMatcher. CreateInstance (IServiceProvider provider)
At Microsoft. Extensions. Internal. ActivatorUtilities. CreateInstance (IServiceProvider provider, Type instanceType, Object [] parameters)
At Microsoft. AspNetCore. Builder. UseMiddlewareExtensions. <> c _ DisplayClass3_0. <UseMiddleware> B _ 0 (RequestDelegate next)
At Microsoft. AspNetCore. Builder. Internal. ApplicationBuilder. Build ()
At Microsoft. AspNetCore. Hosting. Internal. WebHost. BuildApplication ()
Hosting environment: Production
Content root path: G: \ FTP \ DialysisWebApi
Now listening on: http: // localhost: 22365
Application started. Press Ctrl + C to shut down.

 

If a file is missing, copy the file to the root directory of the release.

 

Released to Microsoft IIS official documentation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.