IIS,.netframework ,虚拟目录站点什么的看看
解决方案 »
- ASP.NET 发布网站和调试结果不一样
- 做网站时碰到的查询问题
- 求.net网页内可批量修改数据的类似DATAGRID控件
- asp.net Web.confg 文件的使用,有本事就进来
- Jmail发邮件的时候 The message was undeliverable
- {---- 200分,请高人出手,强人帮助 ----},是倒推程序的求助,小人儿急求
- 连接数据库时,老是报错:“用户IUSR_BENQ登陆失败,原因:未与信任的SQL Server 连接相关联”
- 长文本在页面中的格式问题?(100求)
- 刚学asp.net,想找个用c#写的连接mysql的类,大家帮我一下
- 在ftp站点上发布.net2.0网站,一旦加入web.config 就出错,关键是还没有出错信息,只是网页不显示任何东西
- 请高手解答,怎么生成SDK!
- 想找个上海熟悉Asp.net开发语言的程序员
第2种.在web.config的system.web节加入
<identity impersonate="true" userName="具有管理员权限的帐号名" password="相应的密码"/>
<configuration>
<appSettings/>
<connectionStrings>
<add name="wwgspConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=true;Data Source={0};Jet OLEDB:Database Password=xyjadmin"/>
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<!--
设置 compilation debug="true" 可将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="true">
</compilation>
<!--
通过 <authentication> 节可以配置 ASP.NET 用来
识别进入用户的
安全身份验证模式。
-->
<authentication mode="Windows"/>
<!--如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。-->
<!--<customErrors mode="Off" mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>-->
<httpHandlers>
<add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
</httpHandlers>
</system.web></configuration>
//这里获取数据库配置能在本地跑,应该没问题
string _connectionString = String.Format(ConfigurationManager.ConnectionStrings["wwgspConnectionString"].ToString(), AppDomain.CurrentDomain.BaseDirectory + "App_Data/xyjdb.mdb");
如果有的话,在web,config里面把它remove掉
事件来源: ASP.NET 2.0.50727.0
事件种类: Web Event
事件 ID: 1310
日期: 2009-6-1
事件: 12:34:14
用户: N/A
计算机: 82354E5B9C074E8
描述:
Event code: 3008
Event message: 发生了配置错误。
Event time: 2009-6-1 12:34:12
Event time (UTC): 2009-6-1 4:34:12
Event ID: 109a6686b33145ddb962d611db326f3b
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/xyz-1-128883044192498432
Trust level: Full
Application Virtual Path: /xyz
Application Path: C:\xyj\
Machine name: 82354E5B9C074E8
Process information:
Process ID: 2124
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: HttpException
Exception message: 未能加载文件或程序集“Microsoft.SqlServer.BatchParser, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”或它的某一个依赖项。由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (异常来自 HRESULT:0x800736B1)
Request information:
Request URL: http://localhost/xyz/Index.aspx
Request path: /xyz/Index.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: 在 System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
在 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
在 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
应该是服务器问题
服务类里是否有sql server2005,是否为正版
后来发现是项目Bin目录下多了一个:Microsoft.SqlServer.BatchParser.dll
文件,删除这个文件后正常再检查,发现是项目里不知道什么时候添加了:Microsoft.VisualStudio.TeamSystem.Data.UnitTesting
和Microsoft.VisualStudio.QualityTools.UnitTestFramework
2个引用
经咨询,有个同事添加新项,选择了添加数据库单元测试……解决方法:把刚才2个引用删除,就OK了