I have installed Visual Studio .NET 2005. But when I am trying to execute an asp.net application then I am getting the following error:
Unable to open the Web 'http://localhost/adiii'. Could not find a Web server at 'localhost' on port 80. Please check to make sure that the Web server name is valid and your proxy settings are set correctly. If you are sure that everything is correct, the Web server may be temporarily out of service.
Click here to view screenshot of the error I am getting
Can anyone please tell me the solution of this problem. As we know there is embedded Web deployment server inside VS2005 then why its giving me this error??
It looks like when you created the project, you selected HTTP for the location instead of the default, File System. HTTP means you have an existing web server (not Visual Studio) that you want to run and test your project on (and where Visual Studio will attempt to find your source code).
Create a project and select File System to create a project on your harddrive that will be run using Visual Studio's internal web server (you can then publish/deploy the project to a real web server when you want)
Are you explicitly have defined that the internal web server should run the application on port 80?
The default behavior is that it runs on a random port.
If your settings are ok, then it might be a port conflict with another web server on your machine (Apache, IIS).
Sometimes even a Skype can okuppy port 80 and cause similar problems.
Update:
Now i see - you're using Web Site project, and we assumed you're working with Web App project instead.
In this case, the procedure is slightly different:
You select the project in Solution Explorer and open Property Pane. Here you should be able to identify two properties for the project: Port number and Use dynamic ports. I assume your first property is set to 80, and second one to false. Change the second one to true and you should be able to fix the problem.
There's a very good chance that you created the project in VS2003 and upgraded it to VS2005. VS2003 uses HTTP (a local installation of IIS for example), whereas VS2005 projects use the built-in server -- most likely, the upgraded project is still trying to use the local IIS which doesn't exist.
Do this: Right click on your project, choose "properties", and navigate to the "Web" tab on the window which pops up. You'll get a screen which allows you to choose which server you want to develop on, then make sure the buttons next to "Use Visual Studio Development Server" and "Auto-assign port" are checked.
Here's a visual reference if you need one:
http://img24.imageshack.us/my.php?image=confignw0.png
You should be be good to go now.
Visual Studio does have an embedded web server, but it never operates on port 80. Your URL clearly points to port 80.
The most likely problem is your program itself working inappropriately, but without code I can't help much more.
Related
I am using VS2012, .NET 4.5. I just downloaded NuGetGalary from github and trying to build and run the Web application of it.
I am using IIS Express with project Url http://localhost:8081
But when I launch the project, I get the following error message
What could be wrong ?
Silly reason,
I used this Microsoft Support Article to find out what was wrong. Turned out it was VMWare Workstation Server service holding up the 443 port. I stopped the service and now project launches fine.
Since I can't add comments yet, I put my thoughts here.
Since you launch the site on "localhost:8081", and it can't be launched because of port 443 being used, it's probably that inside the solution, some service is started, and by default is running on 443.
Your solution consisted of stopping the app "VMWare Workstation Server" which seemed to be using the same port. This might not always be possible, depending the type of app using the port.
What you could also have done (maybe), is configuring the project/service (inside Visual Studio) to use another port than 443.
You can usually find this element in the project properties.
Yesterday I was writing a stand-alone .html web-page. Every time I viewed it, the file was run in the local host. Thus a port number was assigned by my OS (Windows 8).
The path to my file looked like this:
http://localhost:2038/Projects/test.html
But today, when I run it, the ASP.NET Development Server assigned a different port number:
http://localhost:27290/Projects/test.html
Now my redirects don't work.
This file is pure a stand-alone file. It is not part of a visual studio web-project or anything. So there are no project settings in visual studio to alter. However I do use visual studio as a text editor.
To view the file in the browser I simply right-click over the file in VS2012 and select: 'View in Browser (Google Chrome)'
After I view it in Chrome, Windows 8 pops up a message from the toolbar area informing me that ASP.NET Development Server is running. And it lists the new port too.
How do I change the port to something fixed and not some random value?
Thanks!
I simply right-click over the file in VS2012 and select: 'View in Browser (Google Chrome)'
Doing so in Visual Studio fires up the ASP.net Dev server. It's not Windows that assigns it (nor configures it)
How to specify a port for ASP.net Dev Server no project/solution to speak of, it's just some file on file system....
Update: Unsure if this will be a solution for you:
If you click the "wrench" icon of the dev server in your tray, you will see this:
The executable is in:
c:\Program Files (x86)\Common Files\microsoft shared\DevServer\11.0> (for VS 2012)
If you run it via cmd line, this will pop (instructions):
So if I ran it via cmd line:
webdev.webserver40 /port:8080 /path:"C:\Users\[my user name]\Desktop" /vpath: "/"
the dev server will run on the specified port (8080)
treat my desktop as the "root"
allowing me to type: http://localhost:8080/htmlpage1.html (this file is in my desktop) in any browser...
until I stop the instance running...
Not elegant in any way, so.....
To specify a port for the ASP.NET Development Server:
In Solution Explorer, click the name of the application.
In the Properties pane, click the down-arrow beside Use dynamic ports and select False from the dropdown list. This will enable editing of the Port number property.
In the Properties pane, click the text box beside Port number and type in a port number.
Click outside of the Properties pane. This saves the property settings. Each time you run a file-system Web site within Visual Web Developer, the ASP.NET Development Server will listen on the specified port.
more info: How to: Specify a Port for the ASP.NET Development Server
If you're using VS, you can create a project with just an HTML file (and whatever other non-.NET things you need). From there you can set the port under the project settings. I understand that you're using VS just as the text editor (I do the same thing all of the time), but if you want to set the port, that's how you're going to need to do it because otherwise VS is going to pick a port unless the project file (which is missing) tells it to use a specific port. If you use the "open in browser" feature, it actually launches the web server and uses that to host the HTML file.
An alternative would be to edit/save in Visual Studio and open the file in your browser for testing. This will work because it's an HTML file and you don't need a webserver to view it.
my redirects don't work
The port shouldn't effect your redirects unless you're specifically referencing a protocol and port...but you shouldn't need to do that. Can you post your code or give an explanation as to what's happening here?
I've been trying to fix this for quite some time now, but I simply can't make any ASP.NET projects in Visual Studio Express 2012 for Web. I get this error when I start a new project:
Web application projects are currently configured to use IIS Express. To switch back to using the Visual Studio Development Server, change the development server option under the Projects and Solutions/Web Projects Category of the Options menu. Configured IIS Express failed with the following error:
Filename: redirect.config
Error: Cannot read Configuration file.
So I went on the internet to try and find others with the same error but I can't find a concrete solution to my problem. I find something similar for older versions, but it doesn't fix my problem. I do have the IIS Manager up under my Services (When you want to Manage Windows). I even made a virtual folder, but to no avail. Still doesn't work.
I want to use IIS
How do I fix this?
In Solution Explorer, right-click the name of the Web application project for which you want to specify a Web server, and then click Properties
In the Properties window, click the Web tab.
To choose the Visual Studio Development Server, under Servers, click Use Visual Studio Development Server.
To use a specific port number with the Visual Studio Development Server, select Specific port and enter the port number. By default, the Auto-assign Port option is selected, and the port number that has been assigned to your application appears
To choose IIS, under Servers, select Local IIS Web server. This option is not available if IIS is not enabled on your computer. A URL that combines localhost with the name of your Web application will automatically be created for you and appear in the Project URL box (for example, l ocalhost/WebApplication1).
To choose IIS, under Servers, select Local IIS Web server. This option is not available if IIS is not enabled on your computer. A URL that combines localhost with the name of your Web application will automatically be created for you and appear in the Project URL box (for example, loca lhost/WebApplication1).
To choose a custom Web server, select Use Custom Web Server. In the Server URL box, type the URL that Visual Studio should start when it runs the current project.
You may for example open you project file in notepad search for the string <useiisexpress>true</useiisexpress> replace it with the string <UseIIS>True</UseIIS> save and reload the project.
Make a copy of the project file first though.
Recently I installed Oracle and the required Microsoft Loopback Adaptor, which worked fine. However, this seems to have screwed up IIS (or at least its interaction with Visual Studio) somehow. I can't connect to localhost or 127.0.0.1 anymore, and I can't even open a web project in Visual Studio 2008 (which used to work fine), getting the error "The local IIS URL http://localhost/MyProject specified for the Web project MyProject has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create this directory now?" I click yes, then it gives an error that it "could not find the server http://localhost on the current machine".
IIS is running and I can connect to the default IIS website and other contents of inetput/wwwroot on localhost:1122.
I tried to disable the loopback adaptor and comment out the line I needed to add to hosts to get Oracle working, and while this has stopped Oracle from working, it hasn't helped with IIS/localhost.
edit: this turned out to be fixed by restoring the project from a backup, so it must have been an issue with the project itself of some sort.
I am guessing it's a problem with the loopback adaptor. You might have to restore your Connection settings properly. Check whether the loopback adaptor is properly disabled and whether Connection settings are correct from Control Panel->Network Connections.
Edit:
Also it would be better to restart the system after you have made all the necessary changes in the settings.
You could configure your local IIS to listen on a different port. Right click Default website, tab Web site, then Advanced. Add for example 1234 as a TCP port.
Then you can connect like http://localhost:1234/YourProject
You can open the website in Visual Studio from the file system, and specify the new URL in Project -> Property Pages -> Start Options -> Use custom server.
Ok, I finally managed to get this working by deleting the project and restoring from a backup. I guess the project configuration had somehow become screwed up in such a way as to cause the error I got, rather than there being a problem with IIS itself. Sorry for the false alarm.
Something similar happened to me today on Windows XP and IIS 5.whatever-it-is. The problem is that a tool I installed had created some Virtual Directories without an Application Name under the Default Web Site.
The solution was to open up the IIS snap-in, right-click and choose Properties for the offending virtual directories, and make up an "Application name" under the "Virtual Directory" tab of the Properties dialog that pops up. It didn't matter what I named it, as long as there was no virtual directory under the Default Web Site with a blank application name.
So, I've read that it is not a good idea to install VS2008 on my test server machine as it changes the run time environment too much. I've never attempted remote debugging with Visual Studio before, so what is the "best" way to get line by line remote debugging of server side web app code. I'd like to be able to set a breakpoint, attach, and start stepping line by line to verify code flow and, you know, debug and stuff :).
I'm sure most of the answers will pertain to ASP.NET code, and I'm interested in that, but my current code base is actually Classic ASP and ISAPI Extensions, so I care about that a little more.
Also, my test server is running in VMWare, I've noticed in the latest VMWare install it mentioning something about debugging support, but I'm unfamiliar with what that means...anyone using it, what does it do for you?
First, this is MUCH easier if both the server and your workstation are on the same domain (the server needs access to connect to your machine). In your C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 (or x64, or ia64) directory are the files you need to copy to your server. There are different versions between Visual Studio versions, so make sure they match on the client and server side. On the server, fire up msvsmon. It will say something like "Msvsmon started a new server named xxx#yyyy". This is the name you'll use in Visual Studio to connect to this server. You can go into Tools > Options to set the server name and to set the authentication mode (hopefully Windows Authentication) - BTW No Authentication doesn't work for managed code.
On the client side, open up Visual Studio and load the solution you're going to debug. Then go to Debug > Attach to Process. In the "Qualifier" field enter the name of the server as you saw it appear earlier. Click on the Select button and select the type of code you want to debug, then hit OK. Hopefully you'll see a list of the processes on the server that you can attach to (you should also see on the server that the debugging monitor just said you connected). Find the process to attach to (start up the app if necessary). If it's an ASP.NET website, you'd select w3wp.exe, then hit Attach. Set your breakpoints and hopefully you're now remotely debugging the code.
AFAIK - the VMWare option lets you start up code inside of a VM but debug it from your workstation.
Visual Studio comes with a remote debugger that you can run as an exe on your server. It works best if you can run it as the same domain user as your copy of visual studio. You can then do an attach to process from the debugger on your machine to the IIS process on the server and debug as if it was running on your machine. You get more options for .Net debugging, but there's support for older platforms too.