How to switch ASP.NET Core MVC application from IIS Express to local IIS after allowing Visual Studio to generate IIS certificate? - iis

I had a previously running ASP.NET Core MVC application working fine on local IIS in Visual Studio when I hit the PLAY button, however some other sites and applications I was working on, on the same computer, did not run on IIS Manager when browsing directly to them from IIS manager or running them in Visual Studio.
Most applications that uses HTTPS for example mentioned that the "Remote Certificate is invalid for the validation procedure message". Yet for some other sites that used IIS Express, it worked fine.
What I have done to try to fix this is:
Removed the original IIS Self Signed Certificate from IIS Manager
Then deleted the website that was working fine
I then used GIT to clone the repository the application is located in
When I opened the solution again that previously worked in Visual Studio it gave me the following message about creating a new IIS Certificate:
Message I get when opening visual studio after deleting the already Self Signed IIS Express Certificate for Local development
Initially I hit YES to this which may be the cause of the problem
Now when I run the application that previously was working and seemed to be using LOCAL IIS, it keeps defaulting to IIS EXPRESS I can see beside the play button
Is there anyway I can put this back to running on LOCAL IIS for my ASP.NET Core MVC application? I cannot see it listed even in the IIS Manager on my computer.
Thanks
Henry

Related

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

Visual Studio 2013 Asp.net Razor v3 website unable to host to IIS windows 7.5

I am trying to host a asp.net razor v3 website to IIS, but it is not working. I tried multiple options including first creating the website then publishing to IIS, or directly creating a new website under IIS using visual studio 2013. It gives me HTTP Error 503. The service is unavailable.
Methods to reproduce Error:
Option 1
1) Create a new asp.net web site (razor v3) in visual 2013, and click publish to publish to a directory. Then, add that directory as a website in IIS.
Option 2
1) On the new website window, in visual studio 2013, go to browse and select IIS, and create a virtual directory directory under IIS to save the site.
Then, go to the browser and try to access the hosted site: localhost/sitename, it always produces some kind of errors. Like 503. What am I missing? Please help, looks like I am missing some steps or some configuration changes.
Also, I am trying this with the default razor v3 webiste content and without modifying anything. So, I have not touched any files or anything, I am just trying to upload to IIS.
The correct answer I found was that for some reason you must use the IIS Express 8.5 to test/host that site.
Even the installations on the fresh copies of Windows with Full IIS prior to version 8 did not work on my test machines.

Lightswitch IIS 7.5 Deployment - GetAuthenticationInfo

I am having an absolute nightmare with the "Load operation failed for query 'GetAuthenticationInfo'. [HttpWebRequest_WebException_RemoteServer]" error when deploying my applications to a new server.
The apps I have are working and have been running for a while on another server. I have now got to move them to a new one, and I cannot get anything to work!
I have been through all of the posts on this error and have tried almost everything to get this deployment working.
Old Server: Win 2008 R2
New Server: Win 2008 R2
At first I thought it had something to do with Devexpress Xtra reports but I have disproved that by creating a bare bones app with one screen and one table and no extentions. And it still fails. I have also tried this with every combination of authentication. I have also deployed this test app to the old server and it all works fine, so I am sure there must be something wrong with my IIS settings. Visual studio is publishing the app with no errors. I only get it on runtime. I have tried to use fiddler to get a clue as to what is going on but I cant find anything useful.
I have also tried:
• removing and adding the web server role on the new server to try and reset configurations.
• Deploying several known working LS applications
• Every combination of Authentication on the IIS server for the app, website and server level
• Tried syncing the IIS configuration with the old server using MSdeploy.exe cmd line
• Repairing the .NET Framework 4 Client prile & extended
• restarting the server
• Installing updates
• re installing web deploy
• Made sure the application pool was .net v4
• made sure the application pool was integrated
• changed the authentication on app pool user to a domain account with known admin rights to the server (and have now put back to apppool identity)
• Creating a new website and deploying the app into there
• restarting web services
• Installing Lightswitch 2012 Server pre-requisites
None of these have worked at all.
The only way I can get my deployed application to load into a screen is to buid as a web type and change the url from
http://server/otm
to
http://server/otm/default.htm?IsLaunchedByVS=True&AuthenticationType=None
Something which I think it could be related to is a faulty installation of "Lightswitch Server Configuration" which installed using the Web Platform Installer 4.5
This however is not showing in the Add/Remove programs list, so I cannot uninstall it to see if it is messing things up. I cant seem to uninstall it from the WPI and i also cant find a direct download link from Microsoft.
I am completley out of ideas and in big trouble as these are production applications and the old serve will be shut down within the next two weeks. Any help would be appreciated!
.net framework 4.5 try running the app on .net framework 4 I had the issue and spent 40 hours on it .net 4 framework works

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.

ASP Net MVC 3 Application and IIS / IIS Express on windows 7 64 Bit

I have an MVC3 web application - it is a set of controllers and views without any DB access at the moment.
In the properties for the WEB App (in vs2010 Sp1) If I select
Use Visual Studio Development Server defaulting to a port 10905 then the app works great from an f5
If Instead I use local IIS WebServer with Use IIS Express ticked my project url is http://localhost:10905/ and the app works great.
But if I use local IIS WebServer with Use IIS Express NOT ticked my project url is
http://localhost/TunnelRats then f5 does not work - I literally get a browser popping up with no content displayed just the url address populated.
I created the virtual Directory (using the create directory button) and looked in the IIS Manager
The IIS Manager uses pool ASP.NET v4.0 which has enable 32 bit apps set to true and an integrated pipeline mode.
If I browsse directly from the virtual directory I get the same problem.
Its seems my IIS has a problem where my IIS express does not have a problem running my MVC 3 app.
I used aspnet_regiis -iru to reinstal v4 into IIS with no effect.
Any Ideas
thanks
Martin
might be that you do not have dynamic content enabled on you IIS.
Easiest way to set up IIS for asp.net this days is to use Web Platform Installer

Resources