Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

web.config error #5774


User avatar
0
avanekar02 created

Hello

project runs fine in VS2017 but when i publish it , it shows the following error

as attached in the email.

This is my web.config file. the code tag i have added in this document but there is no code in the actual web.config file

<code> <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <handlers> <add name="aspNetCore" path="" verb="" modules="AspNetCoreModule" resourceType="Unspecified" /> </handlers> <aspNetCore processPath=".\NOOR.Sched.Web.Mvc.exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00" /> <httpProtocol> <customHeaders> <remove name="X-Powered-By" /> </customHeaders> </httpProtocol> </system.webServer> <connectionStrings> <add connectionString="Data Source=DESKTOP-8BDDUKQ\SQLExpress;Initial Catalog=SchedDB;Integrated Security=True" name="Default" /> </connectionStrings> </configuration> <!--ProjectGuid: a2213374-bb48-48fd-bbd4-81e6a961d866--> </code>


14 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    First, check if your drive has enough space!

    Second, install the .NET Core Windows Server Hosting bundle.

    Third, set your application pool .Net CLR version to "No managed code"

    1. Try to open IIs.
    2. Go to the Application pool.
    3. Open the Advanced Settings of Application Pool.
    4. Change the .Net CLR version from 'V4.0' to 'No Managed Code'.

    Lastly if none of them works, try enabling development time in IIS

    Ref: https://stackoverflow.com/questions/22199424/there-was-an-error-while-performing-this-operation

  • User Avatar
    0
    avanekar02 created

    Hello

    Alper, i followed your instruction but this is the error i am still getting

    i have attached the output

    Thanks Anwar

  • User Avatar
    0
    aaron created
    Support Team

    Answered in this topic: #4009@10eb3668-685c-4ea9-8469-9ee3da2ba77c

    <cite>ismcagdas: </cite>

    Have you installed ~~https<span></span>://aka.ms/dotnetcore.2.0.0-windowshosting~~ https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.1.5-windows-hosting-bundle-installer ? Please refer to this document https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x

  • User Avatar
    0
    avanekar02 created

    yes, ismcagdas

    i did install dotnetcore.2.0.0-windowshosting, from the above link but still the same error.

    thanks

  • User Avatar
    0
    aaron created
    Support Team

    Have you restarted your computer?

  • User Avatar
    0
    avanekar02 created

    yes, but i still face the same issue

  • User Avatar
    0
    ryancyq created
    Support Team

    can you share the web.config file that you have modified?

  • User Avatar
    0
    avanekar02 created

    this is the web config.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.webServer>
        <handlers>
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
        </handlers>
        <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00" />
        <httpProtocol>
          <customHeaders>
            <remove name="X-Powered-By" />
          </customHeaders>
        </httpProtocol>
      </system.webServer>
    </configuration>
    

    please login to http://103.117.180.197:8085 of my test server

    site runs fine from VS2017 editor

    it also throws this error sometime, image attached.

  • User Avatar
    0
    alper created
    Support Team

    The identity under which your web application runs in IIS doesn't have full access to the folder in which the web.config file is found. You can view/change the identity through the 'Advanced Settings' of the application pool that hosts your application. Folder permissions can be granted via Windows Explorer in the usual way.

  • User Avatar
    0
    avanekar02 created

    All permissions have been given , but the same error continues

  • User Avatar
    0
    aaron created
    Support Team

    Check the error in Logs.txt.

  • User Avatar
    0
    alper created
    Support Team

    Seems like your permissions still missing. Do this

    If you do this and still not working it means you had not restarted after you installed .Core Hosting Bundle.

    This is completely out of AspNet Zero code-base! And please only accept the right answer. You send multiple notifications to all the subscribers.

  • User Avatar
    0
    avanekar02 created

    Dear alper,

    Changed the identity to localsystem, and restarted the server.

    but i still have the same issue

  • User Avatar
    0
    alper created
    Support Team

    @aaron Check the error in Logs.txt.

    Did you check the logs? Is there any error in Logs.txt or is there a Logs.txt file in the project directory?