VS2015/ASP not updating iis express files - c#

I have an issue which I believe is IIS Express related. I am making a Web App with ASP Web Forms(I know I should be using MVC, but for this project, Web Forms was specified as required). Whenever I build it opens the url http://localhost:53605 and loads the website. The problem is the copy is showing is old, this started happening yesterday, I haven't installed any updates to VS or Windows.
Things I have tried:
Disabling Chome Cache
Using another browser
Change the IIS Express build url (This works, for ONE build and then it's back to the same issue)
Delete the /bin & /debug folders
Does anyone have a solution to this? I can just change the build URL everytime, but anyone who had made an ASP Web App will you rebuild 100's of times a day...
Thanks

If IE setting is OK, then set vs setting
Go to Tools-Options
Under Projects and solution ->
Build and Run select "Always build" under "On Run, when projects are out of date"
For Chrome VS debug, refer

Related

Error trying to publish my web app from VS Community 2015 to Azure. Error: Can't find existing loaded project:http://localhost:55809

This was working fine yesterday.
I made several changes to my system (updates from VS Community 15) and the Azure SDK updates, etc., - as was recommended by the software.
Today, when I right click on the web app and select Publish (using the same or manually entered public information) I see the following error on my Azure App Service Activity tab:
Can't find existing loaded project:http://localhost:55809
I have since tried other publish profiles, none seem to work.
I can successfully build and run the web app on localhost.
In Visual Studio, go to View -> Other Windows -> Web Publish Activity and you will see the Azure App Service Activity window.
Click on the Publish web icon that you will find there. It should work.
Publishing via FTP to azure instead of WebDeploy worked for me.
Change the deploy method to Ftp then change it right back to "Web Deploy". This keeps working for me
In the project folder in the website.publishproj file change the SourceWebProject tag to contain your client name instead of the localhost.
At least this worked for me :)
Update 13 Dec 2015:
Having the same problem again. The previously mentioned fix does not work. However publishing via FTP to azure works.
When you get the azure publish profile you get both Web Deploy and FTP. Try using FTP.
An update of Visual Studio Community 2015 to version 14.0.24720.00 Update 1 seems to have corrected the problem.
Update or install from here. Visual Studio Community Download from Microsoft

VS 2013 hangs when publishing website to Azure cloud service

I have a website in C# Visual Studio 2013, which was developed by another developer and is hosted on Azure cloud service. Whenever I make any changes and try to publish, Visual Studio hangs and I can't publish it. It is not showing any error message. Besides that I can successfully deploy it by building it, but as it's taking too much time and also costs money to client (as VS Team Services only provides monthly 60 minutes of free build, after that clients get charged for extra minutes). I am using following steps for publishing and it's works fine but after publishing starts Visual Studio hangs and is unresponsive.
The steps to publish the website are as follows:
1) Open the solution in visual studio.
2) Right click on the azure project in the solution explorer, and select publish.
3) The first step in the wizard is to sign in, make sure to select your credentials.
4) The next step is settings, make sure environment is set to production and build configuration is set to release, then click next.
5) The final step is a summary, simply click the publish button.
I am very new to Azure so let me know if I need to make any setting during set up my project.
I hit the same problem after installing the 2.8 SDK and tools. After checking out these answers I still had the problem, but found a solution.
Right click the Azure project in the VS2013 solution explorer, open project properties. Go to the application tab, and there's an "Upgrade" button to upgrade the project to the latest SDK. That did the trick for me.
It sounds like you are doing the right steps to deploy using the wizard. However I don't have enough information to know what would cause this to hang. There are some documentation details about the wizard that might help? https://msdn.microsoft.com/en-us/library/azure/hh535756.aspx
There are other ways to deploy to Azure, which may solve the issue. You can for example download a publish settings profile, and use this to deploy instead of the wizard. Details here: http://blogs.msdn.com/b/avkashchauhan/archive/2012/05/10/downloading-windows-azure-publish-settings-subscription-configuration-file.aspx
Or you can deploy continuously from Git - https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/#Step75
Both solutions will require some tinkering in the Azure portal or getting in with PowerShell but there's a lot of ways to deploy.
Doing these two things fixed it for me, not sure which:
Clean build
Server Explorer > (Had to re-enter Azure credentials)
VS2013 update 5.
A related post found here..
https://social.technet.microsoft.com/Forums/virtualization/en-US/4e51b1f0-91c3-4ce9-9a15-a8d10f912c5b/publish-cloud-service-causes-visual-studio-2013-to-hang-crash?forum=windowsazuredevelopment
One user was able to get past the publish freezing by doing the following..
So I did a line-by-line comparison between all of the files in that
new project and everything in my existing one and found only two
possible things wrong:
1) The version stamps (dates, really) in my
files were not upgraded to reflect the latest version of the Azure
tools. I manually changed those in my existing project to match the
garbage test project's date stamps.
2) My XML files had some empty
sections that did not exist in the new project's files, so I simply
removed those empty sections.
3) Beyond that, I also deleted my *.user
file.
Specifically, I was able to remove schemaVersion="2014-06.2.4" from my ServiceConfiguration and ServiceDefinition files and it fixed the issue.
My guess is that your installed sdk version is different than the specified schemaversion.
I tried all above methods none worked for me. So this is for people who already tried above and still couldn't make it work.
=> Publish in Release mode :-)
Yes I was trying to publish in Debug mode which was causing it to hang till death ;-)

How can I test MVC changes by refreshing the browser?

I know there's a way to, in Visual Studio, test a change by getting the page running in the browser, and then by just refreshing the browser page rather than by rerunning the application. But although it was working before, it isn't working now, and I'm fairly new to MVC, so I don't remember what I was doing to make it work. Instead, I'm having to actually re-run the application each time.
Specifically, I 1) run from VS, 2) copy the URL from the webpage I just launched, 3) stop debugging from VS (and the browser closes), 4) paste that URL into a new browser window and hit enter, 5) get "This webpage is not available" from Chrome and "This page can't be displayed" from IE.
I'm using VS Express 2013, and was also using that when it was working. I've tried with both IE and Chrome, and I've rebooted my computer and cleared my cache. What did I do wrong / how do I fix it? Thanks!!
Install IIS locally on the machine you run visual studio on. Create a new site in IIS and point it's path to the path of your MVC project. Change the application pool for it to use .net 4 and set the identity on the application pool to your user account.
Then give it a binding of something like localdev and a host header in your hosts file, then just build the site and go to http colon localdev in the browser.
It will reset the app pool automatically when the build changes.
The way I build sites is I virtualize. I use Oracle VirtualBox and install windows server 2008 r2 (or windows 7 x64) to a virtual machine in virtual box. Then I install Sql Server 2014 and Visual Studio 2013. Then I install Toirtoise SVN and Visual SVN extensions and get the source code from our sub version server and set up websites in IIS similar to how we set them up in production. Then when I want to debug code I just attach the debugger to ws3p.exe.
I searched SO for an answer before, but couldn't find one until after I'd posted mine (doh!). This question has the answer I wanted. Default MVC5 Application will not run out of debug mode in browser VS Express 2013
The issue was that I couldn't edit code (I could edit cshtml) when the debugger was still running. You can disconnect the running debugger and still keep the IIS session active if you uncheck Project Properties / Web / Enable Edit and Continue.

Visual Studio 2008 - Open Website from Local IIS problems

I've spent a great long while googling this problem without any luck and I've always found great answers here, so here it goes:
[BACKGROUND]
I have a web application which was developed in C# with Visual Studio 2008. It was a part of a solution with another project which contained a web service. This was not created "IN" IIS (I was using the Cassini ASP.NET Development Server at first, but have encountered numerous issues). I finally got approval to install IIS 5.1 (Government Network - using Windows XP) so I wanted to host my apps there for development.
I moved my projects to another folder created my IIS virtual directories, pointed them at the right location, updated my security settings, ensured that .NET 2.0 was selected and tested the site and web service. They function perfectly in IIS.
[ACTUAL PROBLEM]
I open Visual Studio, click File > Open > Web Site > Local IIS > [Application Name] and it opens up, but my .design files aren't nested under the ASPX / ASCX objects, and when I right click on it and select "View Code" it takes me to the markup instead of the code behind. Once I reach the code behind, I don't have access to any of the members of the design, as though there was a problem with the wire up.
I have tried creating a web site from IIS through Visual Studio, and it works perfectly. I closed it and opened it up again to see if that functionality would persist and it did.
I've encountered this before and have had to re-create a new site through Visual Studio, and manually re-populate it with all of my classes from a "broken" solution. I would love to solve this the correct way.
Please help!
Adam
The best thing I could suggest would be to go through the Project files with a fine toothcomb (as Filburt suggested) and make sure the references are pointing to a virutal directory (or via the inetpub folder, if thats how your IIS settings are configured), rather than a file system directory.
You might also want to check your IIS settings. Is your virutal directory set up to point to a file directory?
Good luck!
All dependencies between markup, .design and code-behind files are laid out in the project file.
You could use a sample project to discover how to correct your existing project.

ASP.NET, steps to deploy a website

I have recently inherited an ASP.NET website to look after.
I have a copy of all the files but coming from a PHP background I am not sure how to make changes and deploy it.
After I make changes to the site I presume I need to compile it. But can I then simply copy the site onto the server or do I need to create a setup package and 'install' it over the top of the production system?
Also, where does the code-behind DLL 'sit' in the file system?
Is there a decent guide to this kind of stuff?
After making changes and testing them with your local copy (I'm assuming you know how to do that), click the "Copy Web Site" button at the top of the solution explorer. This lets you connect to a remote server (your production box, presumably) and will compare your local version of the web site to the one on the server, and flag any files that have been changed locally. You can then update the server version so that it matches your local version.
If you're deploying the web app as a compiled DLL (instead of as uncompiled CS files), the DLL should sit in the application's \bin folder. Even with a compiled DLL, you still need to deploy the ASPX files.
You don't have to go for a setup. The answers to your questions differ based on whether you are using a 'WebSite' or a 'Web Application Project'. Please answer to following and we can follow up after that;
Which version of .Net / ASP.Net you use? (1.1, 2.0 or newer)
When you open up the package in VS (Visual Studio) and right click on the top most group (solution explorer) do you see options like Build web Site, Publish Web Site?
As a long-shot just try to create an IIS web site pointed to the root of your files and see if anything comes up. If this works the work process will be;
1. Do a change
2. Compile
3. Hit the web site URL and see whether it reflects

Categories