I have a folder MyWebSite. I open it in Visual Studio 2010 and browse using the local webserver. It runs fine.
Now when I create a copy of the folder, open the website in Visual Studio and try to run it from there, it says:
This page can't be displayed. Make sure the web address http://localhost:21926 is correct.
What seems to be the problem?
Create a separate application pool and virtual directory for each. Your original site name is tied to a particular port because you are using the built-in server. Better to develop against IIS.
Please make sure you close Visual Studio and the instance of the ASP.Net Development server before you re-launch visual studio with the other folder.
In case you are trying to run both instances together, you might get such as error.
You could also try clearing the ASP.Net temporary folders and see if that solves the problem.
Related
I must preface this post by saying that I am not an experienced developer, I am in the process of learning through trial and error and a lot of google searches so detailed (step-by-step) feedback would be greatly appreciated. I created a website, which does not use a database, using visual studio 2015 and I am attempting to host it locally on a Windows 2008 R2 server.
I installed IIS and loaded the asp.net v4.0 framework. The site works fine, produces no errors when I test it and works after being published only if the visual studio is still running.
However, when I close the Visual studio and open my browser window to http://localhost:50044 (which is the URL listed in properties menu in VS), I also tried using port :80 and nothing. When trying to add Web Site via the IIS management utility I receive the following authentication error: ”Cannot verify access path (C:\Inetpub\wwwroot).”
I checked the permissions and windows authentication is enabled with read access, and all other permissions seem to be correct. I am at a loss, I'm sure it is probably something simple that I am missing due to my lack of knowledge and experience. Any help would be appreciated.
It's sounds like you are running on IIS express which in your case stops running when you close visual studio. Normal process is create a new website in IIS and point to the folder where your web.config is. You can then hack your host file (C:\Windows\System32\drivers\etc) so DNS works. Add an entry like "127.0.0.1 mytestwebsite.com". I hope that helps
So I figured out part of what was happening. I didn't realize that visual studio has built in IIS and was using that by default.
I ran VS as an admin, created a new project, then attempted to create a virtual directory thru VS under the project/properties/web tab. I selected local IIS and entered http://localhost/boc and it returns an error: unable to create vd. Web server http://localhost... Could not be found.
I then went in to the IIS manager and set up a virtual directory with no issues. However, when I attempt to reference it thru VS I again receive an error message.
Any ideas?
I have an ASP.NET project managed in the VS 2010 IDE. I constantly copy it from one development machine to another. By its nature this ASP.NET project must run on an actual IIS. One development machine has a local IIS configured but I couldn't set it up on a second machine. The project is set up to Use local IIS in its properties. The issue happens when I try to copy this project from a machine with the local IIS to the one that does not have it. When I load it up in VS 2010 the only thing I get in the "Solution Explorer" is <SolutionName> (Unavailable) and I can't do anything, even open up its properties. The only way to fix this is to go back to the first machine and set up this project to Use Visual Studio Development Server and then copy it.
Is there any way to do this on the destination machine without this route of going back to the first computer?
I've looked all over this site and I cannot find the answer to this question.
Basically I'm trying to set up a new site for use with another project I'm working on. This site will run locally on my personal computer and will also be accessible via internet. So I installed IIS 7.5 Express and IIS Manager 7 to host this site. When I went into VS 2012 elevated to create a new site and map it to 'localhost', it pulled up the following error:
Invalid URI: The hostname could not be parsed.
2nd attempt was by creating the site in a new directory by itself inside inetpub, just for the project itself and leaving wwwroot alone. When I do this, I get the following errors:
Filename:
\?\C:\Users\Joel\Documents\IISExpress\config\applicationHost.config
Error: Cannot read configuration file
File system Web sties 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 Tools\Options menu.
When I browse the above location, applicationHost.config does not exist, but when I go to
C:\Windows\System32\inetsrv\config
I find it just fine. IIS Express 7.5 works fine and IIS Manager can find the default site just fine and will even let me browse it using my web browser. What am I doing wrong and how can I fix this so that VS 2012 can create web sites and access the necessary files.
I run Windows 7 Professional x64 and I just finished installing IIS Express and IIS manager. I configured VS 2012 for Web Development. I ran VS as Administrator (elevated) for all of this.
Okay, I found the solution. I needed to manually set Visual Studio NOT to use IIS. Not sure what the issue is there.
But the solution is here for everyone else having this issue.
It was right there, I'm sure, when I was setting it up initially and I just missed it. After doing that, I could set up the new website to use the file system, which would bypass IIS anyway, but the setting to use IIS was conflicting with the bypass, which caused the error.
Hope this is superhelpful!
On my Windows XP desktop, I have a fairly simple ASP.NET targetting .net 4 in Visual Studio 2010. I can run it on my local host by ctrl + F5, it works all fine.
I have a Windows Server 2003, that I can access via mstsc, but also via Explorer. When I go to the publish section of my build properties, i see 4 publish methods :
Web Deploy, FTP, File System, FPSE
I have already installed IIS 6 successfully on the Windows Server, and given all authorizations for everything I could so far (to get things to work in the first place, will check on that later).
How should I proceed to publish to that remote machine ? Should I target a specific folder ? Do I need to setup things in IIS 6 for that site first ? Or will it all get settled from te properties I have in Visual Studio ?
Thank you guys,
J.
Personally I've always plumped for a manual deployment; that is I create the Web Site in IIS creating an appropriate AppPool and targeting the correct .NET version to utilise. From there simply copy (xcopy if you will) the appropriate files over, e.g. DLL and all supporting pages such as ASPX, CSS and associated images. In most situations where I have direct / RDP access this is what I run with.
That said, this can be automated from Visual Studio and this can be useful for those situations where you're maintaining an awful lot of sites on a regular basis. With IIS 6 and Visual Studio, this was achieved by installing FrontPage Extensions on the server then utilising the Publish option.
For VS2010 it seems this has been streamlined using the IIS Web Deploy module and configuring the Studio to publish in this manner that looks mildly quick...
HTH
I've never used the Web Deploy feature in 2010, so I can't really tell you about its merits or drawbacks. I've read that it works much better with IIS7 than IIS6. If you have direct access to the IIS root folder on the server (typically c:\inetpub\wwwroot) through a network share I would recommend doing the file system deployment. FPSE works as well if you have to publish to the server through a remote URL, but there are some security issues with FPSE that make enabling it on your web server a less than ideal choice.
Once the files have been deployed, all that should be left is to configure the website as an application inside of IIS.
Remote in to the web server and open IIS
Right-click Default Web Site and choose properties (if you've deployed to a subfolder in the root, then locate that folder and choose those properties instead
Switch to the Home Directory tab (Just 'Directory' for a subfolder)
Look for the Application Settings section and click the button that says Create
Optional: Select an app pool if you have created a custom one from the default
That should enable IIS to execute your .aspx files inside of your application. Once you've successfully configured the app for the first time, you can just keep publishing your app to the same location over and over without having to reconfigure it.
Another beginner question for ASP.NET:
I'm starting an ASP.NET project in Visual Studio 2008, and would like to link it to a folder on a remote server (as in it builds/publishes to this folder). It may be my phrasing, but I cannot seem to figure out how to do this (even with Google at my side!).
I naively tried to just upload the code files to the server, but running my code produces errors related to the fact that the pages are not set up as an application.
Any help would be appreciated (or a link to a resource where i could learn more about this basic asp.net/vs08 stuff I keep running into).
On your web server the folder you copied your files into needs to be set up as an application or a virtual directory. This is done through the Internet Information Service panel found in the "Administrative Tools" off the Control Panel.
Depending what flavor of IIS you are using the procedure may differ.
Visual Studio 2008 has a publish feature. If you right-click on the web project there is a "Publish" option. You can then select where you want to Publish your files.
2 fast answers:
You can use the Publish option in Visual Studio and create a folder inside wwwroot to publish
Alternatively, you can create a simple setup program. Just add a new "web setup project" to the solution and add the results of the web site to the setup project.
And of course, have you tried googling asp.net deployment to get some help?
Good luck! :)
You will love Visual Studio 2010, which should be out in early 2010, if it follows previous versions. This would also mean an MSDN release a few months earlier. Why? Better deploy story.
As for where we are today, you can publish and have a directory created. You will have to publish to IIS instead of a directory to accomplish this. This means you have to have permissions to add a web app and publish to it.
For a directory, you will have to create the app in the IIS Manager. If you do not have access, try the IIS admin. If you cannot get them to do it, you are back to publish.