성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>launchSettings.json의 useSSL 옵션</h1> <p> launchSettings.json의 useSSL 옵션을,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > { "profiles": { "Docker": { "commandName": "Docker", "launchBrowser": true, "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "environmentVariables": { "ASPNETCORE_URLS": "http://localhost:5000" }, <span style='color: blue; font-weight: bold'>"useSSL": true</span> } }, } </pre> <br /> 의도적으로 추가하고 빌드 후, Visual Studio에서 실행하면 다음과 같은 오류가 발생할 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Debugging Error Adding the certificate to the Trusted Root Certficates store failed with the following error: Failed to create the certificate. For more details, please see the "Container Tools" output window. </pre> <br /> 이때의 "Container Tools" 출력창을 보면 이런 내용이 나옵니다.<br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> Could not find the global property 'UserSecretsId' in MSBuild project 'C:\temp\WebApplication1\WebApplication1\WebApplication1.csproj'. Ensure this property is set in the project or use the '--id' command line option.<br /> </div><br /> <br /> 물론 직접 UserSecretsId 속성을 추가해도 되지만, dotnet 실행 파일로 다음과 같이 csproj가 있는 디렉터리에서 실행해도 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > // Safe storage of app secrets in development in ASP.NET Core // <a target='tab' href='https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets'>https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets</a> // %APPDATA%\Microsoft\UserSecrets\<user_secrets_id>\secrets.json C:\temp\WebApplication1\WebApplication1> <span style='color: blue; font-weight: bold'>dotnet user-secrets init</span> </pre> <br /> 그럼, 다음과 같이 csproj 파일에 UserSecretsId가 추가되고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net7.0</TargetFramework> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <span style='color: blue; font-weight: bold'><UserSecretsId>8dcde3be-5144-48b0-bbf1-64db8c2c5a7a</UserSecretsId></span> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" /> </ItemGroup> </Project> </pre> <br /> 이후부터는 실행이 잘됩니다.<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
9936
(왼쪽의 숫자를 입력해야 합니다.)