zoukankan      html  css  js  c++  java
  • 部署Mvc网站到本地IIS上-SQL Server DB 相关错误

    晚上部署Mvc网站到local的IIS上面时,问题一个接一个的冒出来了。(Windows 8 操作系统)

    >> HTTP Error 500.19 - Internal Server Error
    配置错误: 不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 overrideMode="Deny" 或旧有的 allowOverride="false" 的位置标记明确设置的。

    Solution: 从打开windows 功能那,Internet信息服务->万维网服务->应用程序开发功能->ASP.NET 4.5 选上。

    >> Sql Server 数据库访问失败。

    Debug模式下,我用的是Code First 的方式,程序自己创建的数据库,在C:UsersYoyo目录下的这个数据库文件,开始担心的是IIS不能访问,于是把数据库放在App_Data目录下,并修改web.config里的连接字符串,重新发布。事实上我现在还不确定,这个是否解决了问题。(自我鄙视一下)

    >>继续 Sql Server 数据库访问失败。(这次我截图了)(怀疑其实是上一个问题并未解决)

    发生了本地数据库运行时错误。 Cannot create an automatic instance.

    打开Windows事件日志,看到了这样的错误信息:“Cannot get a local application data path. Most probably a user profile is not loaded. If LocalDB is executed under IIS, make sure that profile loading is enabled for the current user.”

    Solution:

    在C:WindowsSystem32inetsrvconfig目录下,修改applicationHost.config文件,如下
    <add name="ASP.NET v4.0" autoStart="true" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated">
      <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="true" />
    </add>

    Reference link: Using LocalDB with Full IIS, Part 1: User Profile

    完毕!

  • 相关阅读:
    mysql常用基本命令
    mysql8.0.13下载与安装图文教程
    k8s ingress 增加跨域配置
    Jenkins 备份恢复插件 thinBackup 使用
    k8s HA master 节点宕机修复
    nginx 跨域问题解决
    mongodb 3.4.24 主从复制
    k8s 线上安装 jenkins并结合 jenkinsfile 实现 helm 自动化部署
    k8s helm 运用与自建helm仓库chartmuseum
    centos6 源码安装 unzip
  • 原文地址:https://www.cnblogs.com/yoyohappy/p/3593028.html
Copyright © 2011-2022 走看看