Error: unable to reflect System.web.configuration.machinekeySection with local iis - asp.net

I am running an ASP.net 3.5 web application with visual studio 2017. Everything working fine when I am running using IIS express but with classic pipeline. But I changed the settings (project properties – >Web – >Servers – > local iis; Created virtual directory as well) to run using local iis it is giving me the error "unable to reflect System.web.configuration.machinekeySection".
I am using IIS 7.5 and Windows 7
I tried creating the machine key (both validation and decryption key) in iis but the issue persists.
Does anyone have any idea?
Attaching the error description image here

Related

Visual Studio 2017 throws error on debugging an ASP.NET MVC application

I am setting up my new workstation (Windows 10 Pro) with my ASP.NET projects with Visual Studio 2017. I have enabled local IIS and the project throws a timeout error while trying to debug the project.
It is not failing 100% of the time though, mostly fails but when it runs it is taking longer than expected to give the startup page. The error thrown is
Unable to start debugging on the web server. The operation has timed out
I did notice that the IIS worker process (w3wp.exe) was only executed in the completed console output. So it looks like the IIS worker process is not always being executed.
Any help would be appreciated!
Thank you!
The project runs successfully on an old workstation (Windows 10 Edu) with Visual Studio 2017. App pool settings has been compared between both and it seems same. IIS reset is tried as well. Visual studio has been repaired and IIS local has been restarted as well (unchecking and enabling followed by restarting the machine). Default app pool is used and its been recycled as well. Nothing worked!
Possibly the Visual Studio project version does not match the ASP.NET configured application pool. Update the ASP.NET version in the application pool and restart it.
Make sure you have the correct version of ASP.NET installed on IIS. A version mismatch between ASP.NET in IIS and the Visual Studio project can cause this issue. May need to set the framework version in web.config. To install ASP.NET on IIS, use the Web Platform Installer (WebPI).
If the issue is not related to IIS configuration, try the following steps:
Restart Visual Studio with administrator privileges and try again.
For example, using the Web to deploy some ASP.NET debugging scenarios that require elevated Visual Studio privileges.
If you are running multiple instances of Visual Studio, reopen your project in one instance of Visual Studio (with administrator privileges) and try again.
If using a HOSTS file with a local address, try using the loopback address instead of the computer's IP address.
If not using a local address, make sure the HOSTS file contains the same project URL as in the project properties, Properties > Web > Server or Properties > Debug, depending on the project type.
Reference link:
Visual Studio "Unable to start debugging on the web server. The web server did not respond in a timely manner.".

How to run ASP.NET MVC app in IIS 10 on Windows 10

I installed IIS 10 through windows features and published MVC app into the IIS folder, then executed "dism /online /enable-feature /featurename:IIS-ASPNET45" command but still getting error:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory
I've done this in windows 7 with "aspnet_regiis -I" command instead of "dism /online /enable-feature /featurename:IIS-ASPNET45" and web app loaded just fine from localhost, but I can't seem to get this to work on Windows 10.
I had the same problem and I solved it by using the Win10 GUI for selecting installed features. Internet Information Services -> World Wide Web Service -> Application Development Features->ASP.NET 4.6 was not checked. Checked that along with a few others I needed and all was good.
I had similar problem - in my case IIS just have not full rights to access folder where I put website files...
Giving full access to directory via Windows Properties/Security resolved problem in my case.
Try put your website files to C:\inetpub - form my experience it's the best location (but should make no difference).
Other things:
- check if IIs have rights to C:\inetpub & ..\Documents\IISExpress
- check if you have installed right version od .NET and ASP.NET
I see that you try install ASP.NET 4.5, but what targeting your project?
If you trying deploy new project you probably need APS.NET 4.6 or ASP.NET 5 RC (in second case you need also setup DNX).

single file hosted in different .NET Framework in IIS then whole application

I have just converted an ASP.NET web application from .NET 3.5 (ASP.NET version 2.0.50727) to .NET4 and at ‘localhost’ development environment everything works fine but after installing the app from a setup (on a test machine running IIS6) one file remains hosted in IIS as in .NET2, thus crashing (with the error: ‘assembly built by a runtime newer than the currently loaded’) and the setting is fixed (I cannot change it from IIS).
All other files in the solution in IIS are automatically hosted in .NET4.
Any idea?

Unable to start debugger on Older version of Visual Studio (2003) Under Windows 7

For this project I needed to install and run VS 2003 on Windows 7 using IIS 6.0 with Framework 1.1 on my sever because there was old VS2003 C# code on a remote server that needed updating and did not have VS 2003 installed only the DLL, PDB, aspx, and aspx.cs files. After porting the code over and making the needed changes on my local server, I discovered that while I could browse the page, I could not run the page with debugger and got this error: "... Unable to start debugging on the web server. There is no managed code running in the process. In order to attach to a process with the .NET debugger, managed code must be running in the process before attaching." I then started the application without Debugger and selected the w3wp.exe process for CLR in order to attach the process but I noticed that the process session was set to 0 and I still got that error again.
The following is done in IIS6 :
Application created.
DefaultAppPool (.NET framework 1.1 Integrated)(ApplicationPoolIdentity) is used
Browsing the web page works OK.
Authentication has Integrated Windows and ASP.NET Impersonation enabled.
I have runned aspnet_regiis from all the .net version in order
Set debug="true" in the web.config.
Thanks much for your help
Resolution:
Right click the ASP.Net project > Properties
select Configuration Properties > Debugging
Enable the below mentioned entries in 'Debuggers' frame.
ASP.Net Debugging
Unmanaged code debugging.
I had the same problem.
I fixed it.
Delete the virtual directory in IIS
Create the new virtual directory with different name other than the old one and configure the new virtual directory name in your visual studio solution.

Debug .NET app with IIS7 and Delphi.NET - Use aspnet_regiis.exe to configure the local IIS web server

I have been trying to set up local debugging for my ASP.NET app in Delphi and am getting the error above. I have used the aspnet_regiis.exe tool with the following:
Aspnet_regiis.exe -s W3SVC/1/ROOT/DevTest
but this hasn't helped. It added it to IIS as an application but I am still getting the error:
The project cannot be debugged because virtual directory "DevTes" is not configured with ASP.NET version 2.0 or 3.0 Use aspnet_regiis.exe to configure the local IIS web server.
I am not really sure where to go from here so need some help please:
Machine specs: Windows 7 64bit, IIS7, Using RAD Studio 2007.
EDIT: For more info, I have been able to start the website in Firefox and have been able to attach to process now, although the debugging is lacking a little, i.e I can't see values of sessions ect ...
Try using the Web Platform Installer to configure IIS for ASP.NET development. http://www.microsoft.com/web/Downloads/platform.aspx

Resources