简体   繁体   English

无法访问Windows Server 2016 Azure VM的Docker容器中托管的Asp.Net vNext应用程序

[英]Unable to access Asp.Net vNext application hosted in Docker Container in Windows Server 2016 Azure VM

I have created ASP.net vNext application in Visual Studio 2015. 我已经在Visual Studio 2015中创建了ASP.net vNext应用程序。

I have used Docker tools for VS 2015. Created the Windows Server 2016 VM and published my asp.net vnext application inside a container. 我已将Docker工具用于VS2015。创建了Windows Server 2016 VM,并在容器内发布了asp.net vnext应用程序。

I have added network security group the NIC of this VM. 我已将网络安全组添加到此VM的NIC。 I have opened up port 80. 我已经打开了80端口。

When I am trying to access the web application hosted inside the container from my Laptop; 当我尝试从我的笔记本电脑访问容器内托管的Web应用程序时; I was getting the page cannot be displayed. 我正在获取无法显示的页面。

On Ubuntu VM: I was successfully hosted the asp.net vnext application inside the container and was able to access it from my laptop in IE browser. 在Ubuntu VM上:我已成功在容器内托管了asp.net vnext应用程序,并能够在IE浏览器中从笔记本电脑访问它。

On Windows Server 2016 (Container Preview VM in Azure): I am able to host the application inside the container. 在Windows Server 2016(Azure中的容器预览VM)上:我能够在容器内托管应用程序。 But unable to access it from my Laptop using its public IP. 但是无法使用其公用IP从我的笔记本电脑访问它。 Found that I have to do some changes to NAT. 发现我必须对NAT进行一些更改。


Solved 解决了

The problem was with the DNX version. 问题出在DNX版本上。 I fixed the code. 我修复了代码。 Now I was able to host the asp.net vnext application inside the docker container in windows server 2016. URL: http://dockersample3vm1.eastus.cloudapp.azure.com:8099/ 现在,我能够在Windows Server 2016的docker容器中托管asp.net vnext应用程序。URL: http ://dockersample3vm1.eastus.cloudapp.azure.com:8099/

Issue 1: I did not have dnx-clr-win-x64.1.0.0-beta6 folder under "C:\\Users\\Viswanatha.dnx\\runtimes" folder. 问题1:我在“ C:\\ Users \\ Viswanatha.dnx \\ runtimes”文件夹下没有dnx-clr-win-x64.1.0.0-beta6文件夹。 So I just created an empty folder and it started compiling. 因此,我只是创建了一个空文件夹,然后开始编译。 After publishing it could not locate the files. 发布后无法找到文件。 So it started throwing the exception. 因此,它开始引发异常。 Yesterday your clue to get into the container and execute web.cmd unearthed that issue. 昨天,您发现进入该容器并执行web.cmd的线索出了该问题。

Issue 2: After fixing the Issue 1. It was throwing another exception which pushing the solution itself. 问题2:解决问题1之后,它引发了另一个异常,该异常推动了解决方案本身。 I have added the “'System.Runtime.Serialization.Primitives”: “4.0.10-*” dependency in project.json. 我在project.json中添加了“'System.Runtime.Serialization.Primitives”:“ 4.0.10- *”依赖项。 System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Serialization.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. System.IO.FileNotFoundException:无法加载文件或程序集“ System.Runtime.Serialization.Primitives,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”或其依赖项之一。 The system cannot find the file specified. 该系统找不到指定的文件。 Rest is happy ending ;) 休息是幸福的结局;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在 Windows 服务器 2016 数据库上运行的 Azure VM 上发布 ASP.NET 网页 - Unable to publish an ASP.NET webpage on an Azure VM running on Windows server 2016 database 无法使用Docker在Azure上的VM上部署ASP .net vnext应用程序 - Not able to deploy ASP .net vnext application on VM on Azure using Docker 可以在IIS中托管ASP.NET vNext应用程序 - Can an ASP.NET vNext application be hosted in IIS 如何访问Windows Azure VM(IIS Server)中部署的ASP.net网站 - How to access the ASP.net website deployed in Windows Azure VM (IIS Server) 无法从生产服务器中托管的asp.net应用程序访问Active Directory - Unable to access Active directory from my asp.net application hosted in production server 将ASP.NET vNext应用程序部署到Azure云服务 - Deployment of ASP.NET vNext Application to Azure Cloud Services ASP.NET 5(vNext)在Azure上导致500 - 内部服务器错误 - ASP.NET 5 (vNext) causing a 500 - Internal Server Error on Azure Asp.net vNext早期测试版在Windows服务器上发布到IIS - Asp.net vNext early beta publish to IIS in windows server Azure Linux VM + ASP.NET应用程序 - Azure Linux VM + ASP.NET application 如何将ASP.NET应用程序部署到Linux服务器上的Docker容器? - How to deploy asp.net application to docker container on Linux server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM