Panowie,
Tylko 500. Bez YSOD, nie wiem czego szukać w EventLoggerze, log z folder inetpub/logs/LogFiles poniżej
#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2019-11-06 18:15:02
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2019-11-06 18:15:02 ::1 GET / - 81 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/78.0.3904.87+Safari/537.36 - 500 0 0 11391
2019-11-06 18:16:24 ::1 GET / - 81 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/78.0.3904.87+Safari/537.36 - 500 0 0 1906
@Juhas
Moim zdaniem jest coś z configiem. Web.config poniżej
Kopiuj
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\MemorableQuotes.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: e1e2e755-819e-458f-a7c3-4ec9904141fe-->
Kod z klasy z której dodaje connection string
Kopiuj
public class DbHelper
{
public static SqlConnection GetConnection()
{
return new SqlConnection(@"Server=Ja-PC\SQLEXPRESS; AttachDbFilename = C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\MemorableQuotesDb.mdf; Database = MemorableQuotesDb;
Trusted_Connection = Yes;");
}
}
EDIT
Error z EventViewera
Cannot attach the file 'C:\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\DATA\MemorableQuotesDb.mdf' as database 'MemorableQuotesDb'. [CLIENT: <local machine="machine">]