IIS网站部署后,程序常见错误记录

1、网站部署步骤

开启IIS服务、打开IIS管理器、添加网站、修改程序池(4.0)、部署完成。

2、常见问题记录(问题记录比较模糊,仅做参考)

(1)、对于web.config连接数据库的配置为windows身份验证,登录时(实际就是访问数据库时)会报这个错。

1 <connectionStrings>
2 <add name="fxszEntities1" connectionString="metadata=res://*/fxsz.csdl|res://*/fxsz.ssdl|res://*/fxsz.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=fxsz;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
3 </connectionStrings>
4 <!--<connectionStrings>
5 <add name="fxszEntities1" connectionString="metadata=res://*/fxsz.csdl|res://*/fxsz.ssdl|res://*/fxsz.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=fxsz;user id=sa;password=sa;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
6 </connectionStrings>-->
7 </span></div>
config配置
问题图
Picture

解决方法:把程序池里的标识改为LocalSystem即可

(2)未能加载文件或程序集“Zephyr.Web”或它的某一个依赖项。试图加载格式不正确的程序

Picture

异常详细信息: System.BadImageFormatException: 未能加载文件或程序集“Zephyr.Web”或它的某一个依赖项。试图加载格式不正确的程序。

原因分析:操作系统是64位的,但发布的程序引用了一些32位的ddl,所以出现了兼容性的问题。 
解决方案:IIS——应用程序池——高级设置——启用32位应用程序 :true。

 

转载于:https://www.cnblogs.com/dh123/p/9999224.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值