开发者

Tricks to find out if site is written in MVC? [closed]

开发者 https://www.devze.com 2023-02-16 05:00 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

Anyone know if any easy way to find out if a site is written in mvc?

And to take it a step further, assuming it is mvc to determine which pieces are asp.net forms?

I know just becau开发者_StackOverflowse they do or dont exist it doesn't mean 100% but it would be nice to have some things to look for certain headers that exist, or even existence of boilerplate code

i.e.(just a forms example):

onsubmit="javascript:return WebForm_OnSubmit();


No, you can't, at least no way that would be reliable, short of emailing the site's developer.


Unless the site developer has removed it, you get a header on each response that indicates the ASP.NET MVC version. I've tried this on three different sites I have using all three versions of MVC and it always appears.

X-Aspnetmvc-Version:1.0
X-Aspnetmvc-Version:2.0
X-Aspnetmvc-Version:3.0

note: StackOverflow removes all of the ASP.NET injected headers as far as I can tell


Well, the most obvious clue is that you don't have extensions to urls (like .aspx). Right?


The <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="" /> tag does not exist :)


Fire up Fiddler during the use of a website like www.codeplex.com and you can view header information:

Tricks to find out if site is written in MVC? [closed]


The X-AspNetMvc-Version header can be disabled in your Global.asax.cs file:

protected void Application_Start(object sender, EventArgs e)
{
    MvcHandler.DisableMvcResponseHeader = true;
    // ...
}
0

精彩评论

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