简体   繁体   English

使用IIS部署我的visual studio Web应用程序

[英]Deploying my visual studio web application using IIS

I have publish my website at visual studio . 我在visual studio上发布了我的网站。 and i try to setup a website by IIS . 我试图通过IIS设置一个网站。 What i have done is : 我所做的是:

I click Add New Website in ' Sites ' folder in the IIS and when i browse my physical path and pool , there is always the error saying cannot verify access to path , while my pool authentication passed . 我在IIS中的“站点”文件夹中单击“添加新网站”,当我浏览我的物理路径和池时,总会出现错误,说明无法验证对路径的访问权限,而我的池身份验证通过了。

this is my first time publishing a site , i want to host my site on localhost so whenever i type localhost it will be my site without running through visual studio . 这是我第一次发布一个网站,我想在localhost上托管我的网站,所以每当我输入localhost时,它都将是我的网站,而不是通过visual studio运行。 Can anyone help me with the IIS error on cannot verify acess to path ? 任何人都可以帮我解决IIS错误无法验证路径的访问权限吗?

this is the look of my error : 这是我的错误的样子:

在此输入图像描述

These are the steps that need to be done on IIS 7 这些是需要在IIS 7上执行的步骤

  1. Right click your default website 右键单击您的默认网站
  2. Click on add application. 单击添加应用程序。
  3. a dialogue will appear you need to give alias and folder path to your application here. 将出现一个对话框,您需要在此处为​​您的应用程序提供别名和文件夹路径。 along with application pool. 以及应用程序池。

and you are good to go. 你很高兴。

Regarding your error, give your login user rights, And if you are using connect as provide the user name and password of your machine to see if your test is successful. 关于您的错误,请提供您的登录用户权限,如果您使用connect,请提供您的计算机的用户名和密码,以查看您的测试是否成功。

I have just spent a long time trying to get to grips with this myself, and I believe I can offer an answer that may help anyone else who comes across this question in future. 我花了很长时间试图自己解决这个问题,我相信我可以提供一个答案,可以帮助将来遇到这个问题的其他人。 I think the problem stems from the terminology that is used in IIS, and the fact that you are just trying to deploy one website to localhost in order to test it. 我认为问题源于IIS中使用的术语,以及您只是尝试将一个网站部署到localhost以进行测试的事实。

In IIS, a 'Website' (ie what you are adding if you right-click Sites and then "Add Website...") is not really what you would commonly refer to as a website. 在IIS中,“网站”(即,如果右键单击“站点”然后“添加网站...”,则添加的内容)并不是您通常所称的网站。 It is just a folder on disk, with a URL binding. 它只是磁盘上的一个文件夹,带有URL绑定。 The Default Web Site, for example, has the folder \\inetpub\\wwwroot, and the binding "http:*:80:" which means that any http request (port 80) will go to this "Website". 例如,默认网站具有文件夹\\ inetpub \\ wwwroot和绑定“http:*:80:”,这意味着任何http请求(端口80)都将转到此“网站”。 Your website that you have published is not what IIS refers to as a "Website". 您发布的网站不是IIS所称的“网站”。

In IIS, an individual website is called an "Application". 在IIS中,单个网站称为“应用程序”。 A "Website" in IIS can hold a number of Applications, and you can add them by right-clicking the Default Web Site and choose "Add Application...". IIS中的“网站”可以容纳许多应用程序,您可以通过右键单击“默认网站”并选择“添加应用程序...”来添加它们。

In other words, the Default Web Site in IIS can contain many websites. 换句话说,IIS中的默认网站可以包含许多网站。 For example: 例如:

http://localhost/eStellar
http://localhost/otherWebsite
http://localhost/thirdWebsite

all of which may be completely unrelated. 所有这些都可能完全不相关。 I would say that the 3 sites above are 3 different websites, but in IIS these are three "Applications" contained within the "Default Web Site". 我会说上面的3个站点是3个不同的网站,但在IIS中,这些是“默认网站”中包含的3个“应用程序”。

In IIS, each "Website" must have a unique binding. 在IIS中,每个“网站”必须具有唯一的绑定。 As you want your website to be accessible from 您希望可以从中访问您的网站

http://localhost/eStellar

(which is port 80) you should use the IIS Default Web Site, because it has the binding already to port 80 and you cannot create another "Website" in IIS with that same binding. (这是端口80)您应该使用IIS默认网站,因为它已经绑定到端口80,并且您无法在IIS中使用相同的绑定创建另一个“网站”。

So right-click on the Default Web Site, and choose "Add Application...". 因此,右键单击“默认网站”,然后选择“添加应用程序...”。 In the dialog box that appears, the Alias is the name that you want to use in the URL after localhost, so in your case this is "eStellar". 在出现的对话框中,Alias是您要在localhost之后的URL中使用的名称,因此在您的情况下,这是“eStellar”。 The Application Pool can be anything, but just choose the DefaultAppPool for now (the choice of Application Pool is another issue entirely). 应用程序池可以是任何东西,但是现在只选择DefaultAppPool(应用程序池的选择完全是另一个问题)。 In the Physical Path, enter the place where you published the website to (ie what you have in the Physical Path box in the image in your question). 在物理路径中,输入您发布网站的位置(即您在问题中的图像中的物理路径框中所拥有的内容)。

I also get the same "Cannot verify access to path" warning that you show in your image, but this does not affect my ability to access the page at 我也会在您的图片中显示相同的“无法验证访问路径”警告,但这不会影响我访问该页面的能力

http://localhost/eStellar

It appears to be saying that it "cannot verify" whether you have access, not that it definitely cannot access the site. 它似乎在说它“无法验证”您是否有访问权限,而不是它肯定无法访问该网站。 This warning was a bit of a red herring for me, as it actually has nothing to do with why I could not set up the site with the same method as you state in your question. 这个警告对我来说是一个红色的鲱鱼,因为它实际上与我为什么无法使用您在问题中陈述的相同方法设置网站无关。

Hopefully now you can access your site at localhost. 希望您现在可以在localhost访问您的站点。

暂无
暂无

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

相关问题 在visual studio professional 2010上使用试用版部署Web应用程序c# - Deploying a web application using the trial version on visual studio professional 2010 c# 将带有WCF库的Web应用程序从Visual Studio开发人员移至IIS - Move web application with WCF library from Visual Studio dev to IIS 将Visual Studio 2008 Web应用程序部署到IIS 6的正确过程是什么? - What is the correct procedure to deploy a Visual studio 2008 Web Application to IIS 6 使用Visual Studio 2008部署Windows应用程序(C#) - Deploying Windows Application(C#) using visual studio 2008 在IIS上部署后,在Visual Studio 2012中创建的MVC应用程序无法正常工作 - MVC Application Created in Visual Studio 2012 is not working properly after deploying on IIS 为什么我在同一台计算机上通过IIS和Visual Studio的Web服务器运行我的应用程序时会得到不同的日期格式? - Why I get different date formats when I run my application through IIS and Visual Studio's web server on the same computer? 在Visual Studio 2010 Express中部署Windows应用程序 - Deploying windows application in Visual studio 2010 Express 如何使用Visual Studio中的安装项目安装程序在IIS中发布ASP Web应用程序 - How to publish an asp web application in IIS with setup project installer in visual studio Web 请求中的 IIS 和 Visual Studio IIS 有什么区别? - What is the difference between IIS and Visual Studio IIS in Web Requests? 无法调试在Visual Studio 2015上开发并托管在IIS上的asp.net Web应用程序 - Can't debug my asp.net web app developped on visual studio 2015 and hosted on IIS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM