首页 新闻 会员 周边 捐助

asp.net core 在 ubuntu上发布 运行提示 ystem.ArgumentException: Illegal characters in path.错误

0
悬赏园豆:100 [已解决问题] 解决于 2017-01-03 12:28

详细错误日志如下:

Unhandled Exception: System.ArgumentException: Illegal characters in path.
Parameter name: path
at System.IO.PathInternal.CheckInvalidPathChars(String path)
at System.IO.Path.Combine(String path1, String path2)
at System.IO.UnixFileSystem.FileSystemEnumerable`1.<Enumerate>d__11.MoveNext()
at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
at System.IO.FileSystemWatcher.RunningInstance..ctor(FileSystemWatcher watcher, SafeFileHandle inotifyHandle, String directoryPath, Boolean includeSubdirectories, NotifyEvents notifyFilters, CancellationToken cancellationToken)
at System.IO.FileSystemWatcher.StartRaisingEvents()
at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at KwQues.Web.Startup..ctor(IHostingEnvironment env)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
at Microsoft.AspNetCore.Hosting.Internal.StartupLoader.LoadMethods(IServiceProvider hostingServiceProvider, Type startupType, String environmentName)
at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c__DisplayClass1_0.<UseStartup>b__1(IServiceProvider sp)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.<RealizeService>b__0(ServiceProvider provider)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureStartup()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at KwQues.Web.Program.Main(String[] args)

suxin的主页 suxin | 初学一级 | 园豆:82
提问于:2016-12-24 01:11
< >
分享
最佳答案
0
收获园豆:50
dudu | 高人七级 |园豆:30229 | 2016-12-24 10:42

 的确,是一个JS包里面  包含了中文

suxin | 园豆:82 (初学一级) | 2017-01-03 12:13
其他回答(4)
1

知道对应的代码,你给的path有问题,估计什么斜杆烦斜杆的问题,操作系统不一样

[秦时明月] | 园豆:738 (小虾三级) | 2016-12-24 10:33

ni说的是对  \在windows下面编译没法 我的 放到CentOS 下就报错,结果我换成 /

一切都ok了,很多人说是中文名称原因,查半天没有。现在又遇见一个这样结果不知道啥问题了!

 

提示错误一样的。两个项目一个问题解决了

支持(0) 反对(0) 寒@鹏 | 园豆:217 (菜鸟二级) | 2018-03-08 16:33
0

应该你的路径中有中文吧,在线工具站:http://www.ofmonkey.com

收获园豆:50
独孤飞 | 园豆:283 (菜鸟二级) | 2016-12-27 17:42
0

linux下的文件盘符和windows是有区别的,你把你路径拿出来看看

IT胡小帅 | 园豆:183 (初学一级) | 2016-12-30 09:11
0

.net 配ubuntu,牛!

CaiYongji | 园豆:1267 (小虾三级) | 2016-12-30 10:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册