无法获取OWIN启动类在IIS防爆preSS重命名运行ASP.NET项目文件后, [英] Can't get the OWIN Startup class to run in IIS Express after renaming ASP.NET project file

查看:135
本文介绍了无法获取OWIN启动类在IIS防爆preSS重命名运行ASP.NET项目文件后,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,我需要改变基于OWIN-的WebAPI网站内的解决方案和项目名称的情况。这一切改变之前伟大的工作,据我所知,改名是成功的,因为以下内容:

I've got a situation where I needed to change the solution and project names within a OWIN-based WebAPI website. Everything worked great before this change, and to my knowledge the renaming was successful because of the following:


  1. 该解决方案基于罚款和我所有的单元测试,成功地运行在本地和我们的TeamCity构建服务器

  2. 应用程序运行我们的测试服务器上正常(完整的IIS 8)和生产(也充满了IIS 8)

我的问题是,这个重命名后,当我在IIS防爆preSS运行这个我不能启动类来执行,不管我怎么努力。我怀疑是包含在我的机器上的多个启动类的一些缓存的文件夹,因为我们的测试环境,我需要删除所有正在使用的previous名,事情开始工作以前的老的DLL。

My issue is that after this rename I can not get the Startup class to execute when I run this in IIS Express no matter what I try. I suspect there is some cached folder that contains multiple Startup class on my machine because in our test environment I needed to remove all the old DLLs that were using the previous name before things started working.

我知道启动没有执行,因为我有它的断点未触发(事实上没有启用,因为VS不会看到加载的符号):

I know Startup isn't executing because I have breakpoints in it that are not firing (and in fact are not enabled because VS doesn't see the symbols loaded):

下面就是我迄今为止尝试:

Here's what I've tried thus far:


  • 卸载IIS防爆$ P $ 10.0 PSS(我有VS 2015年RC我的dev的机器),清理掉所有IIS文件夹,然后再重新安装IIS防爆preSS 8

  • 清理我的开发机器上的所有临时文件夹ASP.NET

  • 清理了我自己的解决方案中的所有的obj / bin中的文件夹

在我的情况下,我用我的Startup.cs以下指定启动类:

In my case I'm specifying the Startup class using the following in my Startup.cs:

[汇编:OwinStartup(typeof运算(启动))]

...但同样,这一切都只是正常工作之前,我试图重新命名的解决方案和项目。我不认为这是一个普遍的IIS防爆preSS的问题​​或者是因为我可以成功地在本地运行其他基于OWIN解决方案(例如,我们实施的 IdentityServer3 )没有问题......尽管该解决方案不需要任何名称更改。

...but again, this all worked just fine before I tried to renaming the solution and projects. I don't think this is a general IIS Express problem either because I can successfully run other OWIN-based solutions locally (e.g., our implementation of IdentityServer3) without issues...although that solution didn't require any name changes.

有没有使用IIS防爆preSS可能通过改变一个解决方案或项目文件的名称得到绊倒了的一些其他方面?

Is there some other aspect of using IIS Express that might get tripped up by changing the name of a solution or project file?

仅供参考我已经检查了以下可能的原因(没有任何运气):
- OwinStartup没有启动...为什么
- OWIN启动类缺少
- ASP.NET临时文件清理
- OwinStartup不费一枪

推荐答案

虽然我不能完全解释的为什么的这解决了这个问题,我能够改变我的项目建设,以解决这一问题常规斌/ 文件夹中。

While I can't fully explain why this solves the issue, I was able to fix this by changing my projects to build to the regular bin/ folder.

我在我原来的问题不提为此​​道歉,因为我不认为这是相关的,但我有previously改变了我的ASP.NET项目建设为斌\\调试根据配置和斌\\发布。这似乎工作得很好,但造成这个问题一旦我改变了项目的名称。

I apologize for not mentioning this in my original question, because I didn't think it was relevant, but I had previously changed my ASP.NET project to build to bin\Debug and bin\Release depending on the configuration. This seemed to work just fine, but caused this issue once I changed the name of the projects.

这篇关于无法获取OWIN启动类在IIS防爆preSS重命名运行ASP.NET项目文件后,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆