简体   繁体   中英

Adding WebApi Project to existing ASP.NET Webforms Application

I have an existing ASP.NET Webforms Application (see image below), and I've added a new WebAPI project. I have a few issues. The first is that according to various tutorials, it should just work, but alas...well, it does work when I right click on the project and Start New Instance in Debug mode. Right now, I have a single project set to start, but it doesn't activate the WebAPI project, and I would like it to. I know that I could set them both as startup projects, but then they end up in different browser windows, which is not what I want.

I would like to know how to get this second project to also start when starting the first, but in the overall solution sense. That way I can start my main site, but also hit the api/Donation url.

在此处输入图片说明

Right click on your Solution and select Project Dependencies .

Tick Donate for the shop.scramble.org project.

Run the Solution and you'll see in IIS Express both applications are running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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