Publishing asp.net application on IIS 8

1

I'm trying to publish my application on a windows server 2012 with IIS 8. I made the step by step go on "Site -> Add Website" fill in with the coordinates, paths, and so on. I deployed the default folder "Inetpub -> wwwroot", but I get the following error when testing on the server's own browse:

Myapplicationiswindowsauthentication.Theconnection,url,ipareok.LocalIcanusuallyaccesstheapplicationanddatabasethatareonanotherserver,butinIISwhenpublishingIcannot.ThiserroroccurswhenIleave'Enabled'forAnonymousAuthenticationand'Disabled'forWindowsAuthentication.WhenIreversetheauthenticationpopsupsoIpassmylogincredentials,butdoesnotacceptanyloginItryandafter3attemptsgivestheerror:

HTTPError401.1-UnauthorizedYoudonothavepermissiontoviewthisdirectoryorpageusingthecredentialsthatyouprovided.

Inoticedthatdisablingwindowsauthenticationandurl,passingthenameofaviewafter(myite.br/nomedeumaview)pageappearsbutdoesnotloadmydatathatshouldbeloadedsincemyapplicationiswindowsauthentication.

Mywebconfigandconnectionstring:

<?xmlversion="1.0" encoding="utf-8"?>

<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="BancoContext" connectionString="Data Source=(localdb)\v11.0; Initial Catalog=BancoContext-20140116130500; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=|DataDirectory|BancoContext-20140116130500.mdf" providerName="System.Data.SqlClient" />

</connectionStrings>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>

<customErrors mode="Off"/>
<roleManager enabled="true" defaultProvider="CustomRoleProvider">
  <providers>
    <clear />
    <add name="CustomRoleProvider" type="Banco.Business.CustomRoleProvider" connectionStringName="DefaultConnection" applicationName="/"/>
  </providers>
  </roleManager>

 <authentication mode="Windows" /> 

 <compilation debug="true" targetFramework="4.5" />
 <httpRuntime targetFramework="4.5" />


 <globalization uiCulture="pt-BR" culture="pt-BR" enableClientBasedCulture="true" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" />
<authorization>
  <deny users="?" />
</authorization>

<pages>
  <namespaces>
    <add namespace="System.Web.Helpers" />
    <add namespace="System.Web.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Optimization" />
    <add namespace="System.Web.Routing" />
    <add namespace="System.Web.WebPages" />
  </namespaces>
  </pages>
 </system.web>

  public const string CONNECTION_STRING = @"Data Source=Servidor;Initial Catalog=Banco;User Id=integracao;Password=00000;MultipleActiveResultSets=True;";
  public const string DEVELOPMENT_CONNECTION_STRING = @"Data Source=Servidor;Initial Catalog=Banco;Integrated Security=SSPI;MultipleActiveResultSets=True;";
    
asked by anonymous 21.10.2014 / 20:15

0 answers