Debugging website hosted on a remote server in VS 2008 - asp.net

I have website (setup on IIS) in a VPS setting. Since I dont have VS installed on the VPS, I would like to connect it from my dev machine and debug the source code.
From my dev machine, I opened up VS 2008 and did File -> Open Website -> specified the http address and clicked OK. I get the error
"Unable to open the website 'http://xxx..'. The Web server does not have the FrontPage Server extensions installed"
Is this the correct way of debugging a website hosted remotely?
I have IIS 6.0 on the VPS. When I go to Add Remove Progrsms -> Add remove Windows Components -> Application Server -> IIS, I was expecting to see FrontPage Server Extensions. I do not.

FrontPage extensions are for developing (or rather managing pages and adminstration of) a website, not debugging it.
You need to have a debugging host setup on the remote server and have the correct permissions and ports open between the server and development machine.
Here are a couple of articles with deatils of how to set this up.

Related

How to access an ASP.NET web api that runs on localhost (IIS)

I built an ASP.NET Web API. I run it locally from Visual Studio on IIS Express. I need to access this api from other device from another network, so I understand that it has to be hosted on the development machine on IIS, right? What I read is that:
I need to enable IIS Manager in the Control Panel (source) - DONE
Assign the IP of the dev machine to the localhost (source; source 2) - I don't see my site in the IIS Manager under Sites, only see Default Web Site. Why is that?
I assume the site needs to be hosted somehow on the dev machine, because I need to stop Visual Studio, therefore the IIS Express will be stopped and the site would not be accessible, even from localhost right?
My dev machine has a public static IP and I can access this Default Web Site successfully from outside.
You should consider your API in IIS just as any IIS App. i.e. a website.
It needs to have an IP (or a hostheader value)
Lets say api1.example.com binded in IIS with your IIS Application.
Your DNS must resolve this to the IIS machine IP.
then you can access it in that URL.
You can also just hit the machine IP running the IIS web server (on the port you added for the api - if its not :80)
See "Bindings" in IIS
See this Video : https://www.youtube.com/watch?v=I32AnqJzD58

How to configure IIS 7 for localhost website?

I am new in Asp.Net
I have enabled features of IIS 7 on my windows system and able to see IIS manager.
I created an application but build/run application through visual studio it goes to browser and run the application with different port number. When i stop build/run application through visual studio and again i refresh browser application could not run.
I want to run application without visual studio. How to do this.
It gives this : http://localhost:9864/
To configure IIS with a new website follow these instructions:
Open IIS manager, right click Sites (At the right menu) and click Add Website
Give the site a Site Name, The physical path on your machine, and a Host Name
There are some conventions as for what website physical path to choose you can read about it in this SO question
In Windows Explorer go to C:\Windows\System32\drivers\etc and Edit the hosts file
Add this line at the end of the file:
127.0.0.1 your-chosen-host-name-from-iis-ie-localhost.testsite.com
And save the file
Thats about it. You can open your browser and browse the Host Name you chosen for your website or in IIS right click your site and click Manage Website - Browse
Important note
If you wish to use the same address as your VS uses (http://localhost:9864/) then on step 2 leave the Host Name textbox blank and instead change the Port textbox to your desired port (9864). In this case you can also ignore step 3.
As a site note:
If you installed IIS on your machine after the VS installation you might get some conflicts. You might be able by this stage to browse to static content as html but not .NET resources like aspx files. If by browsing to .NET files you get a message saying The page you are requesting cannot be served because of the extension configuration you can solve it with this SO question

Trying to reload project but it says the following error issue IIS web server

The URL 'http:localhost:8081' for Web project 'XXX project name' is configured to use IIS Express as the web server but the URL is currently configured on the local IIS web server. To open this project, you must use IIS Manager to remove the bindings using this URL from the local IIS web server.
It's not allowing me to reload the project..May some thing went wrong while doing IIS set up...

how to configure iis so that I can connect to my iis hosted localhost from a remote windows pc

there must be a load of questions on this but I cant get it working. I have a asp.net app running locally hosted within iis (windows 8/ version 6.2) which I can browse locally. Example below, and it works without a problem.
http://localhost:1234
I'm trying to browse this site from a windows virtual machine using remote desktop and then launching the browser on the client machine. Unfortunately this display "Internet Explorer cannot display the webpage"
any ideas why I cant get through on a remote desktop? The client has internet access obviously and I can ping the other machine (both ways). Is there an IIS or firewall setting I can configure. The firewall on the dev box (i.e. the web server in this situation) has a firewall switched on. When I turn it off I still get the same error message.
My iis authenication settings are shown below (for my website, not for the 'Default Web Site'):
On the client machine, I'm using the following:
http://12.34.56.78:1234
Thanks,
James
Try using https: instead of http: and also to access the website from other PC, you need to enable your Anonymous Authentication. And you also need to Enable the Directory Browsing from IIS settings of website.
Can you ping the ip? Disable the firewall on both machines and try.
Let me know

Use Local IIS Web server for debugging

So I'm trying to setup a local test domain so I can have a subdomain using this article. My problem is that I can set up the sites fine in IIS and browse to files there. But when trying to setup visual studio to use the site for eg. In Project Url: http://localtest.me when I click Create VirtualDriectory I get the following error: Unable to create virtual directory. The URL 'http://localtest.me' is already mapped to a different folder 'C:\Websites\site'.
If I delete the site from IIS and allow visual studio to try create it, I get the following error: Unable to create the virtual directory. Could not find the server 'http://localtest.me' on the local machine. Creating a virtual directory is only supported on the local IIS server. But the site localtest.me poits to 127.0.0.1, which is my local machine right?
So how do I set up debugging in a scenario like this where I already created the site in IIS?
Instead of using the "Use Local IIS Web Server" setting in visual studio I always check "Use Custom Web Server" and point it at my local url. for your example localtest.me with the start url above set to localtest.me
If you still run into problems you can always get into debug mode but doing attach to process instead of F5 and selecting the IIS process.

Resources