??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美国产精品va在线观看,中文精品视频,中文字幕日韩欧美http://www.aygfsteel.com/unilobster/articles/331452.html渔R渔RThu, 09 Sep 2010 00:44:00 GMThttp://www.aygfsteel.com/unilobster/articles/331452.htmlhttp://www.aygfsteel.com/unilobster/comments/331452.htmlhttp://www.aygfsteel.com/unilobster/articles/331452.html#Feedback0http://www.aygfsteel.com/unilobster/comments/commentRss/331452.htmlhttp://www.aygfsteel.com/unilobster/services/trackbacks/331452.html背景Q?/strong>在本Z按顺序安装了vs2008Qvs2005Qvs2003?br />
现象Q?/strong>调试vs2003工程Ӟ报一下错?br />
Auto-attach to process '[5912] aspnet_wp.exe' on machine 'WUX-U431642D001' failed. A debugger is already attached to the process.

原因Q?/strong>应该是同时安装vs2003和vs2005造成的?br /> 因ؓ(f)ASP.NETq行Ӟ发出的HTTPhl过IISQ然后由IIS再专访给aspnet_wp.exeq行处理。所以如果aspnet_wp.exep|Q则无法完成h?br />
修改步骤Q?/strong>
1Q在q行里输?inetmgr.exe 打开IIS理?br /> 2Q在IIS的属性里有一个ASP.NET选项
3Q从下拉框里选择使用ASP.NET1.1版本
参考下?br />




渔R 2010-09-09 08:44 发表评论
]]>
.net入门普及(qing)-在ASP.NET 2.0中用页面导航控?/title><link>http://www.aygfsteel.com/unilobster/articles/331298.html</link><dc:creator>渔R</dc:creator><author>渔R</author><pubDate>Tue, 07 Sep 2010 06:27:00 GMT</pubDate><guid>http://www.aygfsteel.com/unilobster/articles/331298.html</guid><wfw:comment>http://www.aygfsteel.com/unilobster/comments/331298.html</wfw:comment><comments>http://www.aygfsteel.com/unilobster/articles/331298.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/unilobster/comments/commentRss/331298.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/unilobster/services/trackbacks/331298.html</trackback:ping><description><![CDATA[今天开始涉?net webE序的开发。因Z前一直很涉?qing),所以在下面引用一pd文章做入门普?qing)用?br /> 先从Menu菜单开始。这文章引用自Qhttp://www.cnblogs.com/xiaolin/archive/2006/12/11/589339.html<br /> <br /> <strong>在ASP.NET 2.0?strong style="background-color: rgb(255, 255, 255);">使用</strong>面D控g</strong><br /> <br /> ASP.NET 2.0中?strong>sitemapdatasource</strong>面D控g<br /> 几乎每个|站里,Z方便用户在网站中q行面DQ都不?span style="background-color: rgb(255, 255, 255);">使用</span>面D控g。有了页面导航的功能Q用户可以很方便地在一个复杂的|站中进行页面之间的跌{。在以往的WEB~程中,要写一个好的页面导航功能,q不是那么容易的Q也要用一些技巧。而在asp.net 2.0中,Z方便q行面DQ新增了一个叫做页面导航控?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>,<strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>中还可以l定C同的其他面控gQ比如treeview,menu{,十分灉|Q到能很方便地实现面D的不同Ş式,而且q提供了q行时的~程接口Q可以以~程的Ş式动态实现页面导航控件。本文将单以几个例子来介l一下在asp.net 2.0?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>如何实现面D?<br /> <strong>面D的结构和sitemapdatasource控g</strong><br /> 在asp.net 2.0中,要实现页面导航,应该先以xml的Ş式,提供出整个网站的面l构层次。我们可以编写一个叫web.sitemap的XML文本文gQ?在该文g中定义出整个要导航页面的l构层次。D例如下:(x)<br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);"> 1</span> <span style="color: rgb(0, 0, 0);">Q?xml version="1.0" encoding="utf-8" ?Q?br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 0);">QsiteMapQ?br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 0);"> QsiteMapNode title="Default" description="Home" url="Default.aspx" Q?br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 0);">  QsiteMapNode title="Members" description="Members" url="Members.aspx"Q?br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 0);">   QsiteMapNode title="My Account" description="My Account" url="MyAccount.aspx" /Q?br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 0);">   QsiteMapNode title="Products" description="Products" url="Products.aspx" /Q?br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(0, 0, 0);">  Q?siteMapNodeQ?br /> </span><span style="color: rgb(0, 128, 128);"> 8</span> <span style="color: rgb(0, 0, 0);">  QsiteMapNode title="Administration" description="Administration" url="~/Admin/Default.aspx"Q?br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(0, 0, 0);">   QsiteMapNode title="Customer" description="Customer Admin" url="~/Admin/Customer/default.aspx" /Q?br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 0);">   QsiteMapNode title="Products Admin" description="Products Admin" url="~/Admin/ProductsAdmin.aspx" /Q?br /> </span><span style="color: rgb(0, 128, 128);">11</span> <span style="color: rgb(0, 0, 0);">  Q?siteMapNodeQ?br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(0, 0, 0);"> Q?siteMapNodeQ?br /> </span><span style="color: rgb(0, 128, 128);">13</span> <span style="color: rgb(0, 0, 0);">Q?siteMapQ?/span></div> <br /> <br /> 我们可以看到Q其中,web.sitemap文g必须包含根结点sitemap。而且Q设|一个父sitemapnodel点Q该l点表明? 默认的站炚w,在该父sitemapnodel点下,可以有若q个子sitemapnodel点Q分别按层次l构代表了网站的各子栏目Q留意一下上? 中,各个子结点之间的包含关系Q。而每一个sitemapnodel点中,有如下若q个属性:(x)<br /> <ul> <li> URL属性:(x)该属性指D的栏目的地址链接Q在web.sitemap中定义中Q必L每个栏目的相对地址?/li> <li> Title属性:(x)该属性指出每个子栏目的名Uͼ昄在页面中?/li> <li> Description属性:(x)该属性指定时Q则用户在鼠标移动到该栏目时Q出现有兌栏目的相xC,cM于tooltips属性?/li> </ul> 在设计好sitemap属性后Q接下来可以一步步构徏面D功能了,主要有两个步骤:(x) <br /> <ul> <li>向页面中d<strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>控g。该控g?x)自动感应绑定web.sitemap中的内容?/li> <li>?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>控gl定到如sitemappath,treeview,menu{控件中Q也是_(d)它们的数据源设|ؓ(f)?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>控g?/li> </ul> 知道了方法后Q我们下面就分别以treeview,menu,sitemappath三种控gZ子,介绍一下如何和<strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>控gq行配合使用?br /> 先来介绍使用treeview控g?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong> 控g配合使用的方法。Treeview?wi)Ş列表控g十分适合于用来做面DQؓ(f)了能具体说明Q我们充分利用asp.net中的masterpage控gQ先搭徏Z个网站的基本框架架构?br /> 在visual web developer 2005 beta 1中,新徏一个网站,之后d上文的web.sitemap文gQ再d一个名叫Navigation的mastercd的页面,代码如下Q?br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);"> 1</span> <span style="color: rgb(0, 0, 0);">Q?@ Master Language="C#" %Q?br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 0);">Qhtml xmlns="http://www.w3.org/1999/xhtml" Q?br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 0);">Qhead id="Head1" runat="server"Q?br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 0);">QtitleQMaster PageQ?titleQ?br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 0);">Q?headQ?br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 0);">QbodyQ?br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(0, 0, 0);"> Qform id="form1" runat="server"Q?br /> </span><span style="color: rgb(0, 128, 128);"> 8</span> <span style="color: rgb(0, 0, 0);">  QdivQ?br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(0, 0, 0);">  Qtable style="width: 100%; height: 100%" border="1"Q?br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 0);">  QtrQ?br /> </span><span style="color: rgb(0, 128, 128);">11</span> <span style="color: rgb(0, 0, 0);">   Qtd style="width: 10%"Q?br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(0, 0, 0);">    Qasp:TreeView ID="TreeView1" Runat="server" DataSourceID="SiteMapDataSource1"<br /> </span><span style="color: rgb(0, 128, 128);">13</span> <span style="color: rgb(0, 0, 0);">      ExpandDepth="2" ShowExpandCollapse="False" NodeIndent="10"Q?br /> </span><span style="color: rgb(0, 128, 128);">14</span> <span style="color: rgb(0, 0, 0);">     QLevelStylesQ?br /> </span><span style="color: rgb(0, 128, 128);">15</span> <span style="color: rgb(0, 0, 0);">      Qasp:TreeNodeStyle Font-Bold="True" Font-Underline="False"/Q?br /> </span><span style="color: rgb(0, 128, 128);">16</span> <span style="color: rgb(0, 0, 0);">      Qasp:TreeNodeStyle Font-Italic="True" Font-Underline="False" /Q?br /> </span><span style="color: rgb(0, 128, 128);">17</span> <span style="color: rgb(0, 0, 0);">      Qasp:TreeNodeStyle Font-Size="X-Small" ImageUrl="bullet.gif" Font-Underline="False" /Q?br /> </span><span style="color: rgb(0, 128, 128);">18</span> <span style="color: rgb(0, 0, 0);">     Q?LevelStylesQ?br /> </span><span style="color: rgb(0, 128, 128);">19</span> <span style="color: rgb(0, 0, 0);">     QNodeStyle ChildNodesPadding="10" /Q?br /> </span><span style="color: rgb(0, 128, 128);">20</span> <span style="color: rgb(0, 0, 0);">    Q?asp:TreeViewQ?br /> </span><span style="color: rgb(0, 128, 128);">21</span> <span style="color: rgb(0, 0, 0);">   Q?tdQ?br /> </span><span style="color: rgb(0, 128, 128);">22</span> <span style="color: rgb(0, 0, 0);">   Qtd style="width: 100px"Q?br /> </span><span style="color: rgb(0, 128, 128);">23</span> <span style="color: rgb(0, 0, 0);">    Qasp:contentplaceholder id="ContentPlaceHolder1" runat="server"Q?br /> </span><span style="color: rgb(0, 128, 128);">24</span> <span style="color: rgb(0, 0, 0);">    Q?asp:contentplaceholderQ?br /> </span><span style="color: rgb(0, 128, 128);">25</span> <span style="color: rgb(0, 0, 0);">   Q?tdQ?br /> </span><span style="color: rgb(0, 128, 128);">26</span> <span style="color: rgb(0, 0, 0);">  Q?trQ?br /> </span><span style="color: rgb(0, 128, 128);">27</span> <span style="color: rgb(0, 0, 0);"> Q?tableQ?br /> </span><span style="color: rgb(0, 128, 128);">28</span> <span style="color: rgb(0, 0, 0);"> Qasp:SiteMapDataSource ID="SiteMapDataSource1" Runat="server"/Q?br /> </span><span style="color: rgb(0, 128, 128);">29</span> <span style="color: rgb(0, 0, 0);"> Q?divQ?br /> </span><span style="color: rgb(0, 128, 128);">30</span> <span style="color: rgb(0, 0, 0);">Q?formQ?br /> </span><span style="color: rgb(0, 128, 128);">31</span> <span style="color: rgb(0, 0, 0);">Q?bodyQ?br /> </span><span style="color: rgb(0, 128, 128);">32</span> <span style="color: rgb(0, 0, 0);">Q?htmlQ?/span></div> <br /> 在上面的代码中,其中的TREEVIEW控g中的DATASORUCE属性中Q就指定?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>控gQƈ且在treeview控g中,也定义了不同l点的样式?br /> 在完成了masterpage面后,q于已l把|站的模版页建立h了,接下来就可以新徏其他子页面,以承masterpage面Qƈ且新建各自页面的内容了。比如,新徏一个default.aspx面Q代码如下:(x)<br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);">1</span> <span style="color: rgb(0, 0, 0);">Q?@ Page Language="C#" MasterPageFile="Navigation.master" Title="Default Page"%Q?br /> </span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);">Qasp:Content ContentPlaceHolderID="ContentPlaceHolder1"<br /> </span><span style="color: rgb(0, 128, 128);">3</span> <span style="color: rgb(0, 0, 0);">ID="Content1" Runat="Server"Q?br /> </span><span style="color: rgb(0, 128, 128);">4</span> <span style="color: rgb(0, 0, 0);">This is the default page<br /> </span><span style="color: rgb(0, 128, 128);">5</span> <span style="color: rgb(0, 0, 0);">Q?asp:ContentQ?/span></div> <br /> 可以看到Q当建立了模版页后,可以新建其他的子页面了Q只需要在其中的contentplaceholderid中写入不同的内容可以了。运行v来后Q效果如图:(x)<br /> <div align="center"><img alt="" src="http://dev.yesky.com/image20010518/181175.gif" border="0" /></div> <br /> <br /> 接下来,我们来介l如何将menu菜单控g?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong> 控g配合使用。其中,我们在上面的例子的基上,在<table style="width: 100%; height: 100%" border="1"Q下面增加如下代码就可以了,<br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);">1</span> <span style="color: rgb(0, 0, 0);">Qtr height="100px"Q?br /> </span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);">Qtd colspan="2" align="left"Q?br /> </span><span style="color: rgb(0, 128, 128);">3</span> <span style="color: rgb(0, 0, 0);">Qasp:Menu ID="Menu1" Runat="Server"<br /> </span><span style="color: rgb(0, 128, 128);">4</span> <span style="color: rgb(0, 0, 0);">DataSourceID="SiteMapDataSource1"Q?br /> </span><span style="color: rgb(0, 128, 128);">5</span> <span style="color: rgb(0, 0, 0);">Q?asp:MenuQ?br /> </span><span style="color: rgb(0, 128, 128);">6</span> <span style="color: rgb(0, 0, 0);">Q?tdQ?br /> </span><span style="color: rgb(0, 128, 128);">7</span> <span style="color: rgb(0, 0, 0);">Q?trQ?/span></div> <br /> 其中Q我们增加了一个menu控gQ其中将其datasourceid属性设定ؓ(f)<strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>1可以了Q运行如下图Q当?dng)我们可以改变menu控g的显CZ|,如可以将其改成垂直样式显C?br /> <div align="center"><img alt="" src="http://dev.yesky.com/image20010518/181176.gif" border="0" /></div> <br /> 而对于我们经常见到的昄出页面当前\径的D条功能,在asp.net 2.0中也可以L实现Q我们可以用其中的sitemappath控g。我们紧接着在上文代码中的menu控g下,增加如下代码Q?br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);">1</span> <span style="color: rgb(0, 0, 0);">Qtr height="100px"Q?br /> </span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);">Qtd colspan="2" align="left"Q?br /> </span><span style="color: rgb(0, 128, 128);">3</span> <span style="color: rgb(0, 0, 0);">Currently Selected Page is:<br /> </span><span style="color: rgb(0, 128, 128);">4</span> <span style="color: rgb(0, 0, 0);">Qasp:SiteMapPath Runat="Server" ID="SiteMapPath1"Q</asp:SiteMapPathQ?br /> </span><span style="color: rgb(0, 128, 128);">5</span> <span style="color: rgb(0, 0, 0);">Q?tdQ?br /> </span><span style="color: rgb(0, 128, 128);">6</span> <span style="color: rgb(0, 0, 0);">Q?trQ?/span></div> <br /> 要注意的是,只要增加sitemappath控g可以了Q因为它?x)自动和已经增加?strong style="color: black; background-color: rgb(255, 255, 102);">sitemapdatasource</strong>控gq行l定的。我们ؓ(f)了说明问题,另外增加一个页面member.aspx,代码如下Q?br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);">1</span> <span style="color: rgb(0, 0, 0);">Q?@ Page Language="C#" MasterPageFile="Navigation.master" Title="Members Page"%Q?br /> </span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);">Qasp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="Content1" Runat="Server"Q?br /> </span><span style="color: rgb(0, 128, 128);">3</span> <span style="color: rgb(0, 0, 0);">This is the members page<br /> </span><span style="color: rgb(0, 128, 128);">4</span> <span style="color: rgb(0, 0, 0);">Q?asp:ContentQ?/span></div> <br /> q行l果如下Q?br /> <br /> <div align="center"><img alt="" src="http://dev.yesky.com/image20010518/181177.gif" border="0" /></div> <br /> 最后,我们看一下,如何通过~程的方式来获取面D中的相关数据。其中,必须引用到的是sitemapc,该类提供了很多相关的Ҏ(gu)和属 性,最重要的是currentnode属性,它可以指出当前用h在浏览的是哪一个栏目页面,q用来跟t用户在|站中的行动轨迹Qƈq行站点数据l计Q有 时是很有用的QD例如下:(x)<br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);"> 1</span> <span style="color: rgb(0, 0, 0);">Q?@ Page Language="C#" MasterPageFile="Navigation.master" Title="Members Page"%Q?br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 0);">Qscript runat="Server"Q?br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 0);">void Page_Load(object sender, EventArgs e)<br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 0);">{<br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 0);"> Response.Write("The currently selected root node is: " + SiteMap.CurrentNode.Description + "QbrQ?);<br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 0);"> Response.Write("The Parent for the currently selected node is : " +<br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(0, 0, 0);">   SiteMap.CurrentNode.ParentNode.Description);<br /> </span><span style="color: rgb(0, 128, 128);"> 8</span> <span style="color: rgb(0, 0, 0);">}<br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(0, 0, 0);">Q?scriptQ?br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 0);">Qasp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="Content1" Runat="Server"Q?br /> </span><span style="color: rgb(0, 128, 128);">11</span> <span style="color: rgb(0, 0, 0);">This is the members page<br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(0, 0, 0);">Q?asp:ContentQ?/span></div> <br /> 在这个例子中Q用程序的方式Q得Z用户当前正在览的栏目页面,以及(qing)该栏目的父栏目的名称Q运行结果如下图Q?br /> <div align="center"><img alt="" src="http://dev.yesky.com/image20010518/181178.gif" border="0" /></div> <br /> 可以看出Q在asp.net 2.0中,实现面D的功能十分灵z而且方便Q功能十分强大,更多的功能请参考MSDN?br /> <strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> c?<br /> 注意Q此cd .NET Framework 2.0 版中是新增的?<br /> <br /> 提供了一个数据源控gQW(xu)eb 服务器控件及(qing)其他控g可用该控gl定到分层的站点地图数据?br /> <strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 控g是站点地图数据的数据源,站点数据则由为站炚w|的站点地图提供E序q行存储?strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 佉K些ƈ非专门作为站点导航控件的 Web 服务器控Ӟ?TreeView、Menu ?DropDownList 控gQ能够绑定到分层的站点地图数据。可以用这?Web 服务器控件将站点地图昄一个ؓ(f)目录Q或者对站点q行d式导航。当?dng)?zhn)也可以使用 SiteMapPath 控gQ该控g被专门设计ؓ(f)一个站点导航控Ӟ因此不需?<strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 控g的实例?br /> <br /> <strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> l定到站点地图数据, q基于在站点地图层次l构中指定的起始节点昄其视图。默认情况下Qv始节Ҏ(gu)层次l构的根节点Q但也可以是层次l构中的M其他节点。v始节点由以下几个 <strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 属性的值来标识Q?br /> <br /> <br /> 起始节点<br /> 属性?br /> <br /> 层次l构的根节点Q默认设|)?br /> StartFromCurrentNode ?false?br /> <br /> 未设|?StartingNodeUrl?br /> <br /> 表示当前正在查看的页的节炏V?br /> StartFromCurrentNode ?true?br /> <br /> 未设|?StartingNodeUrl?br /> <br /> 层次l构的特定节炏V?br /> StartFromCurrentNode ?false?br /> <br /> 已设|?StartingNodeUrl?br /> <br /> <br /> 如果 StartingNodeOffset 属性设|ؓ(f)?0 的|则它?x)?jing)响v始节点以?qing)?<strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 控gZ该节点公开的站点地图数据层ơ结构。StartingNodeOffset 的gؓ(f)一个负整数或正整数Q该值标识从 StartFromCurrentNode ?StartingNodeUrl 属性所标识的v始节Ҏ(gu)站点地图层次l构上移或下Uȝ层敎ͼ以便Ҏ(gu)据源控g公开的子?wi)的起始节点q行偏移?br /> <br /> 如果 StartingNodeOffset 属性设|ؓ(f)负数 -nQ则p数据源控件公开的子?wi)的起始节点是所标识的v始节点上?n 个别的上节点。如?n 的值大于层ơ结构树(wi)中所标识起始节点上方的所有上U层U数Q则子树(wi)的v始节Ҏ(gu)站点地图层次l构的根节点?br /> <br /> 如果 StartingNodeOffset 属性设|ؓ(f)正数 +nQ则公开的子?wi)的起始节点是位于所标识的v始节点下?n 个别的子节炏V由于层ơ结构中可能存在多个子节点的分支Q因此,如果可能Q?strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> ?x)尝试根据所标识起始节点与表C当前被h늚节点之间的\径,直接解析子节炏V如果表C当前被h늚节点不在所标识起始节点的子?wi)中Q则忽略 StartingNodeOffset 属性的倹{如果表C当前被h늚节点与位于其上方的所标识起始节点之间的层U差距小?n 个别,则用当前被h作v始节炏V?br /> <br /> 站点地图数据是从 SiteMapProvider 对象Q如作ؓ(f) ASP.NET 的默认站点地图提供程序的 XmlSiteMapProviderQ中(g)索的。可指定为站炚w|的M提供E序?<strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 提供站点地图数据Qƈ且通过讉K SiteMap.Providers 集合可获得可用提供程序的列表?br /> <br /> 与所有数据源控g一P<strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 的每个实例都与单个帮助器对象兌Q该帮助器对象称为数据源视图。SiteMapDataSourceView 是一个基于站点地图数据的视图Q根据数据源的属性进行设|,q且通过调用 GetHierarchicalView Ҏ(gu)来检索此视图。SiteMapDataSourceView l护控g所l定到的 SiteMapNodeCollection 对象?<br /> <br /> 默认情况下,起始节点是层ơ结构的根节点,但是(zhn)可v始节点设|ؓ(f)M节点。v始节点可以是相对于站点地图中当前位置的一个节点,或者是相对于某个绝对位|的节点。通过讄 StartingNodeUrl 属性可指定起始节点?<br /> <br /> <strong style="color: black; background-color: rgb(255, 255, 102);">SiteMapDataSource</strong> 专用于导航数据,q且不支持排序、筛选、分|~存之类的常规数据源操作Q也不支持更新、插入或删除之类的数据记录操作?<br /> CZ<br /> <br /> 下面的代码示例演C如何以声明方式<strong><span style="background-color: rgb(255, 255, 255);">使用</span> SiteMapDataSource</strong> 控g?TreeView 控gl定C个站点地图。该站点地图数据从根节点U别开始检索?br /> <br /> <span style="color: red;">C# <br /> </span> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);"> 1</span> <span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);"><%</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">@ Page Language</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">C#</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"> </span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">%></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 255);"><!</span><span style="color: rgb(255, 0, 255);">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">HTML</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">BODY</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">FORM </span><span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">asp:SiteMapDataSource<br /> </span><span style="color: rgb(0, 128, 128);"> 8</span> <span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="SiteMapDataSource1"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">11</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">asp:TreeView<br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="TreeView1"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">13</span> <span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">14</span> <span style="color: rgb(255, 0, 0);">DataSourceID</span><span style="color: rgb(0, 0, 255);">="SiteMapDataSource1"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">15</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">asp:TreeView</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">16</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">17</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">FORM</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">18</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">BODY</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">19</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">HTML</span><span style="color: rgb(0, 0, 255);">></span></div> <br /> <span style="color: rgb(102, 102, 102);"><span style="color: red;">Visual Basic </span></span><br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);"> 1</span> <span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);"><%</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">@ Page Language</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">VB</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"> </span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">%></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 255);"><!</span><span style="color: rgb(255, 0, 255);">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">HTML</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">BODY</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">FORM </span><span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">asp:SiteMapDataSource<br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="SiteMapDataSource1"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 8</span> <span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">/></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">asp:TreeView<br /> </span><span style="color: rgb(0, 128, 128);">11</span> <span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="TreeView1"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">13</span> <span style="color: rgb(255, 0, 0);">DataSourceID</span><span style="color: rgb(0, 0, 255);">="SiteMapDataSource1"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">14</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">asp:TreeView</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">15</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">16</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">FORM</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">17</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">BODY</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">18</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">HTML</span><span style="color: rgb(0, 0, 255);">></span></div> <br /> <span style="color: red;">J#<br /> <br /> </span> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);"> 1</span> <span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);"><%</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">@ Page Language</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">=</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">VJ#</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);">"</span><span style="background-color: rgb(245, 245, 245); color: rgb(0, 0, 0);"> </span><span style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">%></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 255);"><!</span><span style="color: rgb(255, 0, 255);">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">HTML</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">BODY</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">FORM </span><span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">asp:SiteMapDataSource<br /> </span><span style="color: rgb(0, 128, 128);"> 8</span> <span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="SiteMapDataSource1"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">asp:SiteMapDataSource</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">11</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(0, 0, 255);"><</span><span style="color: rgb(128, 0, 0);">asp:TreeView<br /> </span><span style="color: rgb(0, 128, 128);">13</span> <span style="color: rgb(255, 0, 0);">id</span><span style="color: rgb(0, 0, 255);">="TreeView1"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">14</span> <span style="color: rgb(255, 0, 0);">runat</span><span style="color: rgb(0, 0, 255);">="server"</span><span style="color: rgb(255, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">15</span> <span style="color: rgb(255, 0, 0);">DataSourceID</span><span style="color: rgb(0, 0, 255);">="SiteMapDataSource1"</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">16</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">asp:TreeView</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">17</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">18</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">FORM</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">19</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">BODY</span><span style="color: rgb(0, 0, 255);">></span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">20</span> <span style="color: rgb(0, 0, 255);"></</span><span style="color: rgb(128, 0, 0);">HTML</span><span style="color: rgb(0, 0, 255);">></span></div>  <br /> <span style="color: rgb(102, 102, 102);">原文出处:http://www.ad0.cn/netfetch/article.asp?id=285</span><br /> <br /> <img src ="http://www.aygfsteel.com/unilobster/aggbug/331298.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/unilobster/" target="_blank">渔R</a> 2010-09-07 14:27 <a href="http://www.aygfsteel.com/unilobster/articles/331298.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>.net IIS Exception "Failed to access IIS metabase."http://www.aygfsteel.com/unilobster/articles/329352.html渔R渔RThu, 19 Aug 2010 05:22:00 GMThttp://www.aygfsteel.com/unilobster/articles/329352.htmlhttp://www.aygfsteel.com/unilobster/comments/329352.htmlhttp://www.aygfsteel.com/unilobster/articles/329352.html#Feedback0http://www.aygfsteel.com/unilobster/comments/commentRss/329352.htmlhttp://www.aygfsteel.com/unilobster/services/trackbacks/329352.htmlFailed to access IIS metabase.

Server Error in '/second' Application.

Failed to access IIS metabase.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.

Source Error:


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


-----------------求|的分割线------------------------------------

解决办法:

C:\WINNT\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i




渔R 2010-08-19 13:22 发表评论
]]>
վ֩ģ壺 ¤| | ͤ| ̨ǰ| | ຣʡ| | | ʼ| ƽ| ̩| | Զ| Ͽ| ۩| ʡ| | ̨| ̳| ʲ| | | ұ| Ӣ| ͤ| | Т| | ̩| ɽ| ˮ| ԫ| | | ȳ| ˿| | | üɽ| | |