Access Denied to WebAPI with SSL

0

I've a xamarin forms app and a webAPI(FamilyTreeAPI). I've created a SSL certicate and configured the ip address and port number in the Windows FireWall and local IIS where I've added my webAPI. The problem is whenever I run the WebAPI through IIS (browse) or through visual studio, I get the access denied error. I've created the SSL certicate using this link [SSL Link][1] and added it to trusted root authority using MMC. I've also selected this cerificate in local IIS where I added the webapi project under Sites and enabled SSL in my visual studio project.

I get the access denied error when I run the api through Visual Studio or browse the api from my local IIS

            [Win32Exception(0x80004005): Access is denied]

        [ExternalException(0x80004005): Cannot execute a program.The command being executed was "C:\Users\ronen\source\repos\FamilyTreeApp\FamilyTreeAPI\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig  /fullpaths @"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\350d0314\b7ddfb69\m2btdpme.cmdline".]
        System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String & outputName, String & errorName, String trueCmdLine) + 1843
           System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String & outputName, String & errorName, String trueCmdLine) + 211
           System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String & outputName, String & errorName) + 129
           Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile(CompilerParameters options, String compilerFullPath, String arguments, String & outputFile, Int32 & nativeReturnValue) + 393
           Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames) + 863
           Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) + 185
           System.Web.Compilation.AssemblyBuilder.Compile() + 2032
           System.Web.Compilation.BuildProvidersCompiler.PerformBuild() + 357
           System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) + 12032237
           System.Web.Compilation.BuildManager.CompileGlobalAsax() + 52
           System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() + 341

        [HttpException(0x80004005): Cannot execute a program.The command being executed was "C:\Users\ronen\source\repos\FamilyTreeApp\FamilyTreeAPI\bin\roslyn\csc.exe" / shared / keepalive:"10" / noconfig / fullpaths @"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\350d0314\b7ddfb69\m2btdpme.cmdline".]
           System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() + 76
           System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() + 631
           System.Web.Compilation.BuildManager.CallAppInitializeMethod() + 38
           System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) + 758

        [HttpException(0x80004005): Cannot execute a program.The command being executed was "C:\Users\ronen\source\repos\FamilyTreeApp\FamilyTreeAPI\bin\roslyn\csc.exe" / shared / keepalive:"10" / noconfig / fullpaths @"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\350d0314\b7ddfb69\m2btdpme.cmdline".]
           System.Web.HttpRuntime.FirstRequestInit(HttpContext context) + 552
           System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) + 122
           System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) + 737

        Version Information: Microsoft.NET Framework Version:4.0.30319; ASP.NET Version:4.8.4250.0
        [
asp.net-web-api
ssl-certificate
asked on Stack Overflow Jan 6, 2021 by Jon doe • edited Jan 6, 2021 by Jason

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0