GithubHelp home page GithubHelp logo

运行失败 about example-oidc HOT 22 OPEN

linianhui avatar linianhui commented on July 17, 2024
运行失败

from example-oidc.

Comments (22)

mygaochunming avatar mygaochunming commented on July 17, 2024

按照上面的方法安装了vs2015,上面那个问题解决了,不过又有新的问题:

image

我装vs2017试试

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

安装了vs2017又报这个错误:

image

………………

from example-oidc.

linianhui avatar linianhui commented on July 17, 2024

你用vs2017 打开一下oidc.example.sln试试能不能编译.

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

image

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

我重新装一下试试再

from example-oidc.

linianhui avatar linianhui commented on July 17, 2024

安装vs的时候: 其他部分的组件可以不要; .net core和 aspnet 那部分装上去.

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

我用vs2017打开项目的时候,自动提示我升级。我升级以后,在vs2017中用oidc.example.sln运行报错:
image
用命令提示符运行build.ps1,报错:
image
到deploy这一步了,估计快成功了,不知道哪里还有点问题

from example-oidc.

linianhui avatar linianhui commented on July 17, 2024
  1. 管理员运行命令.
  2. 开启本机的iis.

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

@linianhui 非常感谢,是win10默认没有安装iis,安装iis后就好了。目前出现以下问题,为了以后的小伙伴能看到如何解决的,我把问题和解决方法也贴出来:

image

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

@linianhui 我在百度上搜了很多修改host文件的方法,只有通过在etc文件夹下通过管理员身份运行命令提示符打开记事本的方式修改host文件对我是有用的,通过修改host文件的属性的方式对我没用。

所以我想,我能否手动添加host中的内容。然后在启动脚本中把修改host内容这块去掉。

请问,我改修改哪个文件呢?

=====================我是一条分割线====================================

记录一下win10修改host的步骤,以备小伙伴们需要,我是通过以下方式解决的:

这是配置,里面有张图有错误,就是切换到“安全标签”那个地方,图片显示的是“常规”。这个地方切换到“安全”标签操作。

=====================我又是一条分割线===================================

上面配置完成以后,通过管理员运行命令提示符,再运行build.ps1脚本应该就可以了。

我是手工设置的host,这样用管理员运行命令提示符:

image

输入:notepad 并回车打开记事本

image

在记事本中打开host文件,这个地方选择“所有类型”

image

修改完可以保存。

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

我手动添加了host:

127.0.0.1 oidc-server.test
127.0.0.1 oidc-client-hybrid.test
127.0.0.1 oidc-client-js.test
127.0.0.1 oauth2-resources-aspnetcore.test
127.0.0.1 oauth2-client-aspnetcore.test

部署通过了:
image

貌似build.ps1能够写入host文件了,部署后的host文件:

127.0.0.1 oidc-server.test
127.0.0.1 oidc-client-hybrid.test
127.0.0.1 oidc-client-js.test
127.0.0.1 oauth2-resources-aspnetcore.test
127.0.0.1 oauth2-client-aspnetcore.test

127.0.0.1 oauth2-client-owin.test
127.0.0.1 oauth2-resources-owin.test
127.0.0.1 oidc-client-implicit.test

但启动后,访问不了:

image

继续查找问题……

from example-oidc.

linianhui avatar linianhui commented on July 17, 2024

你试试docker的吧, 我更新了下docker的构建方式. 现在只需运行docker-compose up -d 即可. 无需安装net环境了.

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

刚重新pull了一下,然后重启,还是报那个错误,查看详细信息:

image

@linianhui 有办法解决吗?

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

@linianhui ok,谢谢。我试试

from example-oidc.

linianhui avatar linianhui commented on July 17, 2024

iis上运行的化还需要一个asp net core module的组件(被包含在这个安装包里面 https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.1.2-windows-hosting-bundle-installer)

from example-oidc.

linianhui avatar linianhui commented on July 17, 2024

是的, build.ps1会自动修改hosts文件的, 前提是hosts允许被修改(建议修改为当前用户可以读写即可).

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

win10下安装了上面那个asp net core module组件后,启动报另外的错误:

image

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

我试试docker(一台服务器,配置:centos7、docker18.03.0-ce):

image

@linianhui 我如果要通过我的win10访问,是不是得把我win10 的host都修改为:

服务器IP oidc-server.test
服务器IP oidc-client-hybrid.test
服务器IP oidc-client-js.test
服务器IP oauth2-resources-aspnetcore.test
服务器IP oauth2-client-aspnetcore.test

服务器IP oauth2-client-owin.test
服务器IP oauth2-resources-owin.test
服务器IP oidc-client-implicit.test

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

@linianhui 通过上面修改host,测试通过了。

win10上搭建这个测试环境还是没有成功,不过docker上可以用了,就用docker部署的环境研究你之前的blog

多谢指教!

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

blog中的例子只能运行在win下……

image

from example-oidc.

linianhui avatar linianhui commented on July 17, 2024

回头我把implicit那个站点升级成asp.net core的.

from example-oidc.

mygaochunming avatar mygaochunming commented on July 17, 2024

@linianhui 非常感谢,我刚才试了一下

image

通过jsfiddle看了一下流程,我再看看里面的细节,消化一下……

from example-oidc.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.