VisualStudio2019 WebAPI Run from Postman - postman

I am trying to run the webAPI (C#) in Visual Studio 2019 and test in Postman. These are steps I took
Created a new project with type WebAPI in Visual Studio 2019 (selected C#) with example controller (WeatherApp)
Ran the application in Visual Studio 2019. It opens the browser and brings up the url as
http://localhost:62002/weatherforecast
the application then immediately shutsdown
I have postman window open, where I would like to test the api, but I am unable to.
I am trying to setup the environment, so that I can create my new webapi with get/post requests and run from postman, while debugging from visual studio 2019
Am I doing something wrong here ?

I found that I need to run dotnet run from terminal/shell with url https://localhost:5001 and then go to Postman and invoke the service uri. It worked. But not sure how to debug in this mode

Related

transform web.config when publishing asp.net core webapi project in visual studio 2017

I have app.config and app.Release.config. The transformation is working whe build the project from Visual Studio 2017 however no modification when hitting Publish to deploy the projectio to IIS
The app.config on publish folder has no transform data but the transformed value is on the web api.
Any idea where this tranformed value is stored?

Testing ASP.NET Core app using Protractor in Visual Studio 2017

I've got a asp.net core application which uses angular4 as client frontend and asp.net core for the service api. I've had end-to-end unit-testing up and running while using Visual Studio 2015.
Since I switched to Visual Studio 2017 I can't get the tests to use protractor anymore.
First problem: For protractor I need the full .net framework, for hosting my app I want to use .NetCoreApp 1.1. And Visual Studio 2017 does only support using one Framework. There are tricks by editing the proj-file, but even then I could not even compile my test project to use protractor.
So: Has anyone been able to run unit Tests using protractor in Visual Studio 2017? Any pointers about it, maybe you can point me to a website containing a sample?

How can I make Visual Studio automatically attach its debugger to both a web application and web service?

I'm working on a Visual Studio project. I'm using Visual Studio 2010. The project has an ASP.NET application project and a separate ASMX web service project. The web application project is set as the start-up project.
When I tell Visual Studio to start debugging, it correctly starts both the web application and web service. However, it only attaches the debugger to the web application and not the web service. This problem seems to occur regardless of which web server I use for either project (IIS, IIS Express, Visual Studio Development Web Server).
In order to debug both simultaneously, I need to manually attach the debugger to the web service during the debugging session.
How can I make Visual Studio automatically attach to both projects when I tell it start debugging?
I found that this works if I set both the web service and application to start-up projects. Do this by right-clicking the solution file and choosing something like Set Start-up Projects....
One of the options is to open two instances of Visual Studio and debug the projects separately, however it is pretty much the same inconvenience as attaching the debugger manualy.
By the way, do you have ASP.NET debugger allowed in both projects (project properties > web tab > debuggers section)?

Pocket PC 2003 application with webservice

I am working on a Pocket PC 2003 application that is referencing a Webservice.
I was figuring out ways to debug the Webmethods but not successful.
-I checked the URL property of the Service in WebReferences and made sure it is correct.
-I started debugging the PocketPC application, then built the Webservice as start without debugging, after that went to Debuh> Attach process and attached devenv-"Pocket PC app"
-I also tried attaching to the aspwp.exe process but couldn't seem to hit the break points in Web Methods.
-The webservice is deployed to IIS virtual directory.
-I copy pasted the entire webservice folder in the virtual directory. Then I am opening the solution file in Visual Studio. Start without debugging, when the webmethods show in browser, click on it, then click Invoke
Can someone guide me the proper way to debug a Webservice of this type? Thanks in advance.
If you're using Visual Studio 2005 or higher, instead of IIS, use the toy Web service that comes with Visual Studio. In the properties of your ASP.NET project with the Web services, under "Web", check the "Use Visual Stuidio Development server". In order to make the toy server start, you have so start the ASP.NET project from Visual Studio.
Then you attach to the process called Webdev.Webserver.exe using Managed code debugging.

ASMX + external dll

I am working on Silverlight client to Microsoft Team Foundation Server. I am using an ASMX web service to make the actual calls using the TFS api.
Everything works fine when I run it with the visual studio development server, but I cannot figure out how to deploy the app to IIS.
I can get the ASMX web service to work unless it is a call that uses the TFS api. I have tried putting all of the TFS api DLLs in like every directory that I can think of, and even installing the visual studio sdk. Nothing works!
UPDATE 11/15/09 7:50PM EST:
Turns out that the TFS api was trying to create a cache at c:\Documents and Settings\Default User\Local Settings\Application Data\Microsoft\Team Foundation\2.0\Cache\, and the IIS_WPG user didn't have access to do so. Easy fix.
The only supported way of installing the TFS API is to install Team Explorer. You could try to GAC just the assemblies you need, but you're on your own [and technically violating the EULA]...
Other things to check:
IIS is running in 32 bit mode
Impersonation is working correctly
Proxy settings
What error do you get? Have you tried attaching a debugger to IIS?