I created my first MVC Web Site Application but when I run it all I get is a blank page with the following URL address:
http://localhost:2808/
And HTML code:
<HTML>
<head>
<!-- Please do not delete this file. It is used to ensure that ASP.NET MVC is activated by IIS when a user makes a "/" request to the server. -->
</head>
<body>
</body>
</html>
I looked everywhere on my code but I have no idea what am I doing wrong.
Could someone help me out or tell me what I should check?
Did you build the new VS templates and use those? They have a temporary fix that causes a redirect when hitting the default.aspx page. Not good but works for development at the moment. There was a change in the routing that caused files that exists to
not be handled by the routing handlers.
The DLL's I have (MVC, ...) were where taken after building the project I downloaded. I did nothing to the VS Templates. Not sure what you mean.
When I try to hit http://localhost:2808/Home/Index I get the following error:
The action method 'Index' on controller 'MyWebSite.Controllers.HomeController' has return type 'System.Void'. Action methods must return an ActionResult.
I have been trying to change my code but until now now luck.
shapper
Contributor
3932 Points
3789 Posts
What am I doing wrong?
May 17, 2008 04:19 PM|LINK
Hello,
I created my first MVC Web Site Application but when I run it all I get is a blank page with the following URL address:
http://localhost:2808/
And HTML code:
I looked everywhere on my code but I have no idea what am I doing wrong.
Could someone help me out or tell me what I should check?
Thanks,
Miguel
superevanc
Member
117 Points
50 Posts
Re: What am I doing wrong?
May 17, 2008 05:48 PM|LINK
Hey Miguel,
What version of the mvc framework are you using? there is a bug in the latest version that you may be bumping into.
shapper
Contributor
3932 Points
3789 Posts
Re: What am I doing wrong?
May 17, 2008 06:07 PM|LINK
Hi,
I am using the Preview 2 4/16 version I downloaded from CodePlex.
The only thing I did more than the standard example was to create the following structure:
Site.Master > Home.Master > Home(Index.aspx)
I think the rest is similar.
Any idea how to solve this?
Thanks,
Miguel
superevanc
Member
117 Points
50 Posts
Re: What am I doing wrong?
May 17, 2008 06:24 PM|LINK
Did you build the new VS templates and use those? They have a temporary fix that causes a redirect when hitting the default.aspx page. Not good but works for development at the moment. There was a change in the routing that caused files that exists to not be handled by the routing handlers.
(more info: http://haacked.com/archive/2008/04/10/upcoming-changes-in-routing.aspx)
This caused the root url's to not be routed. Supposed to be fixed in the next release from what I understand.
Can you hit /Home/index without a problem?
shapper
Contributor
3932 Points
3789 Posts
Re: What am I doing wrong?
May 17, 2008 07:07 PM|LINK
The DLL's I have (MVC, ...) were where taken after building the project I downloaded. I did nothing to the VS Templates. Not sure what you mean.
When I try to hit http://localhost:2808/Home/Index I get the following error:
The action method 'Index' on controller 'MyWebSite.Controllers.HomeController' has return type 'System.Void'. Action methods must return an ActionResult.
I have been trying to change my code but until now now luck.
shapper
Contributor
3932 Points
3789 Posts
Re: What am I doing wrong?
May 17, 2008 10:37 PM|LINK
I just used the new CodePlex Templates and it is working fine now!
This templates include a fix in Default.aspx that redirects to Home (Index.aspx).
Thanks,
Miguel