Virtual Directories not showing in IIS? (Visual Studio Application) - iis

I'm attempting to do a second part of a tutorial here http://msdn.microsoft.com/en-us/library/ff729689.aspx I'm following the instructions in that I have the OrderServiceProject creating a virtual directory here http://localhost:8087/OrderService. From what I'm seeing, it should be creating successfully, but the OrderService virtual directory doesn't seem to exist according to iis.
I'm completely new to interacting with iis and would appreciate any assistance

You have to select the Web tab in the project properties.
Select your local web servern enter the project url and click on "Create Virtual Directory".
Important Note : Your local IIS server have to be started and binded to port 80. local IIS server is not IIS Express or Visual Studio Web Dev Server.
To open the IIS Manager, run InetMgr in the start menu.

Related

Debug asp.net 5 application with specific domain

I want to run my ASP.NET 5 (beta7) application in Visual Studio 2015 on a specific domain, mydomain.com for example. How could it be achieved?
Hosting the published version would lose the Visual Studio debuging. Built in IISExpress launch profile do net let domain address change, just port number of localhost address.
EDIT: I've solved the problem with self-host, Microsoft.AspNet.Server.WebListener, but is there a way to do that with Windows IIS 8.5?
Publish your app to the file system and set up an IIS site as described in the documentation. You can use a custom domain if you override routing in the etc/hosts file.
In Visual Studio, go to Debug -> Attach to process
Check Show processes from all users
Find process called w3wp.exe and attach the debugger to it
Now your breakpoints will be hit as if hosted in IIS Express...
For me, I had to attach to the correct dnx.exe process not the w3wp.exe.
I found the correct dnx process by looking at the username it was running under. It was the app pool identity that I assigned the site to in IIS.
Update (2016-09-14):
With the release of .NET Core 1.0, I now must attach to a process that is named the same as my project. Eg. if my project is name TestWebApp then the process I attach to is named TestWebApp.exe.

Debugging multi-site web applications in Visual Studio on Windows 8.1

I have a multi site Azure based web application. One site contains the web pages (with the view functionality driven through jQuery, Raphaƫl, and HTML) and a thin WCF service. The second site contains a more functional WCF service which in turn calls the data objects that call the database. We stopped development on the site a few years ago but it is still live for the few people who still enjoy using it.
Yesterday I had to fix an cross-site scripting vulnerability someone had reported on the site.
I was alarmed to find that I can no longer run the sites on my local machine under Visual Studio to test and debug any changes before deploying them to Azure.
Because of the interaction between the two WCF sites I had the local debugging set up as follows:
In the Internet Information Services Manager tool (InetMgr) I add additional websites with their physical path set to the location of the source code in the TFS local path on my machine.
I edit the host name in the site's binding to mimic the Azure location, i.e. the main site is projname.cloudapp.net:80 on Azure and projnamelocal.cloudapp.net:80 in my local IIS and the data WCF site is projname-wcf.cloudapp.net:8080 on Azure and projname-wcflocal.cloudapp.net:8080 in my local IIS. (N.B. The main site has a HTTPS binding too.)
I edit C:\Windows\System32\drivers\etc\hosts to include the lines
127.0.0.1 projnamelocal.cloudapp.net
127.0.0.1 projname-wcflocal.cloudapp.net
In Visual Studio I edit the web properties for the main site's project so that it uses the local IIS and project URL http://projname.cloudapp.net/ and I have a switch (in the code to say whether to call the local WCF or the live Azure one.
In the past when the project was under active development this set-up worked fine for locally testing and debugging. Yesterday it failed, one one machine http://projnamelocal.cloudapp.net/ gave a 503 error on another a 404. (N.B. I can ping each URL from the command line so the hosts redirect is working.) Visual Studio complains that it is "unable to start debugging on the web server" and that it "could not start ASP.NET debugging".
I've tried all the suggestions and some:
Running without debugging
Running Visual Studio as administrator (I was already)
Re-registering ASP
Changing the app pool
Giving everyone full permissions to the code directory
Running as my own domain account that is an admin on the local machine
Changing IE to not auto-detect proxies
Adding the sites to IE's list of trusted sites
Turning off IE's protected mode
Restarting Visual Studio
Restarting the PC
Restarting the PC again
How should I set-up this style of running, testing, and debugging local sites work in IIS under Visual Studio?
Got it.
I had forgotten to go to Control Panel > Programs > Turn Windows features on or off > .Net Framework 4.5 Advanced Services > WCF Services > HTTP Activation
Now that I have that installed the local sites start

Why websites created in WebMatrix not visible in IIS?

I have windows 7 home premium. The version of IIS is Home Premium 7.
I have created a website using DotNetNuke through WebMatrix. The files related to the website are created under the "My Documents" folder. However, when I open the IIS window, I do not see any website that I created in WebMatrix through DotNetNuke. Following are my questions:
1) I would like to understand how WebMatrix configures the website to be run without the website being visible under the IIS console?
2) Where does WebMatrix stores the configuration i.e the port assigned to Localhost (In my case it is localhost:32189)
WebMatrix does not create sites under the full version of IIS. It uses IIS Express. If you want your site to run under the full version of IIS, you need to configure that yourself.
You can usually find the IIS Express configuration file in C:\Users\<your-username>\Documents\IISExpress\config\. Its a file called applicationhost.config.

Configure Aptana Studio 3 with Local IIS Server

I am very new to web development and so I am also very new to Aptana Studio and IIS. I just installed both on my computer today. I read instructions on Aptana Studio's help system about adding a web server, but it does not seem to work for IIS.
I have IIS 7 running locally on my machine. In Aptana, I went to Servers --> Add Server --> Simple Web Server. Then I gave it the following parameters in the dialog:
Name: IIS
URL: http://localhost:80
Document Root: C:\inetpub\wwwroot
The server then appeared in the Servers View, but status was N/A and the preview of any website would still use the built in web server included with Aptana.
My Google searching has not found any more specific instructions for configuring Aptana with IIS.
I have had some success by going to the Debug Configurations, from there you can switch the launch location (and browser executable) with a combination of radio buttons. To access the menu, click on the pull down next to the debug button.

Create a web application on IIS when using a Web Site (the microsoft version)?

sorry for possibly a very stupid question.
I have one of those Visual studio Web Sites ( ie not a web application) ,
is there any way I can automate the creation of the IIS Web Application that points to the web site within Visual Studio ( ie then when developers open the solution, the IIS site will be set up automagically?
Sorry, just not famiiar with the Web Site side of things
Thanks
AFAIK It's not someting Visual Studio will do out of the box. What you could do is create a batch file that creates the virtual directory then opens the solution. Store it in source control and your developers will be able to run it instead of opening the solution directly.
There are a few options for creating an IIS virtual directory automatically - see this and this.
Also - if you are using VS2005 or above you could change you application to use the development web server instead of IIS and then you won't need to mess around with virtual directories at all. Select 'Use default Web server' on the 'Start Options' section of the projects property pages.

Resources