Comments (5)
You seem to be missing specifying the server
Example from a working app:
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
from dnx.
@kichalla I repair that but new problem is
plication startup exception: System.IO.FileNotFoundException: The configuration file 'config.json' was not found and is not optional.
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at Gdou.App.Startup..ctor(IHostingEnvironment env) in C:\inetpub\wwwroot\gdouwechatapp\Gdou.Web\Startup.cs:line 28
--- 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 services, Type startupType, String environmentName)
at Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.<>c__DisplayClass1_0.b__1(IServiceProvider sp)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ScopedCallSite.Invoke(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()
Hosting environment: Production
Content root path: C:\gdouwechat
Now listening on: http://localhost:25801
Application started. Press Ctrl+C to shut down.
from dnx.
That would give the impression that your config.json isn't in the same directory as the exe and it's not optional
from dnx.
This repository isn't that right place to file any bugs as DNX is long gone. Please file issues on aspnet/Home
from dnx.
ok I reparir now thx @kichalla
from dnx.
Related Issues (20)
- Error when executing user-secret : System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Logging HOT 2
- Dnu restore and Team City feed HOT 3
- Status of SQL Server Management SKD in vNext?
- How to ignore a folder in global.json?
- package doesn't include Xml Documentation HOT 1
- DNU Restore does not work with custom protected nuget feeds in VSTS Build
- dnu publish will add a system.webServer section when not needed HOT 1
- DNX compilation handles fixed byte array incorrectly HOT 2
- Guidance for using ASP.NET Core 1 with net45 dependencies in RC2 - how to target Mono? HOT 3
- Error CS0433 The type 'SecureString' exists in both 'System.Security.SecureString, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' DNX 4.5.1.0 HOT 1
- The "FindConfigFiles" task failed unexpectedly, => System.IO.PathTooLongException: HOT 6
- Long time to restart dnx process
- Debuging at dnx startup HOT 1
- 'HelloWorld' does not contain a static 'Main' method suitable for an entry point HOT 1
- Resource generation uses Library name, not Default Namespace HOT 2
- RegistryKey in dotnetcoreapp?
- Invalid metadata section span HOT 1
- Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=4.1.0.0
- .net core centos 7.2 A large amount of view folders are not updated in time, so you need to restart applications HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnx.