0
I am trying to publish my application on a Windows server 2012 with IIS 8. I have taken the step by step to go to "Site -> Add Website" and fill in the coordinates, paths and etc. I have deployed it in the default folder "Inetpub -> wwwroot"however, I get the following errors when testing on the server itself or accessing the url from outside on my intranet.
By Chrome
Both above I am using by IIS a 'Authentication = Disabled'. When I step to 'Authentication = Enabled' this is the error:
My webconfig is like this:
<?xml version="1.0" encoding="utf-8"?>
<customErrors mode="Off"/>
<roleManager enabled="true" defaultProvider="CustomRoleProvider">
<providers>
<clear />
<add name="CustomRoleProvider" type="Competências.Business.CustomRoleProvider" connectionStringName="DefaultConnection" applicationName="/"/>
</providers>
</roleManager>
<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>
And my connectionstring:
public const string CONNECTION_STRING = @"Data Source=XXXXXX;Initial Catalog=Competências;User Id=integracao;Password=XXXXX;MultipleActiveResultSets=True;";
public const string DEVELOPMENT_CONNECTION_STRING = @"Data Source=XXXXXX;Initial Catalog=Competências;Integrated Security=SSPI;MultipleActiveResultSets=True;";
What is missing to configure correctly to be able to publish my application?
added the suggested code @Anmaia to webconfig. Now the error is Login failed for user 'Dominio servidordoIIS$'.
– PFVictor
What you should do and configure your application pool to use the Windows user as well. Most likely you are using Localsystem, you should change the identity to Applicationpoolidentity, see if that link help you.
– anmaia
I had already checked this... Was Applicationpoolidentity already.
– PFVictor