MVC3 Ap in Visual Studio 2010- Changed to use Local IIS Web Server and can not get it back to VS dev server - asp.net-mvc-3

I changed from running Use Visual Studio Development Server to Local IIS Web Server becasue I read it would create the virtual directories properly - it did not - once I navigate out of the account area I get
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Requested URL
https://localhost:443/xxx/Index
Physical Path
C:\inetpub\wwwroot\xxx\Index
I have been googling and trying to get it to work, but can not and can no longer debug - Now I am trying to change it back and it keeps starting in Local IIS Web. I have HOSED myself and don't know where to go from here.
Thank you

In terms of getting back to using the VS web server you should just need to:
Right click on the web project in VS
Selection properties
Go to the web tab
Select "use visual studio web server" radio button

For the sake of not leaving questions unanswered, I tried all of the suggestions above, and many more, and got nowhere. I was in an early phase at the time, and I had to move on, so I ended up creating a new solution, and porting things over. Not the best idea, but I had to go forward, and I had taken enough time. It is still living on my machine, and I plan to go back and figure it out at some point. Hopefully, I'll have more understanding and will be able to post what I did wrong so someone else can save some time. Thanks all for attempting.

Related

Blazor webassembly unable to put breakpoints

The goal is to be able to debug the client part of my blazor application. For this, in the sources accessible in the browser, I need to put breakpoints. The problem is that the sources are not apparent in the browser.
When I start my project in debug, I go to the localhost with the port of the sslPort property of the lauchSettings.json file
Then with Shift+Alt+D I will retrieve the instruction to execute.
I have the new window that appears, if I do Shift+Alt+D again I have the source tab that appears but there is no file:// folder as mentioned Debug ASP.NET Core Blazor WebAssembly in the Debug in the browser section
For information, at first I could not access part 2 because I had the following error:
websocket disconnected
I managed to make progress by following this post:
https://github.com/dotnet/aspnetcore/issues/26824#issuecomment-707825522
Has anyone encountered this error or have a clue?
I finally found the problem, but I don't know the real cause.
Below I explain my problem in case it can help someone, because I spent a lot of time to understand.
My post was intended but to help me put breakpoints in my client side code of a Blazor WASM application.
While setting the breakpoints in Visual Studio, I had an error telling me that the source code was not found, which is why I wanted to try the method through the browser sources.
I decided to go back to my original problem in Visual Studio.
I noticed that I can only debug projects that are stored in the source/repos directory in the folder. I tried in a VM, in it I can store my projects anywhere on disk.
On my pc, I found that Visual Studio is installed on disk C, but it also has settings on another disk, my 2 disk organization seems to be the cause. Because if I create or move the projects anywhere on the other disk, it works every time, if I take this project and put it on disk C, it doesn't work anymore. Unfortunately I didn't have the problem for a test project I created while trying to figure it out, so I see it can possibly be fixed.
To recap, if you have 2 disks with Visual Studio present on both, try testing on the other disk.

How to live code in .NET Core 3.1 application while using IIS server?

Recently I reinstalled my PC. I had my project hosted on IIS server, I remember that in Visual Studio I had to prepare IIS profile in debug options with hosting model OutOfProcess and then when I made some changes in code and hit refresh button in browser, project was automatically recompiling and giving me new results. It was basically live coding.
Ofc just refreshing page without any changes in code didn't trigger recompiling and browsing project was smooth.
I have no idea how did I achieve that, I was looking through internet for a while and coulnd't find solution. Every solution I found says to use dotnet watch run.
Right now I have same setup and it kinda works, but I have to hit compile every time I change something in order to see results on web which is really annoying.
Any idea how to achieve live coding with IIS?
EDIT:
I found the option I was looking for, but seems like it is set correctly and refresh doesn't trigger an rebuild.
I found partial solution, when I select:
Or:
It does work, however I think before it was working automaticaly without triggering an browser from VS. I'd appreciate any solution without it, however it is good enough for now.

Error 503 Service Unavailable when using localhost with Visual Studio

I'm posting this to save others a day wasting time trying to solve this.
My PC froze during a build and publish of my web application, so I had to switch the machine off and back on again. This coincided with a Windows Update being applied when the machine restarted.
After this I could not run the web application in Visual Studio, getting a Error 503 Service unavailable.
After trying everything mentioned here and elsewhere on the web, I noticed an app_offline.html file sitting in the solution folder. The file was empty.
I deleted the file and of course it all starts working. This file had been left during the incomplete build process.
So, hope this helps someone else.
Delete the app_offline.html file if one has been left after a broken build and publish process.
If you have IIS. Then go to IIS and click Application Pool, then click on default application pool and the clik on START.

SharePoint 2013 App Deploy Error: "A different version of this App is already installed with the same version number"

I have developed a very simple Provider-Hosted App which I was deploying to our SharePoint Online Developer Site.
Testing was going fine, and I had deployed it several times to the site, before I suddenly received this error in Visual Studio 2012 after I hit F5:
Error occurred in deployment step 'Install app for SharePoint': A different version of this App is already installed with the same version number. You need to delete the app from the site and the site recycle bin to install this version.
The thing is, I had just deleted / removed my app from the Developer site and from the recycle bin right before I received this error.
Not sure if this is relevant: but one of the changes I made to the program was to give the App Write permissions for the Web scope via the AppManifest.xml file.
I'm not finding anyone with this exact error on Google search results, so I thought I'd be the first to post it here.
Any help / ideas? I'm fairly new to developing for SP13.
Thanks in advance
First off welcome to the world of SharePoint dev. SharePoint can be quite painful with holding onto things, but the solution in your case is fairly easy - anytime you make a change to the AppManifest increment the version number. This is done on the general tab of the AppManifest, or if you're directly editing the xml then it should be the third item in the App tag.
Changing to 1.0.0.1 should fix your problem straight away, it is also a good habit to get into as then when you are deploying an app manually (not hitting f5) you will be able to update the old version of the app instead of having to completely remove it.

Unable to publish website from Visual studio 2010

We have a an ASP NET MVC website solution which only one out of three devs on the team is able to publish to the live server. When I, and another colleague, attempt to publish the site from VS 2010, the output window will display an error:
Unable to create the Web site
'\blah'. The path '\blah' does not
exist or you do not have access. The
specified path is invalid.
This points to a logon issue which my account, but the developer who can publish the site is a member of all the same user groups as me. As a long-shot, we gave Everyone full access to the folder, but this did not resolve the problem.
Can anyone suggest a more detailed way to try and figure out why we cannot publish the site? There must be a permission set somewhere that is allowing my colleague to publish the site from Visual Studio.
I had this problem and racked my brain trying to resolve it so I wouldn't have to copy the publish files to a remote server manually. I spent a great deal of time actively trying to get this to work.
Here's how I solved the problem: I went to File>Open in Visual Studio 2010 Express and navigated to the remote server (\\255.255.255.255\folder1\folder2\folder3 and so on). Right away I was challenged for a User Name an Password. I entered the credentials for the REMOTE server, checked the box to 'Remember my credentials'. I immediately tried to publish and voilá - it worked like a charm.
I hope this saves a lot of people a lot of time.
I had this issue - certain members of our team were able to publish directly from VS2010, whereas for some reason I was always getting permission denied errors, even though we were all able to connect to the server we were trying to deploy to. I fixed it in the following way:
Go to "Server Explorer".
Right click "Servers" and go to "Add server..."
Type in the name of the server you are trying to connect to, and then click on "Connect using a different user name..." - put the credentials for logging into the server in here.
Click OK and wait for it to add the server.
Now try and publish to that server and it should be ok...
Not sure why I needed to do this and others were able to deploy without adding the server in this way... remains unexplained.
According to the comments below:
You may need to restart Visual Studio in order for this to take effect.
This should also work for newer versions of Visual Studio
Faced the same problem today. In my situation I had to close VS2010 and open it NOT as an admin and it worked without any problems.
This got me for a long time...Go to Project - Properties and select the Package/Publish Web tab. Under the header "Web Deployment Package Settings", there's a ellipsis button that you can use to map to the location you want to publish. You will be asked for your credentials during that process.
Are you using web deploy (right click and choose Publish)?
Have you tried copying the ProjectName.Publish.xml file from the one machine where you can publish to the other two machines? The login credentials for publishing are saved in this file.
In IIS can you check to see that all users/groups are listed under Management Service Delegation in IIS Manager? It is listed under the Server node in IIS. Alternatively you can give all administrators access by clicking on Edit Features from the side-menu and checking Allow Administrators to bypass rules.
You could also check under IIS Manager Permissions for the individual site to see if the person that can publish is listed under there and you are not.
I just recently setup MSDeploy access on my server and found the following two tutorials helpful:
http://william.jerla.me/post/2010/03/20/Configuring-MSDeploy-in-IIS-7.aspx
http://code-inside.de/blog-in/2011/04/03/howto-setup-of-webdeploy-msdeploy/
I have also found that mapping a drive to the UNC location can be a work around.
#soupy1976's solution has also worked for me.
I can not explain why one day it will work and one day it won't
Frustrating....

Resources