I have created and Angular / ASP.NET application that work perfectly in VS using IIS Express. When I deploy it to IIS 8 on Server 2012R2 it does not work.
The Dot Net Framework 4.5 and ASP.NET 4.5 frameworks are installed per the many tutorials that I have found.
The setting: "runAllManagedModulesForAllRequests" is set true.
My default page 'index.html' is a single page Angular application that does load and execute correctly when I access the application url. The IIS server is serving up all of the requests without a problem. Except for routed Web Api requests. They all return 404.
I also put in some functionality for write to a file in the Application_Start method of Global.asax. The file is NOT being written. This tells me that ASP.NET code is not running at all.
I cannot find anything relevant in the Event viewer. The IIS log simply is telling me about the 404 error. Same as I am seeing in the network tab of developer tools.
I have searched the net generally, and stackoverflow specifically with no success.
What might I be missing? How do I go about troubleshooting this?
Thanks
Related
A legacy .Net webform application is hosted in IIS is running fine in old server having .Net framework 2.0 in it. I don't have source code of the application. I have just existing published DLL which i have copied from old server to a new server having .Net 4.7 framework by default and hosted it in new server's IIS.
While browsing the application, it is showing an default configured Error.aspx page which developers may have configured. So, in case of any error the application will navigate to Error.aspx page.
I am not able to figure out the actual .net error.
How can i get the actual error or is there any way to debug that ?
You can find errors in iis log (default path is %SystemDrive%\inetpub\logs\LogFiles).
Also you can enable detailed error message in browser. Link
I am trying to host an ASP.NET Web API 2 project on IIS 10, and I keep getting a page saying Service Endpoint not found.
The project I am using for testing is the sample ProductsApp project here Getting Started with ASP.NET Web API 2. If I run the project in debug, then the page shows up as expected while it is being hosted through VS2012 IIS express at localhost:54170
I am then publishing that project to file using VS2012.
After publishing to file, then I made a new site on IIS 10 at localhost:8080 and point the physical path to the folder that I published the ProductsApp project to.
At this point if I go to browse the site it comes up with a page that all it says is Service Endpoint not found.
I've changed my DefaultAppPool Identity to LocalSystem, so I don't think it's a permissions issue.
How do I get the site to show up like it does when I'm debugging from VS2012, but from IIS 10?
I wasted so much time yesterday trying to figure this out, but this morning with a little fiddling I found my answer which I'm surprised I wasn't able to find anywhere else I looked.
To fix my problem this is all I had to do.
Instead of hosting the ASP.NET content as its own site I just needed to add an application to my default web site with the physical path pointing to the folder that was published from VS2012.
This is obviously my first time using ASP.NET, so I didn't have any of the ASP.NET features installed in IIS. I went to Turn Windows features on or off -> Internet Information Services -> World Wide Web Services -> Application Development Features, then selected all of the ASP folders (ASP, ASP.NET 3.5, ASP.NET 4.6). Edit: Looking back at this, all that was required was turning on the feature ASP.NET 4.6. At the time I didn't know what I was looking for, so I tried to nuke the problem by installing everything with "ASP" in the name.
The DefaultAppPool Identity didn't need to change to LocalSystem, so I changed it back to ApplicationPoolIdentity.
Now I have the ASP.NET site up and running on my localhost.
I am using Visual studio web developer 4.0, in which I am creating a locally ISS hosted website.
My problem is while I am opening the website from visual studio I am getting errors such as:
ASP.NET 4.0 has not been registered on the webserver. You need to manually configure your web server for asp.net 4.0 in order for your site to run correctly...
When I am trying to serve a debug website I am getting the error:
Unable to start debugging on the server. Could not start asp.net debugging. More information my available by starting the project without debugging.
Then I navigated to my startup page without debugging and then the error in browser is
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
I have tried registering asp.net with aspnet_regiis -1. I'm using windows 8.
You have two options:
Manually configure web server for asp.net 4.0
Reinstall .NET framework
Number two is recommended.
I am currently trying to migrate some websites from IIS6 to IIS7 and have run into a problem.
For the most part, my websites are written in Classic ASP. However, within one website I have two web applications running asp.net. Something like this
www.mywebsite1.com - Classic ASP
www.mywebsite2.com - Classic ASP
www.mywebsite2.com/MyAspDotNetApplication1 - ASP.NET 4.0
www.mywebsite2.com/SubDirectory/MyAspDotNetApplication2 - ASP.NET 4.0
www.mywebsite3.com - Classic ASP
...
When I browse the sites hosting Classic ASP pages I have no problems. If I access one of the ASP.NET web application everything is ok. If I then access the second ASP.NET web application things start going wrong I get errors on the ASP.NET application pages along the lines of
Failed to start monitoring changes to '\FileServer1\web\mywebsite2\MyAspDotNetApplication1\App_Browsers' because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.`
When I try to access the Classic ASP web pages I get the following error
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Config Error
Config File
Requested URL http://www.mywebsite2.com:80/myvirtualdirectory1/
Physical Path \\FileServer1\web\mywebsite2\myvirtualdirectory1\
Logon Method Not yet determined
Logon User Not yet determined
When I open up IIS manager and take a look at one of the sites or virtual directories where the error is occurring I get the following error
Filename: \\?\FileServer1\mywebsite2\web.config
Error: Cannot read configuration file
The problems I am having is similar to this other question but I have removed all Web.config files from all my sites (excluding the ASP.NET applications) and I still get the error.
This worked fine on IIS6.
Any ideas?
Setup
Hardware
Two web servers (Web1 and Web2) running Windows Server 2008
One file server (FileServer1) running Windows 2003 (don't know if that makes a difference)
IIS
10 Classic ASP websites running in their own application pools. These websites all have lots of virtual directories pointing to locations on the file server
20 websites that simply redirect to one of the 10 websites above
2 ASP.NET applications that sit inside of one of the Classic ASP sites
The Classic ASP sites each have their own Application Pool which runs under a custom user account MYDOMAIN\MyIISUser
The ASP.NET applications also have their own Application Pools and are configured to run under the custom user account MYDOMAIN\MyIISUser
The 20 redirection websites run under a single Application Pool.
The websites are set up to use shared configuration. The configuration files are stored locally on each web server and are synchronized using DFS (I tried putting it on the FileServer1 but ran into the same problem as above, moving it to the web servers local file system solved the issue - This may be important?).
File Server
All web content is stored on the file server under C:\Web. This is set up as a UNC drive accessible from the network via the address \\FileServer1\Web
I have set the permissions on C:\Web to allow Read access for the MYDOMAIN\MyIISUser
I have been told that the web content must be stored on the network drive rather than have local copies and using DFS
It sounds like your ISAPI modules are not configured correctly on your classic ASP sites.
All .NET ISAPI filters should be disabled/disallowed and the classic ASP filter should be enabled.
It turns out that there is something wrong with the the fileserver. What the problem is I don't know. After creating a new clustered Windows Server 2008 fileserver I have not been able to replicate the problem.
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
This is my error... And I do NOT have IIS 7.0 installed locally. This is a remote host, which I pay for.
I found out how to fix this, but requires me to enter the IIS manager, which i can't.
Is there any way in Web.config I can tell the browser it should load up the default view or at least use the Routing table with the default route?
EDIT: Am I misunderstanding how to deploy an MVC2 project? It's not just copy the files or?
When I see this error on new servers at work it's usually because iis wasn't installed before .net was. You have to run the aspnet_regiis.exe -r on the server to register .net with iis...
I know this isn't what you want to hear but you should probably contact support of the hosting company and see if they can verify or not.
What version IIS are they running? What is your worker process setup to run? If its in classic mode, then you need a mapping from .mvc (or wildcard .) to aspnet_isapi. If its in integrated pipeline mode things should be a bit better. How did you deploy your MVC binaries? Put a test.aspx page in your app in the root folder - can you get to that?
So -
1. make sure your site works with an aspx file in it at the root
2. see what version iis your hoster is on and if they have setup anything for MVC if on iis6. If its IIS 7 ensure you are in integrated pipeline mode and not classic.