Server initialization failed.
See original GitHub issueRazor.VSCode version 6.0.0-alpha.1.20418.9
Razor’s trace level is currently set to ‘Off’
- To change Razor’s trace level set ‘razor.trace’ to ‘Off’, ‘Messages’ or ‘Verbose’ and then restart VSCode.
- To report issues invoke the ‘Report a Razor issue’ command via the command palette.
[Error - 7:25:38 PM] Server initialization failed.
Message: Internal Error - System.UnauthorizedAccessException: Access to the path ‘c:\Documents and Settings’ is denied.
at System.IO.Enumeration.FileSystemEnumerator1.CreateRelativeDirectoryHandle(ReadOnlySpan1 relativePath, String fullPath)
at System.IO.Enumeration.FileSystemEnumerator1.MoveNext() at System.Collections.Generic.LargeArrayBuilder1.AddRange(IEnumerable1 items) at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) at Microsoft.AspNetCore.Razor.LanguageServer.ProjectConfigurationFileChangeDetector.GetExistingConfigurationFiles(String workspaceDirectory) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectConfigurationFileChangeDetector.cs:line 119 at Microsoft.AspNetCore.Razor.LanguageServer.ProjectConfigurationFileChangeDetector.StartAsync(String workspaceDirectory, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectConfigurationFileChangeDetector.cs:line 56 at Microsoft.AspNetCore.Razor.LanguageServer.RazorFileChangeDetectorManager.InitializedAsync() in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorFileChangeDetectorManager.cs:line 46 at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageServer.<>c__DisplayClass9_0.<<CreateAsync>b__3>d.MoveNext() in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageServer.cs:line 83 --- End of stack trace from previous location --- at OmniSharp.Extensions.LanguageServer.Server.LanguageServer.MediatR.IRequestHandler<OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeParams,OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeResult>.Handle(InitializeParams request, CancellationToken token) at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate1 next) at MediatR.Pipeline.RequestPostProcessorBehavior2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate1 next) at MediatR.Pipeline.RequestPreProcessorBehavior2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate1 next) at OmniSharp.Extensions.JsonRpc.RequestRouterBase1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)
Code: -32602
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)

Top Related StackOverflow Question
CC @NTaylorMullen
Oooooo interesting. You can definitely open it wherever, it’s just not “as expected” when you open it at that level because all of your extensions & vscode itself will try to make sense of your entire C drive 😄