高分求救: 如何解决Could not load file or assembly...错误提示的问题?  急需,谢谢!

saji 2008-02-21 04:18:24
错误提示:
Could not load file or assembly 'BaseData, Version=1.0.2971.32544, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The module was expected to contain an assembly manifest.


'BaseData'是类集

在我本机上正常的,可是放到服务器上就提示这个错误.

谢谢大家帮忙,急需......
...全文
10429 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
saji 2008-02-22
  • 打赏
  • 举报
回复
问题解决了,谢谢大家.

把System.Configuration.ConfigurationManager.AppSettings["conn"].ToString() ;//2005
换成旧System.Configuration.ConfigurationSettings.AppSettings["conn"].ToString() ; //2003
就行.

很不想过时的,解决问题先.
lihongdian 2008-02-22
  • 打赏
  • 举报
回复
webcofing中应该引入程序集
like this

 <assemblies>
<add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
saji 2008-02-21
  • 打赏
  • 举报
回复
我是整个项目拷上服务器.BaseData在项目之外,BaseData.dll已经导入项目中.

另Web.config文件:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<RewriterConfig>
<Rules>
<!-- Rules for Blog Content Displayer -->

<RewriterRule>
<LookFor>~/index.aspx</LookFor>
<SendTo>~/Default.aspx</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<appSettings>
<add key="conn" value="Provider=Microsoft.Jet.OLEDB.4.0;User ID=$$$;Mode=Share Deny None;Jet OLEDB:Database Password=### ;Jet OLEDB:SFP=true;Data Source="></add>
<add key="data" value="~/db/DB.mdb;"></add>
</appSettings>


<system.web>

<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>

<compilation defaultLanguage="c#" debug="true"/>
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors mode="RemoteOnly"/>
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"

"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
-->

<authorization>
<!--<deny users="?" />-->
<!-- For testing with forms authentication... -->
<allow users="*"/>
<!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>

<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>

<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

</system.web>

</configuration>
lihongdian 2008-02-21
  • 打赏
  • 举报
回复
在服务器上安装BaseData程序集,并且在项目中引用,然后在webconfig里面设置.

你的程序集,应该传一个dll去服务器.

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

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