简体   繁体   English

IIS7 / VS2010下的ASP.NET部署作为Web应用程序

[英]ASP.NET Deployment under IIS7/VS2010 as Web Application

I transformed my VS2008 ASP.NET Website to a "Web Application" today using VS2010. 我今天使用VS2010将我的VS2008 ASP.NET网站转换为“Web应用程序”。 So now it's possible to build a Deployment Package. 所以现在可以构建一个部署包。 A Zip Package which can be direclty imported into IIS7. 一个Zip包,可以直接导入IIS7。

Usually I added a website in IIS7 called mydomain.com and put everything in its root dir. 通常我在IIS7中添加了一个名为mydomain.com的网站,并将所有内容放在其根目录中。 That worked. 那很有效。

However, since I converted to an Web Application, this Application is added beneath my "Website container". 但是,自从我转换为Web应用程序后,此应用程序被添加到我的“网站容器”下面。 Now I'm confused, this is how it actually looks now when I try to open the website: 现在我很困惑,这是我尝试打开网站时的实际情况:

Browsing to mydomain.com says 404 ERROR. 浏览mydomain.com说404 ERROR。

Browsing to mydomain.com/mydomain.com opens the actual website, but in a subfolder instead of the root directory. 浏览到mydomain.com/mydomain.com会打开实际的网站,但会在子文件夹中而不是根目录中。 (The Application is named after the Domain) (应用程序以域名命名)

How to make this application the root of the website now? 如何使这个应用程序成为网站的根目录? I want the application to run under the mydomain.com ROOT and not some subfolder. 我希望应用程序在mydomain.com ROOT下运行而不是某些子文件夹。

Thanks a lot! 非常感谢!

In VS 2010, right click your project and go to Package/Publish settings .. In there, down below, in the Web Deployment Package settings , there's a IIS Web site/application name field. 在VS 2010中,右键单击您的项目并转到Package/Publish settings 。在下面的Web Deployment Package settings ,有一个IIS Web site/application name字段。

It seems that it's currently set to mydomain.com/mydomain.com or something similar. 它似乎已设置为mydomain.com/mydomain.com或类似的东西。 Change it to mydomain.com and it should work as expected. 将其更改为mydomain.com ,它应该按预期工作。

Second thing to check is your Publish settings (VS menu Build -> Publish "websitename" ). 要检查的第二件事是你的发布设置(VS菜单Build -> Publish "websitename" )。 Check the Site/application field. 检查站点/应用程序字段。 Set it to mydomain.com as well, make sure it doesn't have any slashes. 将它设置为mydomain.com ,确保它没有任何斜杠。

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

相关问题 ASP.net网站将LocalDB部署到IIS7 - ASP.net website with LocalDB deployment to IIS7 无法使用VS2010调试.NET Web应用程序 - Unable to debug .NET web application with VS2010 在VS2010中运行Web服务应用程序 - Running a Web Service application in VS2010 ASP.NET CORE 3.0 应用到默认网站/MySite 下的 IIS 无法正常工作 - ASP.NET CORE 3.0 application to IIS under Default Web Site/MySite does not work properly 选择.net 4.0时,是否无法在VS 2010中选择asp.net Web服务应用程序? - Can't choose asp.net web service application in VS 2010 when .net 4.0 is chosen? 在IIS7上部署.net Web服务错误403.14? - Deployment of .net Web-service on IIS7 error 403.14? 将.NET Web应用程序从VS2010升级到2013并没有将图标更改为VS2013 - Upgrade .NET web application from VS2010 TO 2013 did not change the icon to VS2013 ASP.NET MVC 1:移动到VS2010后(使用MVCTurbines)时出现“无参数构造函数”错误 - ASP.NET MVC 1: “No parameterless constructor”-error after moving to VS2010 (using MVCTurbines) 已发布的Web应用程序部署中的部分ASP.NET WEB - Partial ASP.NET WEB FROM Published Web Application Deployment ASP.NET Web应用程序部署方法最佳实践 - ASP.NET Web Application Deployment Methods Best Practice
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM