Search code examples
c#asp.netwebformswindows-server-2016

Why my app does not load correctly on local server?


I'm setting up a new app on a server on my work and when I access to the ip address on the explorer shows the default app

Default app

but when I try to access to the app that i created shows this error

My app

This is my web.config file

<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.webServer>
    <defaultDocument>
      <files>
        <clear />
        <add value="Default.aspx" />
      </files>
    </defaultDocument>
  </system.webServer>
  <system.web>
    <compilation targetFramework="4.5.2" />
    <httpRuntime targetFramework="4.5.2" />
    <pages>
      <controls>
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>
  </system.web>
  <appSettings>
    <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
  </appSettings>
</configuration>

This are my files

Files of application

I tried a lot of solutions, like permitions on folders on the IIS manager, enabling anonymous access, modifying web.config file, modifying the AutoEventWireup="true|false " etc but all of them leads me to the same error, can it be a compilation error? I am publishing via file system and pasted it on the wwwroot directory

Also I am using master pages except for the first page (the login)


Solution

  • With the configuration you are showing you most likely need to configure a virtual directory in IIS for your application to run in.