简体   繁体   English

更改.NET MVC项目以指向新的IIS站点的问题

[英]Problems with changing .NET MVC project to point to new IIS site

So I am very new to web development and have a .NET MVC site that I have been working on. 因此,我对Web开发非常陌生,并且拥有一个正在开发的.NET MVC网站。 Unfortunately, Visual Studio removes most of the work in running a simple site in debug. 不幸的是,Visual Studio删除了在调试中运行简单站点的大部分工作。 I am trying to learn about more of what gets generated when you build and fire up a website through Visual Studio so I can have more control over deploying additional sites. 我试图了解更多有关通过Visual Studio构建和启动网站时生成的内容的信息,以便可以更好地控制部署其他网站。

PROBLEM 问题

So in IIS I created a new site and defined the Site name, and pointed the physical path to the Web directory of my project (contains the web.config). 因此,在IIS中,我创建了一个新站点并定义了站点名称,并将物理路径指向了项目的Web目录(包含web.config)。

In Visual Studio, under the Web project properties changed Start Action -> "Don't open a page, wait for request" Servers -> "Use specific IIS web server" and specify the URL of the site name I defined in IIS (ie local.acme.com). 在Visual Studio中,在Web项目属性下更改了“开始操作”->“不打开页面,等待请求”,然后在“服务器”->“使用特定的IIS Web服务器”中指定我在IIS中定义的站点名称的URL(即local.acme.com)。

Cleaned solution, rebuilt and tried navigating to http://local.acme.com . 清理解决方案,重新构建并尝试导航到http://local.acme.com After getting past some original permissions issues (dir requiring permissions for IIS_USERs), it tries to automatically direct me to a view that doesn't exist: 解决了一些原始权限问题(目录要求IIS_USERs拥有权限)之后,它会尝试自动将我定向到一个不存在的视图:

http://local.acme.com/Account/LogOn?ReturnUrl=%2f http://local.acme.com/Account/LogOn?ReturnUrl=%2f

NOTE I created the project as a "EMPTY" MVC 2 Web application, so no default .NET MVC account view should exist. 注意我将项目创建为“ EMPTY” MVC 2 Web应用程序,因此不应该存在默认的.NET MVC帐户视图。

Any thoughts 有什么想法吗

Check your web.config . 检查您的web.config does it contain any entry for membership and authentication 它是否包含任何成员资格和身份验证条目

An entry, something like this in <system.web> 一个条目,在<system.web>类似这样

<authentication mode="Forms">
  <forms loginUrl="Account/LogOn"  />
</authentication>

从Web.config中删除<authentication>元素。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM