Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

ASP.NET MVC

Vote:
 

Is there any support for ASP.NET MVC planned? The R2 release of EPiServer almost works in the RC of ASP.NET MVC, however there are some EPiServer WebControls that depend on that the Page inherits from PageBase. That 

It would be great to see some kind of support for ASP.NET MVC, or at least that the most problematic obstacles could be removed.

#27397
Jan 28, 2009 12:27
Vote:
 

I'm curious. How would you prefer the ASP.NET MVC support to look like (regarding to the whole model with the HtmlHelper etc.)? Which specific web controls are trying to use? What are the most problematic obstacles?

Is anyone else looking to use ASP.NET MVC?

Thanks /Cristian

#27430
Jan 29, 2009 18:01
Vote:
 

The two most troublesome problems I'm having right now is that the links to a MVC "page" isn't rewritten to a EPiServer friendly URL and that the PropertyLongStringControl throws a InvalidCastException exception.

 For example, if I use the action /Pages/Default as  base for a PageType, the link to a Page using this PageType would be /Pages/Default?id=123&epslanguage=en before rewriting. This link won't be detected by EPiServer, and I guess it would need to look at the defined routes to detect that it's a correct MVC action.

The WebControl problem is not that bad. Of the common controls only PropertyLongStringControl throws an exception. However some controls like PropertyXFormControl doesn't work as intended in MVC.

Another minor issue is that them regexp on the input field for "filename" on EditPageTypeBase.aspx looks for a file extension of .aspx...

/Gustav 

#27438
Jan 30, 2009 9:42
Vote:
 

Hi Cristian,

Yes, we are also looking forward to use it to increase the testability and the maintainability of our custom properties, modules, etc.

However, when I think about the architecture of EPiServer, it does not look quite possible to use all features of EPiServer using the ASP.NET MVC pattern. In my foreseeing, we will have problems defining friendly rewritten URL's and routes as well as with some other controls that might require ViewState.

As an employee of EPi, could you please share your ideas with us?

All the best,
Coskun Sunali
Microsoft MVP - ASP.NET
http://sunali.com
http://propeople.dk

#27459
Jan 30, 2009 12:40
Vote:
 

Hi there,

I already started implementing a test project. Gustav is right, I had the same problem with HttpFilter. It insisted on not rewriting links in MVC route patterns. However, I also found what is going wrong there. The HttpFilter that is responsible to help Url Rewriter to convert the url to friendly versions checks for URLs only with ".aspx" extension but because MCV pages don't have this, it simply ignores.

For instance /Blog/Post/?id=44 is not going to be rewritten but /Blog/Post.aspx?id=44 will be. So, EPi can help us by avoiding the extension check, may be. What do you think Cristian?

All the best,

Coskun Sunali

#27494
Edited, Jan 30, 2009 16:50
Vote:
 
Thank you. Good to know this. Without having checked what causes the URL behaviour I'm thinking that a custom UrlRewriteProvider could be a possible workaround. I'm afraid improvements in the web controls must wait until a future version.
#27515
Feb 02, 2009 10:17
Vote:
 

Hello,

 

When can we use MVC for production code with EPISERVER?

 

Where can I find documentation how to implement?

 

Greetings

#35527
Dec 15, 2009 9:16
Vote:
 

Opening up for MVC has high priority but we can not give you a date when it will be support for MVC in EPiServer CMS. That is, when it will be possible to create a site based on MVC on top of EPiServer CMS (it will though in CMS 6 be possible to build Gadgets for editors and they are based on the MVC framework).

So Cristians suggestion implementing an UrlRewriteProvider is probably the way to go right now.

We will keep you updated on world.episerver.com as soon as any new information is available.

/Roger

#35609
Dec 17, 2009 14:36
Vote:
 

Hi there,

 

Any update on .NET MVC - EPiServer integration?

 

Regards,

Steve

#74167
Aug 21, 2013 16:47
Vote:
 

There is built in MVC support in EPiServer 7, that was release about a year ago.

#74168
Aug 21, 2013 17:10
Vote:
 

Yes, this is now standard so I mark this thread as solved

#208838
Nov 04, 2019 9:42
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.