Debugging asmx web services - web-services

How can I debug asmx webservices running on IIS? I read that I must Attach to process called aspnet_wp or w3wp. But I can not find these processes... I selected checkbox show processes from all users but still nothing. What can be wrong?
regards

If your service is not running, then there might not be a worker process running. Start your service by accessing it from the browser, of use "View In Browser" from inside of Visual Studio.

It may not be what you are looking for, but can't you run your project from visual studio first? I usually do it that way before going to IIS.
Or does your project run fine on VS and an other way with IIS? I personnaly never done it myself since I debug all my code in local.
As far as remote and local IIS debugging are concerned, I think you can check on this site CodeProjectI and CodeProjectII. The author claims to be a former MVP in ASP.NET, should be useful.

You have to be logged onto the machine that runs web service. You would need a debugger installed on that machine.
If that is not possible, you can install remote debugger for VS on the server. To install remote debugger you just need to copy msvsmon.exe from your VS installation CD or from machine where VS is already installed and start it.
Then when you attach to proccess from your machine you can type in the name of your remote server and click Browse. You should be able to see all proccess that are running on remote server. You would need administrative or Debugger rights on that server.

Related

Error when i open wamp server, the application was unable to start correctly (0xc0000142)

I recently opened Wamp server after a long time I didn't touch it. It was fine back then, but when I try to open Wamp server now, I get an error that says
The application was unable to start correctly (0xc0000142).
In addition, the wamp icon is orange, while back then, it was green.
I have tried to search for a solution on the internet, but I wasn't able to find.
I have also noticed that when I try to open phpMyAdmin, the page says
#2002 - No connection could be made because the target machine actively refused it.
The server is not responding (or the local server's socket is not correctly configured)
But i'm able to open my localhost start page (the one with the loaded extentions list).
Thanks for helping.
Same error after creators update 1703 (Windows 10).
Error: httpd.exe was unable to start correctly
Error code: 0xc0000142
I'll do a quick google search and see what this is about. I will get back for sure.
UPDATE: SOLUTION
WAMP has released a cumulative update to fix this. It is strongly encouraged that you apply this update after you’ve installed WAMP.
Wampserver update 3.0.8. Sourceforge.
Once you apply this fix, you will be able to start (Apache) WAMP normally.
Actually this error relate to Windows Firewall.
You can go to "Control Panel\System and Security\Windows Firewall\Allowed apps" after that click change settings and in Allow apps and feature find "Appache HTTP Server" and check public then click OK.
Verify your Windows Firewall Services is not running.
I faced the same issue after installing 64bit Wamp. While installing I was not prompted to allow http daemon by the firewall service.
Unsure what to do, I installed the 32bit Wamp & the firewall service prompted me to allow the http daemon.
Wamp started showing green!!

How to use libssh as server?

I am working on a Windows version of a server application that communicates with a web application. The web application originally worked with a Linux server, and would SSH into Linux to execute commands on the server. My plan is to build a C++ server using Qt to receive commands from the web application, and process them to do the windows version of what those commands are.
So for example, if the web application originally sent "echo $HOME" and received back the home directory, I want to receive that same SSH command on my Windows server, then process it so if the server was configured for the home directory to be C:\Example\, then it would send back C:\Example\. My goal is to make as little change to the web application, and instead have the Windows server process the Linux SSH commands to do the Windows equivalent.
I've never worked with libssh before, but from some searching I found it and read that it could be used as an SSH2 server. Basically my question here, is how would I use libss2 to create a server in my Qt project to allow this web application to SSH in and send commands.
If you think there is a better way then libssh please let me know, this is just what I have found through searching.
UPDATE: I found this code of a server example. https://github.com/substack/libssh/blob/master/examples/samplesshd-tty.c
Honestly, I'm very confused by it. I'll probably be able to break it down and understand what's happening after a few hours of Googling and working through the code. But If anyone would be willing to walk me through main explaining what's happening at each step, that would be appreciated.

Debug web service running on local machine?

I'm using PowerBuilder Classic 12.1 to deploy a .NET Web Services target to IIS 7 running on my local machine. I'd like to be able to debug it. The documentation from Sybase says I should be able to. But when I run the debugger it says "Attaching to ASP.NET worker" and "Time left: 20 seconds". It counts down to 0 and then I see "Failed attaching to ASP.NET worker process."
I'm running PowerBuilder as an administrator, so I don't think that's the problem.
Suggestions?
Open your your project object that you are using to deploy with. If you have multiple project objects, then right click on your target in the tree-view painter and click preferences to open a dialog that let's you choose which target object will be used for deployment. Choose the one that is set with DEBUG symbol on and set to debug build.
I have had good luck debugging PB Web Services both IIS hosted and self-hosted.
I also found this in the PowerBuilder help file for you:
Using the DEBUG symbol
If you used the DEBUG conditional compilation symbol in code for the nonvisual objects you deploy as a Web service and you want this code to run, you must make sure that the enable DEBUG symbol check box is selected before you deploy the project. If you plan to debug the assembly or Web service, you should make sure the project is deployed as a debug build.
** added additional details here on 1-26-13
This blog article will help you get WCF debugging to work in PowerBuilder.NET.
Testing & Debugging PowerBuilder.NET WCF Web Services

ASP.NET Web Service returning Bad Request in Windows Azure

After a Windows 7 fresh restart, I open the Visual Studio 2010 as administrator, create a new project of Windows Azure Project with ASP.NET Web Role, then at the WebRole1 project I add a WebService1.asmx and press F5 (run).
The Windows Azure services starts OK and the browser open the http:/127.0.0.1:8080/WebService1.asmx perfectly. But when I click at Invoke button to test the webservice method I always receive a Bad Request - Invalid Hostname, with a http:/127.0.0.1:8081/WebService1.asmx/HelloWorld.
The most likely cause is ASMX's WSDL file doesn't stand by load balanced environment such as Windows Azure. The test feature relies on WSDL. You will see similar issues if you add a web/service reference. It is recommended to upgrade to WCF. In WCF, you can use useRequestHeadersForMetadataAddress (http://msdn.microsoft.com/en-us/library/ee816894.aspx) to fix the issue. If you need to use ASMX, please try to manually provide a correct WSDL file.

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.