Asp.net mvc3 web site extension - asp.net-mvc-3

Want to implement this feature but how?
We know that stack overflow has been written in asp.net mvc3 from what was stack overflow built with? .
When i am here i have never noticed .aspx extension in URL, but it should be there as all asp.net web site has it. it may be the silly point to ask. but i am very curious to know how to exactly hide the extension for asp.net web site.

In ASP.NET MVC you can map routes; which basically means you can map any incoming request to a URL to a given action...Take a look here to find out more.

You must read about URL Rewriting
http://msdn.microsoft.com/en-us/library/ms972974.aspx
or use this rewrite software
http://www.helicontech.com/isapi_rewrite/
Another good blog on the same can be accessed at
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
If you are using ASP.NET 4.0 you might consider going through
http://www.codeproject.com/Articles/77199/URL-Routing-with-ASP-NET-4-0

Related

Host an ASP.NET Core MVC application in an Azure Function

I have tried searching for this online, but could not find an approach that works. There are a few helpful links to host a Web API but nothing related to a full fledged MVC app that consists of Controllers and Views. Azure currently does not have built in support for this. Hence, wondering if this is something doable.
It is possible to achieve this through the use of Custom Handlers. This blog post goes into further detail on how to create a custom handler. Do note that this feature is currently in preview so support is limited.

How to create a web application?

I have a question. I need to create a web application, which should work and look like a normal desktop app, so with windows, dialogs etc. without refreshing every time the site, but I am not sure what should I use for that. I have only a little experience with php (one rather simple site).
I suppose I need ajax on the client site to do that (maybe jQuery), but what should I use on the server site and how can I load e.g. whole page without refreshing site? Should I use PHP or python or something else? Maybe with some frameworks?
Thanks for any advice.
If you want to have rich client side interaction, consider using a MVC /MVVM js framework as:
backbone.js;
ember.js;
knockout.js;
angular.js.
Everyone has pros and cons, here you can find a smart comparison resource.
Once you download the bootstrap stuff [css, js, images], no page reloads will issue, and the app will flow like a desktop one.
All data is fetched from and persisted to the server: further request are made in JSON / XML format, in a RESTful fashion possibly.
You can setup such webservice in many many ways, among the others:
Sinatra (Ruby);
Symfony (PHP);
Django (python).
As I am more familiar with MS technologies I would use ASP.NET MVC, and then on the client side you can use Telerik controls which are good and free. jQuery is also a great option for the client side development. For developing ASP.NET MVC you can use the Visual Studio Express which is free as well.
However, I do not know your specifications. Maybe it would not be good enough for you. Another option that you have is using WPF (MS again), with which you can really develop very rich behavior web applications.

ASP.Net MVC3 user authentication tutorials

I'm currently working as a developer on a website, and it's more or less my first time doing any sort of web development. We're currently at a stage that we need to do user authentication, but I have absolutely no idea how I can accomplish this.
To that end I've tried to do some googling and searching on SO, but my google-fu is currently failing me.
Are there any tutorials that can take me from knowing nothing about authentication, to being to set up some secure authentication on my website?
We're developing this under MVC3 with Razor view engine, if it helps at all.
I would say here is a good starting point. The fact that it's MVC3 isn't really going to change anything (i.e., the Razor view engine doesn't change anything about authentication in MVC)
Take a look at the ASP.NET MVC Music Store example application, specifically Part 7.
what ErOx posted + here is sample implementation of custom MembershipProvider

asp.net mvc 3.0 Global Filter for SSL pages

I’m in the process of creating a new C# asp.net mvc 3.0 project.
The web site will hold some public pages (such as: Home, about us, contact us, etc…) and hold some SSL enabled pages (such as: Login, Forgotpassword, Signup, in addition to all the pages in the application that the user will see after a successful authentication).
I’m curious to hear your thoughts (an opinion), before deciding on a particular approach.
I was thinking of using the Global Filter approach provided in MVC 3.0 in order to verify what are the pages being accessed…if the user is accessing public pages them make sure he’s in http:// if the user is accessing an SSL page then make sure it prints out the https://
Would the Global Filter approach be appropriate for what I’m trying to achieve?
Is there a good blog post for MVC 3.0 with such thing? (Currently googling).
Feel free to show me how or even propose an alternative.
Thanks
Sincerely
Vince
I believe this is what you are looking for...
http://weblogs.asp.net/jeffwids/archive/2010/08/19/how-to-switch-between-http-and-https-in-asp-net-mvc2.aspx

Is ASP.NET MVC flexible?

Can it easily be combined with jQuery, (ASP.NET) Ajax, ASP.NET webforms, other frameworks.
What about pulling dynamic code from ASP.NET MVC into for example classic ASP?
Does the MVC model mean that it is easy to customize code?
Background:
I have some experience that it can lead to problems to integrate frameworks relying on JavaScript with each other?
We have a classic ASP where we write new stuff in ASP.NET, and include .aspx code in the ASP files.
I am looking for some OS frameworks for stuff we need, and i think MVC based ones should be easier to adopt (KIGG)
ASP.NET MVC ships with jQuery as the default javascript framework, so no worries there. There aren't really any ties in the framework itself to jQuery so you could also switch it out with a framework of your choice. MVC comes with it's own AJAX implementation that builds on the base ASP.NET Ajax implementation (at least in javascript), so there is AJAX support but I think you'll find that it's different -- no UpdatePanels, for instance -- but you're able to do similar things.
You can mix WebForms with MVC, but you'll need to set up IgnoreRoutes for those URLs so they don't get processed. I confess that I haven't found a need to do this yet, but then I don't use third-party controls. That might be an area where, at least for now, you still need some WebForms. I've never used classic ASP and likely won't so I can't help you there.
You can use any Javascript framework with MVC, they have included Jquery as the default but any can work with it.
As far as flexibility, we have deployed a working site with ASP.NET webforms, MVC and .NET 1.1 libraries, so yes it is flexible.
In our experience ASP.NET MVC is the best thing MS have done for web development, especially if you like to control closely your html output and use web standards in your layout and design. We have used it for 6 Months and we are NEVER going back to web forms.
Have fun!

Resources