The webserver could not be found for IIS-confugured Web Application Project - visual-studio

When I am trying to create a new project in dotnetnuke 9 with for Theme develop using VS, I am getting the following error:
"The Web Application Project is configured to Use IIs. The webserver could Not be found "
I am using VS 2019 and SQL 2017. I create a website in IIS with port 80 that works correctly at localhost. Folder wwwroot/dnndev.me has Network Service permission full access, hostname is dnndev.me without www, there is no .csproj file because the project has not created it yet.
Any suggestions are welcome.

Please check if you have some virtual directories and/or applications in your web site. Visual Studio creates these very often when you open a project. It's safe to remove them - also after opening the project.

Related

MVC6 Web API - How to deploy

I downloaded and installed the RTM of VS 2015, got my Web API project working nicely, can hit F5 all works in IIS Express, lovely. But now I go to deploy my WebAPI on a local network server and oh my! I was hoping to find the publish to File System option and then to be allowed to select IIS but it ain't there. Publish to file system is there but that compiles wwwroot and approot folders and for the life of me I haven't been able to get them's files to run under IIS - tried all sorts, ege approot as my website root on IIS, wwwroot as my website root. I've found plenty of reference to show you how to deploy Web API ASP 5 to Azure but have as yet been unable to locate any information for how to deploy to IIS on network.
Just got it to work, for the sour down voter here's how
Right click WebAPi project select Publish
Profile -> Select File System
Connection Target Location browse to somewhere that makes sense eg. C:\inetpub\WebAPI
Settings ->Configuration select Release
Settings Target DNX Version select x64 example dnx-clr-win-x64.1.0.0.beta4
In IIS set the Physical Path of your website to be C:\Inetpub\WebAPI\wwwroot
Test eg localhost/api/Values

How to debug ASP site without port number on VS 2012 Express

I'm trying to debug an ASP.NET 4.0 web site using Visual Studio Express 2012. I've configured the project settings to use the local IIS web server which was installed with VS. I need to use IIS so that urlrewritingnet will work.
I need to run the site locally without a port number. Currently it runs as http://localhost:4652/ which breaks some of the routines since they reference Request.Url.Host. This results in attempts to access resources using http://localhost/.
There is a lot of code to this site and it would be extremely easier and quicker (I think) to just configure my local debug to run on localhost instead of localhost:4652. Is there a way of doing this?
Since it's IIS Express installed with VS there is no configuration manager for IIS. When I click PROJECT -> mysite Properties and change the Project Url (under Use Local IIS Web Server) to http://localhost/ I get a warning that reads:
The local IIS Express URL http://localhost/ specified for Web project mysite has not been configured. To keep these settings you need to configure the virtual directory. Would you like to create the virtual directory now?
When I click on Yes, I get another dialog box saying:
Unable to create the virtual directory http://localhost/
Does anyone know if this should or should not work and if it can work, how do I do it?
You can go to "user/documents/iisexpress/config" then open applicationhost with notepad or other relevant editor then go find "bindings" then change the value of bindingInformation into "*:80:localhost". Done
Its really simple. You need to attach the IIS process to the visual studio and browse the website.
Below article guides to achieve this.
http://www.codeproject.com/Articles/37182/Debug-your-ASP-NET-Application-while-Hosted-on-IIS
Its always a good practice to do a unit test of web apps to local iis while developing.

What is going on with this 'localhost' project in visual studio?

I have a visual studio solution and when I opened it I got an error saying:
"http://localhost:55365 : error : Unable to open the Web site
'http://localhost/_1'. To access local IIS Web sites, you must install
the following IIS components:
In addition, you must run Visual Studio in the context of an
administrator account.
For more information, press F1."
What is strange is that nothing is listed to install. NOTE : I have run visual studio as administrator. This is a screenshot of the solution in the explorer...
Really I have 2 questions:
1) What is the project type of the second project in the solution explorer?
2) Why wont it load? I do have IIS installed and I have other sites that run under the web development server....
Web Application or Web Site.
Project was pointing to a local IIS web site but this doesn't exist anymore.
About 2), maybe you erased by error your web site code and its physical folder, or the IIS web site.

VS2008 How to deploy a WebSite Application Project

So I have created a Web Site Application project in VS2008 and is fine on my local machine. Just wondering how to I deploy this to a dev server i.e via FTP i.e. do I need just copy over all files i.e.
Microsoft Visual Studio Solution
Visual Basic Project File
Visual Studio Project User options File
and the rest of my customer folder and files & web.config ?
And then when I have those moved and i.e I want to change the config file on the dev server, can I just change the web.config directly on that server or do I need to then open it visual studio on that server and recompile again ?
You can use the Publish Web Site options under Build Menu.
This option can deploy directly on the remote site whit FTP or can publish the file needed on a foolder on your local computer, so you only have to upload on the remote site.
After you deploy the web site if you have only to change the web.config you can use Notepd for it and don't need to recompile nothing... only if you change CodeBehind you have to recompile and upload only the DLL.
This link can Help you understan all the process

Need to name websites on localhost running on different Ports

I have my development PC on Windows 7 for ASP.NET and running Visual Studio 2010 and IIS 7 (NOT using the development web server). I have created multiple websites on different ports on my PC. E.g. http://localhost:8080 points to Website A. But when I open the site in Visual Studio, the project name shows as http://localhost:8080, as follows.
I would like to change that name to http://WebsiteA or http://WebsiteA:8080. Some identification.
I edited hosts and added
127.0.0.1 WebsiteA
Ping works fine. Also browsing WebsiteA:8080 works fine. But when I try opening the site (http://websitea:8080) in Visual Studio, it says Web site does not have Frontpage server extensions installed.
Is there any way to at least rename what's shown in the project list in Visual studio. I just need an identification on each website. I have about a dozen project and more may be added.
Thanks
IIS in Windows 7 allows you to have named virtual hosts. You can use that to separate out your sites. Visual studio cooperates with the naming of the virtual hosts. You will need to configure your visual studio project to operate against IIS (for debugging and running) rather than the visual studio built in web server.
Managed to find a way. This is what I did. Went to IIS Management, Created a new Website - Give it a name WebsiteA, Choose the folder where the web is located and give it a Host Name - WebsiteA. Click OK
Then go to Application Pools. You'll see your Host name there. Change the ASP.Net version to 4.0 or whatever you want. Then add a hosts entry 127.0.0.1 WebsiteA.
Now you can add http://WebsiteA in Visual Studio.
Thanks for all the help guys

Resources