3
I created a website in Visual Studio 2017, clicked to publish it and copied the files to the Inetpub/wwwroot folder
However, instead of the page being displayed, the url is returning me to the list of files from within the folder:
How to correct?
Follow my web.config:
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<compilation targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<directoryBrowse enabled="true" />
</system.webServer>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
</configuration>
<!--ProjectGuid: 518A8876-B620-4803-99F0-324F79C190B6-->
Configuration of the OSI
Is this port 88 correct? And did you just create a project? Modified something?
– Cassio Alves
I believe you need to disable listing files in directories: https://technet.microsoft.com/en-us/library/9b2f3d11-99c4-46b5-a92f-34af6909075b
– Jhonathan
I believe you should define the standard document to be opened, see the link: https://www.iis.net/configreference/system.webserver/defaultdocument
– Rovann Linhalis
@Cassioalves door 88 is correct yes, I chose it, because 80 is busy
– Italo Rodrigo
You could put up your Web.config
– Cassio Alves
boteoo web.config
– Italo Rodrigo
@Rovannlinhalis in the tutorial you gave me, asks to indicate a default file or index to be the default, but in the directory I’m not seeing this file
– Italo Rodrigo
What should be the file to open your site? What was the home page you created?
– Rovann Linhalis
Possibly is inside the for Views
– Rovann Linhalis
@Rovannlinhalis is, but I don’t know how to make it standard :/
– Italo Rodrigo
@Rovannlinhalis the site is in MVC, the home page is the controller Home and the View Index
– Italo Rodrigo
so if you type
http://localhost:88/Home/
will work ?– Rovann Linhalis
Post a screenshot of your iis > Select your website and print the screen
– Tiago S
@Tiagos print da tela = http://imgur.com/a/6xkXl
– Italo Rodrigo
@Rovannlinhalis if I try localhost:88/Home, the error is HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the page-related configuration data is invalid.
– Italo Rodrigo
there is already a question of configuration, possibly in your
.config
– Rovann Linhalis
The page listing is a security issue, the problem is that there is no file type in the folder that is default to open, type a default.aspx. The default IIS open files are configured per site. This is the.net mvc or web Forms?
– Intruso