after update .net framework 4.5 to 4.5.2 in visual studio solution.. then my hosted web site/api stop working.
it is giving me below mention handler error.
After review lots of artical , i done lots of thing on IIS,
Like :
run->cmd
"c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i"
Remove Handler from web config file .
restart iis and etc . etc...
I got a solution , which help out me .I am sharing with you.
Just go to IIS Manager to edit those settings.
select Feature Delegation from the root of IIS:
Do sorting , then you will find some of having only, read permission.
make it read/write permission.
After update this .. try and run your application..
Thanks...
Related
All,
I am migrating a working .Net Framework Website from IIS 8.5 on a Microsoft Windows Server 2012 to IIS 10 on a Microsoft Windows Server 2019.
The new web site is showing the error
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
As far as I can see the website on the new server is configured the same as on the existing.
Neither have directory Browsing enabled nor a default file set as is recommended by most of the posts which exist discussing this error.
I have run the following which is also recommended.
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
The problem still exists.
I came across a post saying there might be an issue if paths referenced in the web.config are not correct but they look fine.
Has anyone got any insight into what else might cause this issue?
Are there any differences between IIS 8.5 and IIS 10 or between windows servers 2012 and 2019 which might cause this issue?
Thanks
This problem occurs because the website doesn't have the Directory Browsing feature enabled. Also, the default document isn't configured. To resolve this problem, use one of the following methods:
Method 1: Enable the Directory Browsing feature in IIS
To resolve this problem, follow these steps:
Start IIS Manager. To do it, select Start, select Run, type inetmgr.exe, and then select OK.
In IIS Manager, expand server name, expand Web sites, and then select the website that you want to change.
In the Features view, double-click Directory Browsing.
In the Actions pane, select Enable.
Method 2: Add a default document
To resolve this problem, follow these steps:
Start IIS Manager. To do it, select Start, select Run, type inetmgr.exe, and then select OK.
In IIS Manager, expand server name, expand Web sites, and then select the website that you want to change.
In the Features view, double-click Default Document.
In the Actions pane, select Enable.
In the File Name box, type the name of the default document, and then select OK.
More information you can refer to this link: HTTP Error 403.14 - Forbidden when you open an IIS webpage.
All those clowns glibly posting that "HTTP Error 403.14 - Forbidden: The Web server is configured to not list the contents of this directory" can be fixed by configuring the web site by either enabling the Directory Browsing feature or adding a default document are really not understanding what they are talking about. Anyone can copy a solution from one post and paste to another.
I'm not going to pretend I know what I am talking about but I have fixed my issue and will share what I did here to see in the hope it helps others.
I created a project (of the same type as the application I was trying to deploy) using my IDE (MSVS) in the same .Net version of the application I was trying to deploy. In this case it was creation of an MVC project in .Net Framework 4.5.
I did nothing to it. All I wanted was a skeleton.
I replaced all the files in the home directory of the web site I had an issue with, with the files of this skeleton project.
I attempted to browse to the web site and it worked successfully. Note the directory browsing was not enabled nor was a default directory set.
This proved to me that those settings were irrelevant.
Having googled around, some sites point to paths in config files causing an issue if they do not exist, eg a logging path to d:\logs where that directory was missing. It didn't fix my issue but there's no harm checking.
I stumbled across a post which talked about the roles and features enabled on the server. In Web Server (IIS)/Web Server/Application Development they had selected "Application Initialisation" and "ASP".
The Windows Sever 2012 server I was moving the application from, where it work without a hitch, did not have those selected so had not selected them on the Windows Server 2019 I was moving them to when I set that server up.
It made no sense that this would be the solution but having tried everything else I activated those two options.
Stone me if the issue was resolved.
As a check I removed those two options and the problem came back and when I reselected them it went away again.
This struck me as pretty conclusive only having thought I'd found the cause of the problem I built the website from scratch and the problem came back again.
It took a number of iterations but eventually I got there, more by luck than judgement and whatever the cause was it was due to an issue in the application which wasn't being logged in event viewer so focus on permissions to files being written to: not only that the app pool account is set up on the directories it needs access to but also that it has modify or even full control.
All those muppets robotically posting advice on configuring the web site by either enabling the Directory Browsing feature or adding a default document will no doubt copy this and paste it into their posts to claim the credit but c'est la vie.
I hope this post is of use to someone, apart from those muppets.
I'm attempting to set up IIS on my Windows 11 computer for testing with my web applications. I can browse to the local sites without issue:
http://localhost/
http://localhost/MobileServiceForms/
I setup my project to point to this site:
This is my local IIS server:
The application folder exists. I did click the Create Virtual Directory in the project and that didn't help.
When I attempt to debug, I'm getting this message:
I checked the permissions and added the Users and myself with full control over the site and MobileServiceForms folder:
I've tried disabling the firewall completely without any luck.
This is an Asp MVC application.
Anyone have any suggestions?
Found my answer in another post, hope it helps someone else:
https://stackoverflow.com/a/56344197/302613
In order to make sure this mapping appears you need to go to control
panel -> turn windows features on or off -> .NET Framework 4.7
Advanced Services (or equiv .net ver) -> WCF Services -> HTTP
Activation
I'm using Visual Studio 2013, Windows 8.1 and IIS 8.0.
In properties settings, I have set the server to Local IIS and I set the project url to localhost/myProject.
When I debug the project I get the following error shown below:
Unable to start debugging on the web server. The web server could not find the requested resource.
Click Help for more information.
OK Help
and when I start without debugging I get this error:
Error HTTP 403.14 - Forbidden
can somenone help me?
You need to give proper permissions to the directory containing your application. Give read, write, and modify permissions to IUSR and IIS_USERS. This should help to resolve your issue. Did your application work using IIS Express? If it didn't work using IIS Express then I'll need more specific information on the issue you're running into.
Over night an (internal, luckily) MVC web application has stopped working for me, without anything being changed as far as I know. The application itself absolutely hasn't been tinkered with in the last two days and the same goes for IIS.
The problem is that I get a directory listing of my www-folder instead of the applications default action (/Home/Index).
My www-folder contains the standard stuff:
bin
Content
Scripts
Views
Global.asax
Web.config
I have tried:
setting a "Specific Page" as Start Action but it doesn't solve the problem.
restarting the web page in IIS
enable/disabled "default content page" in IIS. Doesn't help, but IIS does pick up on a Default.html if I place it in the www-folder.
Now, this has happened once before. At the time I was on vacation and it was solved by restarting the entire World Wide Web Publishing Service. While it might work this time as well, I'd rather figure out the root of the problem before temporarily fixing it just to have it happen again further down the road. So while a WWW Publishing Service restart might get the site running again I'd rather understand why it happened in the first place before fixing it this way.
Finally, note that I'm running other MVC apps on the same IIS server and have never gotten this problem with them.
Open Command prompt
Go to C:\Windows\Microsoft.NET\Framework\<version> folder.
Run aspnet_regiis -i
That's all!
A little late.... But as I was receiving the same result.
My Application Pool was targeting the wrong .Net version (should be same as web app Target Framework). Simply adjusted within the "Set Application Pool Defaults" option, restarted and it was solved.
Hope it helps someone.
I had a similar problem.
The IIS root path had been changed by a collegue.
The solution was to fix the "Physical Path" in the "Advanced Settings" of the Default Web Site.
I don't think /Home/Index is possible to run om IIS 6.0 with out any configuration. ASP.NET MVC actually requires "Intergrated Mode", but could be run on classic with applying configuration.
That article by mister Haack, could be helpful: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
Saw this problem when I added a folder called "documents" at the root and also had a DOCUMENTS controller & view. I think it was confused if I wanted the route \documents which is in the CONTROLLER folder or the \documents folder below the root. One solution was to add an id to the route which makes it use the controller version of documents
Url.Action("Index", "Documents", *New With {.id = 1}*)
Can also change the name of the newly added folder below the root to DOCS.
Changing the .NET CLR version of the application pool might help.
Right click on the application pool in which your application is running and select Advanced Settings...
Change the .NET CLR VERSION to the version of your application(same as that in the config files)
Click ok
I had the same problem and here is how I resolved it.
I had a problem with the Global.asax file on the TFS server inheriting from the WebAPI project (and not the web project) although the web project was chosen as the startup project in Visual Studio. When I ran my build the Web API was set as the start up project on the web server since it was deploying the version on the TFS server that was inheriting from the WebAPI project. To resolve this I set another project as the startup project and then changed the web project to be the startup project again in Visual studio. I had to do this since TFS complained that there were no pending changes when I tried to check the version I had on my machine into TFS. I then checked my code in and ran the build again. This resolved my issue.
I'm having this error trying to debug my ASP.NET MVC app. I've set the app to "Use Local IIS Web server", and selected ASP.NET as the debugger. Running the site without debugging works just fine, but when I try to debug, I got this error:
Unable to start debugging on the web server. The web server could not find the requested source.
I'm using Visual Web Developer 2008 Express Edition.
Does anyone know how to fix this error? Thank you.
For those encountering this with Visual-Studio 2012 and/or Windows 8 do the following.
You have to add .Net 3.5 (or 4.5) to your Turn Windows Features on or off window. You get to it via :
Control Panel -> Programs -> Turn Windows Features on or off
Click the Asp.Net 3.5 and the Asp.Net 4.5 check box in the IIS > WWW Service > Application Development Features folder.
Go to your web project's properties, then the "web" tab, then make sure that you're using the Visual Studio Development Server and not Local IIS or the custom webserver. I'm on VS2010 with Win7 and another developer was developing using a custom webserver URL and not the VS Dev Server
Sounds like you are trying to develop on IIS and not iis express or development server. If you are using asp.net mvc 4, make sure that the Application Pool is framework 4. If not just make sure that your app pool it matches your asp.net mvc version.
I had the same problem, and i fixed this way:
Go to IIS Manager -> Go to the site -> Error Pages -> Actions: edit feature settings.. -> Make sure you checked "detailed errors for local requests and custom error pages for remote requests".
IF you are using IIS6 and did the add mapping for .* in IIS trick to get MVC working, when you added the .* handler to iisapi.dll you forgot to uncheck the "check the file exists" check box.
Also, be sure that the URL you're configuring in Visual Studio matches your Host Headers (Edit Bindings) in IIS. This tripped me up for about an hour this morning before I realized my very stupid error.
Having maxRequestLength or maxAllowedContentLength set to a ridiculously large or small value will also trigger this error.
What i did, was just type the IP address in the web tab instead of "localhost"
This happened to me today. Turned out to be that the default website was stopped in iis. I had been working on a second website that didn't use it for a long time. Simple fix but took me a while to see it!
The root cause for this error can often be that the Windows Service W3SVC is not started. Check that this service in Windows Services console (services.msc) is started. In IIS you will now see the the Start icon is greyed out. This means that the W3SVC service is running.