Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Redirecting to /Home/ in MVC
ccasalicchio
#1 Posted : Wednesday, August 28, 2013 6:48:17 AM(UTC)
ccasalicchio

Groups: Member
Joined: 8/28/2013(UTC)
Posts: 2
Location: Sorocaba

Hello Folks,

I have updated an old Cassini project to run standalone from a flash drive or CD and it's working great, including MVC applications [http://zueuz.net/projects/portable-aspnet-web-server.aspx].

But, whenever the app goes to root ("/") it just does a directory browsing, instead of redirecting to /home/

How did you overcome this issue with your server? I could just try and find the source code, locate the code that redirects to /Home/ and fix it that way, but figure that you guys are the experts and could have the answer faster than me fiddling around lines of code.

I know this is not directly related to your server, but since we have share the same ancestry (cassini) maybe you can help me out.

regads
ccasalicchio attached the following image(s):
ccasalicchio attached the following image(s): cassini.jpg
--
​Carlos Casalicchio / Information Technology Executive

Ultidev Team
#2 Posted : Wednesday, August 28, 2013 12:52:28 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Carlos.

In order for set default page for your MVC application, you simply need to set up your MVC routing correctly. This task is not webserver-specific. Once your MVC routing is set up, it will work properly in UWS, IIS, and any other server supporting MVC.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
ccasalicchio
#3 Posted : Wednesday, August 28, 2013 1:19:40 PM(UTC)
ccasalicchio

Groups: Member
Joined: 8/28/2013(UTC)
Posts: 2
Location: Sorocaba

Just for testing, I've ran nopCommerce 3.10 in both the new cassini implementation and UltiDev. UltiDev worked just fine, re-routing / to /home/, the cassini implementation went into directory browsing. I have to manually modify the url to include the /Home/ for it to work.

When you mentioned setting up the routing, did you mean in the actual MVC app, or in the server configuration?
--
​Carlos Casalicchio / Information Technology Executive

Ultidev Team
#4 Posted : Wednesday, August 28, 2013 10:20:32 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Carlos,

Sorry, we thought UWS was not routing correctly. Now we understand your question. For UWS we had to write a pretty complex piece of logic to determine whether in the absence of the default document we should serve directory content or delegate to custom handlers. Cassini 4 has lots of things missing that we had to add ourselves.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#5 Posted : Thursday, August 29, 2013 8:51:17 AM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

I'm thinking of just adding a checkbox in the GUI indicating that it's a MVC app, instead of winforms, and having it serve the pages based on that simple configuration. Do you know of any tutorial or roadmap to use to update Cassini to route / to /home/? I'd much rather not have to reinvent the wheel for this, since you guys have figured it out.

Best wishes,
Ultidev Team
#6 Posted : Thursday, August 29, 2013 9:21:22 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi,

We are not aware of any publicly available docs for this. The checkbox could be a decent solution.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#7 Posted : Friday, March 30, 2018 9:37:04 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Message was deleted by a Moderator.
Rss Feed  Atom Feed
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.