Giter Club home page Giter Club logo

Comments (8)

mcpnet avatar mcpnet commented on August 14, 2024

You need to open a browser and type "http://localhost:5001" in your browser. You should be able to see web page.

Absolutely you can run it locally without going to Azure. Above URL shows that it is running locally. That's really your local machine, not Azure.
What maybe is confusing you is the fact that you see Command Window (DOS window that you call it).
Nothing wrong there!!!!!
That's the beauty of the new ASP.NET CORE. It can run on anything, anywhere, even from that "little DOS window" that you call it, and no big "IIS" brother needed. :)

If you don't like it to run from your Command Window ("DOS window") then change the Solution Platforms option.
That's mean that you change dropdown value from "Mixed Platforms" option to maybe "Any CPU". Also change Debug Target (that Green Debug Arrow , START button) to maybe IIS Express option or any other available on your machine. You may have preselected "Kestrel" by default or something else. Selecting "IIS" or "IIS Express" will force new browser window to open when you run solution.
But, you may try to start learning that you don't really need IIS nor IIS Express. Kestrel maybe will be enough for you.
Don't be lazy. Open your browser and type your local URL in the address bar, like it is showed in that little "DOS" window. You may start liking that little Kestrel. Even if you run solution in IIS, Kestrel will be the one that executes things for you. No escape from it maybe.

Cheers.

Happy "A-NET-CORE-ing" .... or "Kestrel-ing" .... , whatever way you prefer to say it.

from partsunlimited.

dtzar avatar dtzar commented on August 14, 2024

Thanks for the reponse @mcpnet ! You can also run the aspnet45 branch local to your box too by going to the URL.

from partsunlimited.

eliassal avatar eliassal commented on August 14, 2024

thanks for your help, the site is running like a charm.

from partsunlimited.

eliassal avatar eliassal commented on August 14, 2024

By the way, is there any doc that can help undeerstand the architecture and new features used as it is developed with the most recent asp.net core 1 technology?
Thanks

from partsunlimited.

eliassal avatar eliassal commented on August 14, 2024

I started trying to understand, put a breakpoint on the line
var sqlConnectionString = Configuration["Data:DefaultConnection:ConnectionString"]; in ConfigureServices as I am not able to see where this configuration is stored.
Problem, debugger breaks on the line but all "Step Into, Step Over......" are greyed out, hovering on "sqlConnectionString" gives no indication.
Is this normal?

from partsunlimited.

mcpnet avatar mcpnet commented on August 14, 2024

https://docs.asp.net/
The URL for ASP.NET Core documentation.
Not all documents are developed, you may see only placeholders for many.
Also, some documents need to be updated as they were written using "OLD" approach and OLD name for the product.
Keep in mind that this is still work in progress. Things still change even is past RC1 going to RC2.

About Connection string.
What you experience while running the application is ABSOLUTELY normal.
That's the new feature that developers should appreciate. You don't need to have a real database, and in your case you don't have it.
You are using IN-MEMORY EF 7 feature in application and you don't need a connection string for it.
If you want to start using some real database then you will need to use a connection string.

from partsunlimited.

eliassal avatar eliassal commented on August 14, 2024

Thanks a lot for yoyr quick feedback, so as I am new to EF 7, which or how or what parameter indicate that EF service should use In-Memory in the case of Partsunlimited

from partsunlimited.

mcpnet avatar mcpnet commented on August 14, 2024

The fact that there is a no Connection String :)
It's that easy...
You want to build Context class without connection string, well, EF 7 will use in-memory database.
They assume that you will never use this in production as nothing gets stored permanently on any drive and in case of crash, power outage you will lost everything.
Use it for development ONLY. :)

Check the code, section where is checking for Connection string in Startup.cs :

....
var useInMemoryDatabase = string.IsNullOrWhiteSpace(sqlConnectionString);

        // Add EF services to the services container 
        if (useInMemoryDatabase_ || runningOnMono) 
        { 
            services.AddEntityFramework() 
                     .AddInMemoryDatabase() 
                     .AddDbContext<PartsUnlimitedContext>(options => 
                     { 
                         options.UseInMemoryDatabase(); 
                     }); 
         } 
         else 
         { 
             services.AddEntityFramework()                 
                     .AddSqlServer() 
                     .AddDbContext<PartsUnlimitedContext>(options => 
                     { 
                         options.UseSqlServer(sqlConnectionString); 
                     }); 
         } 

from partsunlimited.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.