Publishing to IIS7 fileshare results in HTTP ERROR 403.13 - visual-studio-2010

I have an test server setup that is running a version of the site I am working on. I change nothing on the server (IIS and whatnot). I have a share mapped to a directory below where the site is running from. I publish into the directory from VS2010. When I hit the site the next time, I get "HTTP Error 403.14 - Forbidden - The Web server is configured to not list the contents of this directory."
Review: Before the publish the application ran just fine. Publish = 403.14. Listing the directory is not the goal.
I can reset the file permissions with no change. If I restart the Site, IIS and the App pool, no change. If I delete the site in IIS and recreate it, it works again.

When I had this problem, I solved it by making sure the System.Web.Mvc dll was available on the web server. If it's not in the GAC, you can make sure it gets copied with the publish process by setting the Copy Local to true on the System.Web.Mvc project reference

I guess the answer is, don't do that. I can no longer reproduce the problem, so the result may not be related to the perceived problem.

Related

Unable to connect to web sever IIS Express

I am working on project, where I need to have an access to debugging option.
I've tried to run my application as usually, but this time I received following message:
Unable to connect to web server 'IIS Express'
When I checked the console output I found there following note:
Failed to register URL "http://localhost:49748/" for site xxx application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020)
Successfully registered URL "https://localhost:44333/" for site xxx application "/"
I found also that 0x80070020 error - "in the case of IIS Express (or IIS) means that the port that it is attempting to listen on is being used by another process" (link to the similar question).
I can't understand what's happen here. When I try to run this application I'm receiving this error in my Visual Studio, but the application is starting in the background (I can manually navigate to the https://localhost:44333 and app is there). The problem is that I can't debug the code, cause the Visual Studio looks like 'unrelated' to this instance. Previously IIS Express was opening new browser window with URL of the application, and I was able to debugging my code.
I also can't understand why this problem is not appearing for brand new project - I've created new web app project to test this behaviour, and it does what I expect - I can use debugging in VS.
What I've tried to do so far is:
Restart VS,
Restart my local machine,
Change app url in solution explorer/properties/debug,
Remove applicationhost.config from .vs directory
and nothing works for me.
Before this issue appear I forked this repo: https://github.com/jasontaylordev/CleanArchitecture
and downloaded WSL and Docker - I doubt that this have an impact on my solution, but maybe this information will be helpful.
Is there anything what I can change/edit to back to my previous behaviour?
Thanks
I had this issue after upgrading to Windows 10 20H2. There are many answers I found on SO that did not work for me, but I found this blog that helped me figure out the problem. Try running netsh interface ipv4 show excludedportrange protocol=tcp on the command liine and check to make sure that the port you are using is not one of the excluded ports listed. If so, change it to one that is not excluded. I did this and everything worked as normal again.

Sitecore Setup installation fails with error Failed to open XML file, system error:-2147024786

When running Sitecore Setup the following error pops up:
Failed to open XML file, system error:-2147024786
I've tried going through the eventviewer but to no avail.
Not unimportant is that I used the installer but forgot to change my rootdirectory. As a consequence I had to uninstall (using the same installer Sitecore).
Now however it "feels" as though there are some references or remnants left behind somewhere.
Who has a clue or can give me an idea of what is going on?
You are correct, this issue is because the previous Sitecore instance, with the same name, has not been removed completely. You will need to manually complete the following tasks to remove the remnants and be able to run the installer, it has worked for me in past;
Stop the App Pool for the uninstalled site in IIS
Stop the Web Application for the uninstalled site in IIS
Perform an iisreset in command line
Delete the App Pool and Web app in IIS
You should now be able to completely delete the folder containing the Website and Data folder completely
If you are still having trouble deleting it check the folder's Security Permissions, the Users and their Permissions and Read Only checkbox. Ensure you have control to delete
Delete the relating entry in the hosts file
If you also installed Databases access them via MSSQL Management Studio, take all relating databases Offline then delete them.
This will effectively remove all remanants of the previous site. If what ever reason the issue still persists, Sitecore's own Sitecore Instance Manager has a delete option which will completely uproot the site for you. Try installing with SIM then.

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.

Unable to write to subfolder in website

I have a webservice that I need to be able to write some logs for. The service is installed in c:\inetpub\wwwroot\myservice. The log files should be written to c:\inetpub\wwwroot\myservice\logging.
When I try running it in debug mode in Visual Studio, log files are created successfully. When I publish the site and try it, log files are not created.
I have tried giving write access for the logging folder to: NETWORK Service, IUSR, IIS_IUSRS, DefaultAppPool, ASP .NET 4.0 Classic but it made no difference. I also added Everyone with Full Control, but it made no difference.
Any ideas why I cannot get write access to this folder????
I have no idea what caused the issue, but IIS had somehow got corrupted. It would no longer display pages either by using localhost or 127.0.0.1.
Removed and re-installed IIS, all working now.

Publishing MVC3 app to IIS error - The Web server is configured to not list the contents of this directory

I published my website to "C:\inetpub\wwwroot\Sem_App" and created a website with physical path "C:\inetpub\wwwroot\Sem_App" and port 84. When I browse the website on http://localhost:84/ I get the following error.
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
I do not want to list contents of the directory anyways, I want to run the default page that used to run in debugging mode of VS 2010. Anybody know what's going on?
I tried running this command and restarted iis but it didn't work
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
go to cmd type this and you're good to go
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
windir is typically C:\Windows
You may need to enable directory browsing option in IIS. Check out the below link for ASP.NET MVC deployment to IIS 6. (For .Net 4.0)
http://www.codefrenzy.net/2011/10/19/deploying-asp-net-mvc-3-to-iis-6/

Resources