✅ Error when loading due to norton antivirus
I get this error when I load my project. Before this happened norton antivirus did something to my computer and now Im getting this error
8 Replies
The "CreateAppHost" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> System.UnauthorizedAccessException: Access to the path 'C:\PassApp\PassApp\obj\Debug\net8.0-windows\apphost.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Microsoft.NET.HostModel.AppHost.HostWriter.<>c__DisplayClass8_0.<CreateAppHost>b__1()
at Microsoft.NET.HostModel.RetryUtil.RetryOnIOError(Action func)
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)
--- End of inner exception stack trace ---
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)
at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
---> (Inner Exception #0) System.UnauthorizedAccessException: Access to the path 'C:\PassApp\PassApp\obj\Debug\net8.0-windows\apphost.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Microsoft.NET.HostModel.AppHost.HostWriter.<>c__DisplayClass8_0.<CreateAppHost>b__1()
at Microsoft.NET.HostModel.RetryUtil.RetryOnIOError(Action func)
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)<---
---> (Inner Exception #1) System.UnauthorizedAccessException: Access to the path 'C:\PassApp\PassApp\obj\Debug\net8.0-windows\apphost.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)<---
The "CreateAppHost" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> System.UnauthorizedAccessException: Access to the path 'C:\PassApp\PassApp\obj\Debug\net8.0-windows\apphost.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Microsoft.NET.HostModel.AppHost.HostWriter.<>c__DisplayClass8_0.<CreateAppHost>b__1()
at Microsoft.NET.HostModel.RetryUtil.RetryOnIOError(Action func)
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)
--- End of inner exception stack trace ---
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)
at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
---> (Inner Exception #0) System.UnauthorizedAccessException: Access to the path 'C:\PassApp\PassApp\obj\Debug\net8.0-windows\apphost.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Microsoft.NET.HostModel.AppHost.HostWriter.<>c__DisplayClass8_0.<CreateAppHost>b__1()
at Microsoft.NET.HostModel.RetryUtil.RetryOnIOError(Action func)
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)<---
---> (Inner Exception #1) System.UnauthorizedAccessException: Access to the path 'C:\PassApp\PassApp\obj\Debug\net8.0-windows\apphost.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign, Boolean disableCetCompat, DotNetSearchOptions dotNetSearchOptions)<---
so get rid of norton
it's probably falsely identifying your program as a virus
antivirus software is a scam anyway, defender is all you actually need
spot on, it's like installing some random person inside your house to look after your front door by deciding who can enter or leave
okay
I used a backup and changed the folder name and it works properly
something about the folder must've been the problem
Access denied is permissions. If you're trying to run this app from IIS it's likely granting the IIS user access to the path would resolve this.
Unknown User•3d ago
Message Not Public
Sign In & Join Server To View
* close VS
* remove the hidden folder
.vs
* remove all bin
and obj
folder next to each csproj (DO NOT TOUCH THE .git
FOLDER OR WHAT'S INSIDE)
* restart vsUnknown User•3d ago
Message Not Public
Sign In & Join Server To View