Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
thzero
@thzero
I have to disagree. You want to run the exact same web server in development as you do in production. That way you have confidence that you aren't running into any issues when it comes to deployment and actually running in non-local non-prod or prod environments. Same is true for using IIS locally instead of IIS Express. Node can be used for doing all the packaging, etc.
Konstantin Tarkus
@koistya
@thzero Yep, totally agree. That's the core idea of this starter kit, it runs exactly the same server (asp.net core + kestrel) in both development and production environments. In development environment there are just more tools available for debugging, for example by default it adds Hot Module Replacement (HMR), React Hot Loader, Browsersync on top of the running Kestrel server. It is also possible to disable these dev tools if needed, for example node run launches website with HMR enabled, not optimized code, node run --no-hmr launches the server without HMR, node run --production launches optimized version of the site
thzero
@thzero
Yes, I'm looking at what was put together. Personally I'm more interested in launching the front end ASP.NET Core app from VS and using the debugging tools, especially for the debugging backing controllers that act as a proxy to microservices that are in a private network, as opposed to sitting out in a DMZ.
Konstantin Tarkus
@koistya
@thzero if down the road you decide to bring front-end developers into the team, most likely they will work on Mac OS with Code/Atom/WebStorm.. so the project is optimized for the front-end devs working in Visual Studio Code or similar cross-platfrom editors, but it should be easy to add Visual Studio support.. will do that in one of the future commits.
Jeppe Terndrup
@terndrup
So just to clarify, the only thing needed on the production host machine is ASP.NET Core and IIS to host the site? @koistya
Konstantin Tarkus
@koistya
@terndrup that’s correct, if the site deployed to Linux-based machine, you will need to configure Nginx instead of IIS
@terndrup there is a publishing script included that deploys the app to Azure Web Apps, by running 'node run publish’ (see run.js)
Jeppe Terndrup
@terndrup
@koistya sorry to bother you again, do you know how to change the default port for the kestrel server (currently 5000) ? Ive looked through the startup and application settings and webconfig and cannot seem to find it
thzero
@thzero
dotnet run --server.urls http://*:<port> or you can edit the launchSettings.json and change the launchUrl
Jeppe Terndrup
@terndrup
Cheers!
Pengzhi Sun
@pengzhisun
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
  • configuration has an unknown property 'postcss'. These properties are valid:
    object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
    For typos: please correct them.
    For loader options: webpack 2 no longer allows custom properties in configuration.
    Loaders should be updated to allow passing options via loader options in module.rules.
    Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
    plugins: {
    new webpack.LoaderOptionsPlugin({
      // test: /\.xxx$/, // may apply this only for some modules
      options: {
        postcss: ...
      }
    })
    }
Daniel Laughland
@jabberwik
@pengzhisun Webpack 2.1 beta 23 added schema validation for the configs, if you downgrade to beta 22 it should make that go away
since the postcss section isn't official schema, and postcss has not yet updated to support the new query syntax, such is the way of things
they also made a webpack.LoaderOptions plugin but it's meant as a temporary fix
Pengzhi Sun
@pengzhisun
@jabberwik Thanks, the webpack@2.1.0-beta.22 worked well. Share will replace the webpack version in package.json file from "^2.1.0-beta.21" to "2.1.0-beta.22" explicitly?
btw, I'm using the Yoeman generator (generator-aspnetcore) instead of pulling the codes from GitHub
Jeppe Terndrup
@terndrup
@koistya is there a guide on how to make the starterkit work with IIS after it has been built? So far I can only get it to work by running the server.dll directly in console with .net core. Any resources for that? Thanks in advance!
Konstantin Tarkus
@koistya
@terndrup when you deploy the site to Azure App Service it should work there under IIS environment. I haven’t test it with the local IIS, you may want to look into https://github.com/kriasoft/aspnet-starter-kit/blob/master/server/web.config#L7 to make sure that the path to server.dll is correct so that IIS can find it, and IISNode module is anabled in your IIS instance
Aman Kubanychbek
@code4aman
Hi guys, I have a question about generated bundles location. Why not to use wwwroot folder so it can be discovered by VS Solution Explorer easily?
Aman Kubanychbek
@code4aman
VS SE is a pain, tbh)
zeLaur
@zelaur__twitter
Hi guys, just discovered and installed this awesome starter kit, and everything seems to run nice, I have 2 questions, 1st, I`m now on a win10 64bit machine, does this kit work on ubuntu based machines for development ? And also, I haven't use asp net core yet, and if posible can someone point me to a identity core example with react ?
Aman Kubanychbek
@code4aman
Identity stuff is unrelated to React. However you have to choose between cookie and token based auth, with second one you have to take a care about JWT or something similar on client side (say in Redux, since React is just a 'view').
zeLaur
@zelaur__twitter
Thx for the quick reply, I have build a react redux token based app, but backed by express and passport, I was courious on how this template is set-up to use identity core, if it wrapps the index.html in a cookie like solution ( think old school ) with a form based auth in a different page or it better to go the token way ( auth bearer etc ... ) and if there is any github project where I can take a look.
Aman Kubanychbek
@code4aman
I believe this starter kit was builded with Unix-first in mind (both dev and prod stage) or even for docker, but I'm on win10 x64 too 😃
zeLaur
@zelaur__twitter
:)
so, in your case, what approach did you have on the auth problem, cookie or tokens ?
Aman Kubanychbek
@code4aman
Unfortunately, I have no real experience with tokens based auth on asp.net
zeLaur
@zelaur__twitter
so cookies it is :)
Aman Kubanychbek
@code4aman
In my case - it is OK, in-house project. No public access
Konstantin Tarkus
@koistya
With a token-based authentication, I think you would still need to send it as a cookie, e.g. user enters username/password, clicks Login, that infor is sent to /token endpiont via Ajax, that endpoint generates a new token and sends it to the client in an HTTPOnly cookie (id_token), all subsequent requests to the server will send that token automatically. Then on the server, there should be a middleware that reads cookies.id_token value if it exists, decods it into a User object and puts it into request context so that all the remaining middlewares down the pipeline for that particular request have access to a decoded User object. On the client, if /token endpoint returned "true" or something like that, you can just redirect a user from the /login page to /dashboard etc. window.location.href = '/dashboard',
Master Kwoth
@Kwoth
I guess I am in a wrong place to as a quesiton about aspnetcore-spa yo generator?
Konstantin Tarkus
@koistya
@Kwoth yeah, that's another one, this project includes generator-aspnetcore
geminiyellow
@geminiyellow
hiha~~~ good morning everybody
geminiyellow
@geminiyellow
can i use vs for mac open this project ?
Konstantin Tarkus
@koistya
@geminiyellow hey! Didn't test it with VS for Mac yet..
geminiyellow
@geminiyellow
@koistya yes, not working, and the vs for Mac have some error on the .csproj
Aman Kubanychbek
@code4aman
Anyone else
Mike
@marque0ne_twitter
I'm curious, is there a reason running node run doesn't build the main.js and move it to the distilled folder?
Aman Kubanychbek
@code4aman
Anyone
Aman Kubanychbek
@code4aman
Damn this gitter android client is unusable 😠. Hi, did anybody migrated to webpack v2? I'm experiencing issues with npm run build, however it's absolutely OK if executed with debug flag. The error is in promise inside of bundle command.
Aman Kubanychbek
@code4aman
^ it was a webpack config issue.
Jeppe Terndrup
@terndrup
Hey guys, have any of you had issues with the starter kit in IE / Edge? When I try to run my application it just says '$ is not defined' - as if some of the webpack dependency loading fails
A Test
@atwitest_twitter
Hi! How does it compare to https://reactjs.net ?
omarsiddiqi
@omarsiddiqi
hey fellas wondering if anyone can help me understand my issue.
deployed the app to azure
using local git

but it gives me a HTTP Error 502.5 - Process Failure

Common causes of this issue:

The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port

what am i doing wrong?
any hellp will be appreciated. '
A Test
@atwitest_twitter
Hi @omarsiddiqi this might help aspnet/IISIntegration#252