Thanks a lot man!!!!.... The best .net core videos.
@duytran56704 жыл бұрын
Thanks for video. Nice!
@TommiLipponen5 жыл бұрын
I just keep getting this "Hello World!" from Startup.cs last method. app.Run(async (context) => {await context.Response.WriteAsync("Hello World"); No 404 messages, no NotFound views, nothing, just Hello World! I am using ASP NET Core 3.1.1 and VS 16.4.3. Enviroment variable has no effect, any error gives me Hello World!. Kind of funny aigh. Edit; When i type url Error/404 it goes to that page, otherwise not. I have tried changes mentioned in previous comments too. Edit1; I got it; had to disable the last "Hello World" method. The request went down there through the pipeline without returning to if else block. Great tutorial Mr.Kudvenkat Sir.
@nithinreddykotta96804 жыл бұрын
Yes, I got the same problem and resolved it by disabling the last middleware which shows "Hello world" Thanks. But I have faced an another problem when i change my environment to production sizes and alignment have changed can anyone let me know. Thanks.
@SoftwareDeveloperAspNet3 жыл бұрын
@@nithinreddykotta9680 yes please do let me know about the same if you found solution. After changing aspnetcore_enviornment value to production design changes
@WeBreatheOxy2 жыл бұрын
my guy you saved my life here with this one ha
@jatinkumar4410 Жыл бұрын
amazing tutorial🔥
@nishthakapur9970165 жыл бұрын
Sir, can we add hyperlink in form if we have already given tag helper in form tag. Also how we can get value of textbox on controller? Not on form submit but on clicking hyperlink
@esracigdem27143 жыл бұрын
thank you, great content
@abeare96165 жыл бұрын
Very helpful thanks.
@gyan_ko_sagar4 жыл бұрын
Thanks for great video tutorial but i have one problem. This works as good as shown when we use other route than we have in our app. What if we have custom route with parameters to navigate and we state other parameters than it should be instead of showing error same page is viewed? My question: How to handle when the URL provided matches one of your routes, but the controller name OR PARAMETERS provided isn't correct.? I have setup my custom routes in start up as: endpoints.MapControllerRoute( name: "singleproduct", pattern: "productlist/{catlinkUrl}/{subcatlinkUrl?}/{sku}", defaults: new { controller = "Product", action = "SingleProduct" } ); endpoints.MapRazorPages(); This projects my url how it should be.. But if someone types diffrently in exact same route syntax then how to show notfound page error without redirecting
@nimaljvalath4 жыл бұрын
Those who still have 500 error , Move NotFound.cshtml to Error Folder(create) in Views. Also add @section scripts to NotFound.cshtml , [optional {if required add @model int -- for statusCode}] ...launchSettings.json : if you run in IIS Express profile keep -->profiles: "IIS Express" "ASPNETCORE_ENVIRONMENT": "Production" or if you run in EmployeeManagement --> "ASPNETCORE_ENVIRONMENT": "Production"..and use app.UseStatusCodePagesWithReExecute("/Error/{0}");
@williamneel55625 жыл бұрын
Hey guys need some help! I have followed these tutorials from the beginning and everything worked fine up til now. Any issues I had turned out to be typos. I have followed the suggestions in these comments but it does not change anything for me. If I navigate to /foo/bar I get a 500 error. What can I do?
@JacobGoodwin5 жыл бұрын
I had the same problem and there are potentially four questions related to this. I'll answer this most recent post, but credit to all of the others who asked. For me, the problem originated from the _ViewStart.cshtml code (in the top-level of the "Views" folder) that Venkat entered here kzbin.info/www/bejne/qGi6mJ2oibifhZo. I left this code, which handles views not inside of the home folder (we have a separate _ViewStart file in this folder overriding the higher-level one). Therefore, my NotFound page was attempting to load a layout View _NonAdminLayout that we never defined. You can fix the problem by changing the code of the top-level _ViewStart.cshtml file with the same code as that contained in the Home folder's _ViewStart.cshtml. Then the standard navbar layout will be applied to your NotFound.cshtml in the shared folder. Hope this resolves some 500 errors.
@wiontayne37945 жыл бұрын
@@JacobGoodwin Thank you very much mate, this solved my problem!
@Fetretim2 жыл бұрын
@@JacobGoodwin You saved my day man, thank you so much, this is solid..
@fabloalencar50764 жыл бұрын
Thank you! :)
@hanymohamed72195 жыл бұрын
Greate Thanks
@MegaJorgovan4 жыл бұрын
Why we created new Razor View called NotFound in Shared folder insead to create new folder Error (because we created ErrorController)? As we have Home folder for HomeController...
@javaguitarist4 жыл бұрын
This is so it will be available to any page, just like the _Layout shared view, not just views from the Home controller.
@sakthir38925 жыл бұрын
Thank you sir....
@p_andrej_5 жыл бұрын
After doing everything as you did, instead of getting Error/404 view, I got: This page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500 I changed environment back to Development and got: InvalidOperationException: The layout view '_NonAdminLayout' could not be located. The following locations were searched: /Views/Error/_NonAdminLayout.cshtml /Views/Shared/_NonAdminLayout.cshtml /Pages/Shared/_NonAdminLayout.cshtml So I copied _Layout.cshtml and renamed it to _NonAdminLayout.cshtml and it worked in both Development and Production environment. Is there another way to solve this (without _NonAdminLayout.cshtml) and does anyone know why it didn't work without _NonAdminLayout.cshtml? PS I'm working on Ubuntu machine and using Visual Studio Code which uses it's own launch.json instead of launchSettings.json and from what I've seen on one of the first tutorials in this series, VSC uses Kestrel server instead of Visual Studio's IIS Express.
@jariruddin5 жыл бұрын
Same response here, too, Helpn Please
@alih23994 жыл бұрын
@@jariruddin same here
@nithinreddykotta96804 жыл бұрын
@kudvenkat Hello sir, I have been following this tutorial from the very beginning and I absolutely loved each and every video Thank you soo much for helping. But I have faced an issue, So when ever i change my environment to production all the image cards alignment has changed in the Index page can you help me sort this problem?
@saikrishnak90814 жыл бұрын
Yes, even I had same problem, Did u resolve the issue ?
@hetalchavan94464 жыл бұрын
Facing the same issue. Any help is appreciated.
@saikrishnak90814 жыл бұрын
hey @@hetalchavan9446 , In Layout.cshtml .iF the environment is not development , we included a bootstrap cdn and this bootstrap cdn version should match the bootsrtrap version in html. In my case both are different, so i included the cdn which is same as bootstrap in html This resolved my issue
@hetalchavan94464 жыл бұрын
@@saikrishnak9081 Thanks! I will try this out.
@nys82604 жыл бұрын
Thanks
@miguelcastillo73463 жыл бұрын
Fucking thank you i was searching for this.
@excessiveaholecritic6725 жыл бұрын
Hello, For me everything works good, except for the fact that the code from the previous video doesn't work, when I change only the ID to 99 for example I get: 404 Not Found Error : Employee with Id = 0 cannot be found How do I fix this so that the ID showed will be 99 again.
@favorivideo6285 жыл бұрын
maybe because you are not in development stage
@bigalfantasy3 жыл бұрын
If anyone else got the 500 error, I was getting the same thing. I realized I had created the NotFound view in the Views folder and not the Views/Shared folder. Once I fixed that, the 500 error went away.
@josephregallis33945 жыл бұрын
I still get these error from using your code: CS0103 The name 'photo' does not exist in the current context EmployeeManagement C:\Projects\EmployeeManagement\EmployeeManagement\Controllers\HomeController.cs 155 Active Error CS0103 The name 'photo' does not exist in the current context EmployeeManagement C:\Projects\EmployeeManagement\EmployeeManagement\Controllers\HomeController.cs 159 Active
@qazifaheemafridi35885 жыл бұрын
Change the name of Photo to Photos and then check it
@afossible8865 жыл бұрын
I did the same as the video but why did i get error 500?
@Csharp-video-tutorialsBlogspot5 жыл бұрын
That's a bit strange. Can you please place a breakpoint and debug through to pin-point where it's actually going wrong. Will be great to know where it actually went wrong and if you have found the fix. Thank you for sharing.
@hossammetwally075 жыл бұрын
Why do we need a new ErrorController? We could just use the HomeController!
@metalguy81175 жыл бұрын
Clean Separation of Concerns
@darkogele5 жыл бұрын
Hmm this work only under IIS express not with full pledged IIS :(
@Csharp-video-tutorialsBlogspot5 жыл бұрын
Hello Darko - What happens when deployed on full blown IIS. Are you getting an error. Would you mind sharing the error and status code you are getting.
@FilmFaithVibes4 жыл бұрын
it still not working for me
@deepankarjoshi60572 жыл бұрын
Make sure to add /(slash) before the error page extension,this will prevent 500 error: app.UseStatusCodePagesWithReExecute("/Error/{0}");