开发者

IIS does not recognize the page without .cshtml

开发者 https://www.devze.com 2023-03-05 07:44 出处:网络
Develop a website with WebMatrix and Razor. To make the call of the pages I\'m using the command: Href(\"~/Project/Details?ProjectID=\" + project.ID)

Develop a website with WebMatrix and Razor. To make the call of the pages I'm using the command:

Href("~/Project/Details?ProjectID=" + project.ID)

But I IIS returns 404 (not 开发者_StackOverflowfound). If you change the link and place. cshtml after the "Details" getting "... Details.cshtml? ProjectID = 1" oh yes it works.

And this behavior only happens with the site up on my local machine it does not.

I've seen the post here on stackoverflow talking about it, but this is a problem with the on-line (the host) and not local. So I have no way to reinstall anything

How to solve the problem? How does he understand that without the Outreach pages, he should look for her name + .cshtml


UPDATE This may be the problem: http://support.microsoft.com/kb/980368

Try

Href("~/Project/Details/?ProjectID=" + project.ID)

Note the forward slash prior to the querystring.

0

精彩评论

暂无评论...
验证码 换一张
取 消