Tree View works through VWD but not via local host or from a remote browser. /Server Error in '/' Application.
来源:互联网 发布:万网域名抢注 编辑:程序博客网 时间:2024/06/05 02:01
Tree View works through VWD but not via local host or from a remote browser.
Running the application through visual web developer and it works fine. But through local host or remotely, I get the following error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type System.Web.UI.WebControls.SiteMapDataSource from assembly System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
Source Error:
Line 7: <body>
Line 8: <form runat="server">
Line 9: <asp:SiteMapDataSource ID="mySiteMapDataSource"
Line 10: runat="server" />
Line 11: <asp:TreeView ID="myTreeView" runat="server"
Source File: c:/inetpub/wwwroot/sitemap_and_tree_view/TreeViewDemo.aspx Line: 9
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2379; ASP.NET Version:1.1.4322.2379
The code in the page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>TreeView Demo</title>
</head>
<body>
<form runat="server">
<asp:SiteMapDataSource ID="mySiteMapDataSource"
runat="server" />
<asp:TreeView ID="myTreeView" runat="server"
DataSourceID="mySiteMapDataSource" />
</form>
</body>
</html>
The sitemap file code:
<siteMap
xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode title="Home" url="~/Default.aspx"
description="Home">
<siteMapNode title="TreeViewDemo" url="~/TreeViewDemo.aspx"
description="TreeView Example" />
<siteMapNode title="ClickEvent" url="~/ClickEvent.aspx"
description="ClickEvent Example" />
<siteMapNode title="Loops" url="~/Loops.aspx"
description="Loops Example" />
</siteMapNode>
</siteMap>
I'm at a loss as it appears it's exactly as the book describes it.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type System.Web.UI.WebControls.SiteMapDataSource from assembly System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
Source Error:
Line 7: <body>
Line 8: <form runat="server">
Line 9: <asp:SiteMapDataSource ID="mySiteMapDataSource"
Line 10: runat="server" />
Line 11: <asp:TreeView ID="myTreeView" runat="server"
Source File: c:/inetpub/wwwroot/sitemap_and_tree_view/TreeViewDemo.aspx Line: 9
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2379; ASP.NET Version:1.1.4322.2379
The code in the page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>TreeView Demo</title>
</head>
<body>
<form runat="server">
<asp:SiteMapDataSource ID="mySiteMapDataSource"
runat="server" />
<asp:TreeView ID="myTreeView" runat="server"
DataSourceID="mySiteMapDataSource" />
</form>
</body>
</html>
The sitemap file code:
<siteMap
xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode title="Home" url="~/Default.aspx"
description="Home">
<siteMapNode title="TreeViewDemo" url="~/TreeViewDemo.aspx"
description="TreeView Example" />
<siteMapNode title="ClickEvent" url="~/ClickEvent.aspx"
description="ClickEvent Example" />
<siteMapNode title="Loops" url="~/Loops.aspx"
description="Loops Example" />
</siteMapNode>
</siteMap>
I'm at a loss as it appears it's exactly as the book describes it.
Yesterday, 18:49 #2
Community Advisor
Join Date: May 2003
Location: Washington, DC
Posts: 5,344
Key thing to note is
Your app is running in .NET 1.x, and DataSourceControls in general are .NET 2.0 or better controls. Make sure the .NET framework 2.0 is installed and that you have the virtual directory setup for .NET 2.0.
Quote:
System.Web, Version=1.0.5000.0 Yesterday, 21:11 #3
SitePoint Enthusiast
Join Date: Dec 2006
Location: The least technologically advanced state in the US
Posts: 75
Thank you for this information. I checked what version is installed via add/remove programs and I see .net 2 framework is installed. I went to IIS and see that it is using 1.1. Could someone point out how I can tell IIS to use 2.0 instead?
Thanks so much.
Found it, Thank you.
http://hkvstore.com/aspnetmaker/doc/aspnet2primer.htm
Thanks so much.
Found it, Thank you.
http://hkvstore.com/aspnetmaker/doc/aspnet2primer.htm
- Tree View works through VWD but not via local host or from a remote browser. /Server Error in '/' Application.
- Troubleshooting error in cloud but not happen in local
- Py第十七问Importing a Python module works from command line, but not from PyCharm
- Opening URL in a browser from JavaFX Desktop Application
- Why is the window.close() works in IE browser but not FireFox? "Warning: Scripts may not close windo
- put file from local to remote server
- Git: Delete a branch (local or remote)
- Error:SDK location not found. Define location with sdk.dir in the local.properties file or with an A
- Error:SDK location not found. Define location with sdk.dir in the local.properties file or with an A
- error: kernel launches from templates are not allowed in system files和/usr/local/lib/libhdf5.a: erro
- message from server: "Host 'admin-PC' is not a
- firefox 下 'innerText' works in IE, but not in Firefox
- Server Error in '/' Application.
- Server Error in '/' Application.
- Server Error in '/' Application.
- how to solve IMAil error ,550 unknown local host %s, not a gateway
- error MSB3073: 命令“REM Do not edit from the Visual Studio IDE! Customize via a JavaScriptCorePreLink.
- Centos7 can't connect ot Internet but IP & ssh from local works
- 研发中心招聘的背后
- JSF应用单点权限认证的构建与实现
- 自动自发(三)
- ARM开发的调试方法概述
- showModalDialog中的传值
- Tree View works through VWD but not via local host or from a remote browser. /Server Error in '/' Application.
- 心理分析 cn.txt
- 写给27岁以上的单身男性的100条忠告
- 一个浙大学生关于香港理大,浙大,清华的
- xml(XmlNodeReader 使用)(摘)
- U-boot移植日记(s3c44b0)
- bf去见他从前一直暗恋的女生了,我怎么办
- 运用 Range 对象处理 Word 文档内容(转载)
- 电话号码验证