在运行时获取所有Web表单和每个Web表单中的存储过程的名称的问题. [英] Problem of getting name of all web forms and Stored procedures in each web forms at runtime.

查看:43
本文介绍了在运行时获取所有Web表单和每个Web表单中的存储过程的名称的问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有什么办法:
1.获取网站中使用的所有Web窗体的列表以及
2.获取每个Web窗体中使用的所有存储过程

当我们运行应用程序时.

我想在该网站的Web表单中生成html报告,该报告显示该WebSite中的所有表单以及每个表单中的所有存储过程.

如果您有解决方案,请提出建议.

谢谢.

Hi,

Is there any way:
1. To get list of all Web Forms used in Web site and also
2. To get all Stored Procedures used in each Web Forms

when we run application.

I want to produce an html report in a Web Form of that website which shows all Forms in that WebSite and all Stored Procedures in each Forms.

If you have a solution than please suggest me.

Thanks.

推荐答案

报价:

获取用于以下用途的所有Web表单的列表网站以及

To get list of all Web Forms used in Web site and also



您将必须通过触发HttpRequest或使用WebClient来获取网页中的所有URL,然后使用扩展名为".aspx"的URL来对网站进行爬网(即,读取html源代码).网站中的导航菜单最有可能始终在其"href"属性的锚标记中包含这些网址.您将不得不阅读这些内容.



You are gonna have to crawl the website (i.e. read the html source) by firing HttpRequests or by using WebClient to get all the URLs in a web page and then filter the ones with ".aspx" extensions. Most likely the navigation menu in a website would always have those urls in the anchor tags in their "href" attribute. You are gonna have to read those.

报价:

获取每个Web窗体中使用的所有存储过程

To get all Stored Procedures used in each Web Forms



无法做到这一点.由于任何服务器端代码都是C#/VB代码,在这种情况下,除非您在服务器上拥有自己的网站,否则您将无法访问该代码,那么为什么您一开始甚至需要这样的自动化程序?您可以直接查看代码,然后用笔在记事本中记下SP.



This cannot be done. Since any server side code would be the C#/VB code behind that you won''t get access to unless its your own web site on your server in which case, why would you even need such a automated program in the first place? you can just look into the code directly and jot down the SPs in a notepad with a pen.


添加到Aman.A的答案中(解决方案1):

如果这是您自己的站点,您可以访问其源,则添加简单的SiteMap将解决您的第一个问题.如果这是其他人的网站,那么问题是为什么您需要这样做?如果事实证明有充分的理由(很有可能),那么您就必须按照Aman已经解释过的方法对网站进行爬网.

对于存储过程,我再次说,如果这是您自己的站点,那么您只需要浏览站点中的所有页面并记下所有被调用的过程.为此构建自动化系统几乎是没有意义的.如果您要映射的站点不是您自己的,并且您没有访问源的权限,那么您很幸运,原因很充分.如果我写了一个网站,我绝不会希望我的服务器端体系结构可供公众浏览.这正是在UI和背景资源之间建立了层次的确切原因.
Adding to the Answer from Aman.A (Solution 1):

If this is your own site for which you have access to the source, then adding a simple SiteMap would take care of your first issue. If this is someone else''s site, then the question is why do you need to? If it turns out that there is a valid reason (which is very likely) then you would have to crawl the site as Aman has explained already.

For the Stored Procedures, again I''ll say that if this is your own site, then you simply have to go through all the pages in your site and note all the procedures being called. Building an automated system for this is pretty much pointless. If the site you want to map is not your own and you don''t have access to the source, then you are out of luck for good reason. If I write a site, I do not at any time want my server side architecture to be available to the public for its perusal. It is the exact reason there are layers built between the UI and background resources.


这篇关于在运行时获取所有Web表单和每个Web表单中的存储过程的名称的问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆