请高手给解决一下吧

Amigo2003 2003-08-29 09:33:44
An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.
The error occurred in: http://localhost/ThePhile/Default.aspx
Error Message: 无法生成临时类 (result=1)。 error CS0009: 未能打开元数据文件“C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\thephile\2dfac400\80e38ef\assembly\dl\c53c152d\900a4571_1c6ec301\Wrox.WebModules.Polls.Configuration.DLL”--“拒绝访问。 ”
Stack Trace:
System.InvalidOperationException: 无法生成临时类 (result=1)。 error CS0009: 未能打开元数据文件“C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\thephile\2dfac400\80e38ef\assembly\dl\c53c152d\900a4571_1c6ec301\Wrox.WebModules.Polls.Configuration.DLL”--“拒绝访问。 ” at System.Xml.Serialization.Compiler.Compile() at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings) at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlTypeMapping xmlTypeMapping) at System.Xml.Serialization.XmlSerializer..ctor(Type type) at Wrox.WebModules.Polls.Configuration.ModuleConfig.GetSettings() in E:\wrox\ThePhile\Modules\Polls2\Polls.Configuration\Configuration.cs:line 24 at Wrox.WebModules.Polls.Business.Question.GetCurrentID() in E:\wrox\ThePhile\Modules\Polls2\Polls.Business\Question.cs:line 128 at Wrox.WebModules.Polls.Web.Controls.User.Poll.DataBind() in E:\wrox\ThePhile\Modules\Polls2\Poll.ascx.cs:line 123 at Wrox.WebModules.Polls.Web.Controls.User.Poll.Page_Load(Object sender, EventArgs e) in E:\wrox\ThePhile\Modules\Polls2\Poll.ascx.cs:line 114 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()

这是什么错误啊,我从一个网站当了源代码,运行之后出现这种错误,一点也看不明白啊
...全文
87 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
Amigo2003 2003-08-30
  • 打赏
  • 举报
回复
好像不行啊,又出了这种错
Error Message: MapPath“e:/wrox/ThePhile/Config/Polls.Config”的路径无效。应为虚拟路径。
Amigo2003 2003-08-30
  • 打赏
  • 举报
回复
您是指把类似于value="~/Config/NewsManager.Config" /改成
value="e:/wrox/ThePhile/Config/NewsManager.Config" /么
哎,实在不行是不是可以把源代码发给你看看啊
编译都没什么问题,一运行就出错。。。
saucer 2003-08-30
  • 打赏
  • 举报
回复
改变 <appSettings>里的连接字符串或者所有的连接字符串到你自己的相应连接字符串
Amigo2003 2003-08-30
  • 打赏
  • 举报
回复
Change the connection string settings in web.cong file

Change the connection string settings in all the config files residing in the config folder.

上面的这两句话的意思是不是应该改变
web.congig文件里面的sqlConnectionString="data source=TULIP;
和config文件夹中的所有的config文件里面的<ConnectionString>server=(local)\NetSDK;
Amigo2003 2003-08-30
  • 打赏
  • 举报
回复
不好意思阿,很长啊
<%@ Register TagPrefix="WroxUser" TagName="SiteHeader" Src="Controls/SiteHeader.ascx" %>
<%@ Register TagPrefix="WroxUser" TagName="SiteFooter" Src="Controls/SiteFooter.ascx" %>
<%@ Register TagPrefix="Wrox" Namespace="Wrox.ThePhile.Web.Controls.Server" Assembly="ThePhile" %>
<%@ Register TagPrefix="uc1" TagName="Poll" Src="Modules/Polls2/Poll.ascx" %>
<%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="Wrox.ThePhile.Web._Default" %>
<%@ Register TagPrefix="uc1" TagName="Headlines" Src="Modules/NewsManager/Headlines.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Welcome to ThePhile.COM!</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="Styles/Navigator.css" rel="stylesheet">
<LINK href="Styles/ThePhile.css" rel="stylesheet">
</HEAD>
<body>
<form id="Default" method="post" runat="server">
<WROXUSER:SITEHEADER id="Header" runat="server"></WROXUSER:SITEHEADER><br>
<table cellSpacing="4" cellPadding="2" width="100%" border="0">
<tr>
<td vAlign="top" width="100%">Greetings,<br>
   <b>ThePhile.COM</b> is an example website written by Wrox
authors to illustrate the principals of design, specification, and
implementation of a content-based website in ASP.NET. This website is the
example that is built progressively in the <a href="http://www.wrox.com">Wrox Press</a>
book, <i>Professional ASP.NET Website Programming</i>.
<br>
<br>
<table style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" width="100%" border="0">
<tr>
<td>
<p>To get access to the admin features of this site, log in as "admin@thephile.com"
with the password "admin".</p>
<h3>Access the modules:</h3>
<P><A href="Modules/FileManager/BrowseFiles.aspx">File Manager</A></P>
<P>Users - <A href="Modules/Users/Admin/Default.aspx">Admin</A></P>
<P>News - <A href="http://localhost/ThePhile/Modules/NewsManager/ShowHeadlines.aspx">View
Headlines</A> - <A href="http://localhost/ThePhile/Modules/NewsManager/Admin/Categories.aspx">
Admin</A></P>
<P>Advertising - <A href="Modules/AdsManager/Admin.aspx">Admin</FONT></A> - advert
displayed in the footer of this page</P>
<P>Polls - <A HREF="http://localhost/ThePhile/Modules/Polls2/Admin/Questions.aspx">Admin</A>
- current poll to the left of this page</P>
<P>Mailing Lists - <A href="http://localhost/ThePhile/Modules/Lists/Admin/Lists.aspx">Admin</A></P>
<P>Forums - <A HREF="http://localhost/ThePhile/Modules/Forums/Default.aspx">Forums</A></P>
</td>
</tr>
</table>
</td>
<td align="right">
<P>
<Wrox:Navigator id="MenuNav" SourceFile="Config/NavMenu.xml" TransformFile="Transforms/NavMenu.xslt" runat="server" /></P>
<P> </P>
<P><STRONG>Current Poll:</STRONG></P>
<P>
<uc1:Poll id="Poll1" runat="server"></uc1:Poll></P>
</td>
</tr>
</table>
<WroxUser:SiteFooter id="Footer" runat="server" /></form>
</body>
</HTML>

我还把所有的.config文件中的server=CHARUL\NetSDK 改成了server=(local)\NetSDK,不知道有没有必要阿
saucer 2003-08-30
  • 打赏
  • 举报
回复
what is in default.aspx?
Amigo2003 2003-08-30
  • 打赏
  • 举报
回复
An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.
The error occurred in: http://localhost/ThePhile/Default.aspx
Error Message: SQL Server 不存在或访问被拒绝。
还是不行啊,是不是Default.aspx文件中的SQL Server中的连接有问题啊,可是看了看也没有这方面的内容
panyee 2003-08-29
  • 打赏
  • 举报
回复
<sessionState
mode="SQLServer"
.......
panyee 2003-08-29
  • 打赏
  • 举报
回复
你mode为InProc,它不会去调用sql 存session的
完全可以先不改这个


把其它地方的问题找出来

saucer 2003-08-29
  • 打赏
  • 举报
回复
sqlConnectionString="data source=TULIP;user id=sa;password="
Amigo2003 2003-08-29
  • 打赏
  • 举报
回复
好像还是不行啊
我在web.congig文件中把
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=(TULIP);user id=sa;password="
cookieless="false"
timeout="20"
/>

data source=(TULIP),TULIP是
SQL服务器名名称,结果又出错了
An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.
The error occurred in: http://localhost/ThePhile/Default.aspx
Error Message: SQL Server 不存在或访问被拒绝。
saucer 2003-08-29
  • 打赏
  • 举报
回复
try to change userName to "SYSTEM" in <processModel> in machine.config

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧