The resource cannot be found in IIS server 2012 - asp.net

I am trying to move a web site, with several web applications over to a new server running server 2012. The application was written in .net 3.5. I have been struggling through some issues but am now stuck on The resource cannot be found
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: Any web app I tried URLs
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1087.0
I have tried running the app pool as .net 2.0. Enabled 32-bit applications. Set the security of the entire inetpub folder to allow all users full permission, still I am stuck. I also tried setting the application pool back to the default user. I get a 500 error then. The user I am running the app pool under is in the IIS_* group. The application pool is setup identical to that of the old server. The file does exist at the url I am trying and it is named correctly as I have tried it on several different applications within the site. It appears this is .net to blame more than IIS. Due to enterprise security I can't get remote debugging enabled on the server. Is there any logging that I can check to see why the page won't load?

Related

Is there any way to see actual application error in a website hosted in IIS?

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

deploying asp.net core 2.1 web application on window hosting receiving 403

I have deployed my newly created web app developed in Asp.net core 2.1 on a windows based shared plesk hosting.
When i tried to browse the site, it give me this error
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
I have searched it on google but all the help is coming for .net framework not for the .net core framework. Existing solution has suggested me to put this code in web config
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
but in .net core 2.1 there is no web.config in the project..
Bottom line issue is still there, don't know what to do.
First of all ensure that the your shared hosting provider support .NET Core hosting as it requires .NETCore Hosting Bundle installed and .NET CLR Version set to No Managed Code
Next publish your ASP.NET Core web app which will generate web.config file and then upload the published files on the server.
You may need to look at hosting's website or get in contact with them to determine whether they support .NET Core, at what runtime version and what needs to be done to have it set up for a website. They may need to do it manually and you may need to downgrade to their version.
The simplest way to handle this with shared hostings is to publish fresh template that works locally, copy it over to hosting (or use Web Deploy to do this directly from Visual Studio) and if it errors, write a ticket that your .NET Core site isn't working and it's up to them to install and set up everything that is necessary.
If they can't get it working, then you won't be able to either. Nothing else you can do, but to change hosting provider.
Literally just stumbled on this question after finding a resolution to the exact same problem.
My scenario is:
I was trying to move hosting providers - website already live, running from old host's webspace.
New host was a shared windows-based web hosting provider, running Plesk.
I was therefore trying to publish my .Net Core 2.0 project to my new host.
...and I kept getting a "403 - Forbidden Access" error.
Here's what I found, which I think might have been part of the problem that the OP faced.
Even though I had published the website to the remote server correctly, the 403 error kept coming until the new host's technical support pointed me to one of their knowledgebase posts, which exactly described my scenario and the issues I had, along with how to overcome them.
Essentially, I didn't have my domain name's DNS settings configured yet (as it was still in use, pointing to my previous hosting provider's webspace) and as such, the DNS are getting 'confused'.
The short-term workaround was to add a temporary entry to my hosts file on my PC, which directed the traffic for my website to the IP address of the NEW web hosting provider. (Once full go-live, these are deleted).
Something like this:
123.123.123.123 mywebsite.com
This allowed me (on my PC) to bypass the DNS settings on my domain name, and to reference the web content on the new web host's webspace, to continue setting-up and configuring the website, prior to full migration
Here's the link to their knowledgebase article, which I'd have never of thought of, until they mentioned it. (And then it made perfect sense!!)

Web Service error - Status 404 not found

I have created a web service in Visual Studio 2015 (web api) that listens out for requests via a barcode scanner. The barcode scanner links to a database that provides information such as stock quantities etc, but this is just for background information. The web service is currently installed on my local machine and works perfectly, returning the correct values and posts data to a database.
I attempted to install the web service onto a server, copying over similar settings in IIS (only have basic knowledge using this), such as the bindings and ensuring the permissions were set up correctly. However when running the web service I recieved a "404 not found error and 401 unauthorized". After that, I installed Visual Studio 2015 onto the server to ensure it wasn't a build or publish error...same problem.
Below are some of the 'fixes' I have tried to help narrow down the potential problem.
Ensured the correct version of .Net, 4.0, is installed on the server.
IIS Manager - Authentication: Annoymous Authentication set to enabled.
IIS Manager - Directly browsing: set to enabled.
Set the correct permissions using 'Edit Permissions', granted full control to 'Everyone'
This is my first time creating a web service so up until now I have been using tutorials and making it up as I go along. I think it could be to do with the application pools set up? But because the solution works on my local machine and not the server has me extremely confused. Thanks in advance.

HTTP verb used to access this page is not allowed Web Api IIS 7

I should preface this by stating that my experience with IIS is very limited. I am trying to deploy a Web API service on IIS 7.5 on an Azure server running Windows Server 2008 R2 Datacenter. Whenever I post to the service using Postman I get an "HTTP verb used to access this page is not allowed" error. Looking at the response headers through fiddler I see the following line under the Miscellaneous category: "Allow: GET, HEAD, OPTIONS, TRACE".
I deployed this application using a WebDeploy package and configured it so it would be a virtual directory under the Default Web Site. My current IIS configuration is as follows:
Some of the things I've tried include:
Verifying that WebDAV is not installed
Edited the following Handler mappings for the Default Web Site and the Sync project to allow all verbs: ExtensionlessUrlHandler-Integrated-4.0, ExtensionlessUrlHandler-ISAPI-4.0_32bit, ExtensionlessUrlHandler-ISAPI-4.0_64bit, and ISAPI-dll
The default Web Site and the Sync app are both running under the DefaultAppPool which is set to .NET Framework 4.0.
The Sync App is targeting .NET framework 4.5
I've looked at Request Filtering for the Default Web Site and the Sync app and made sure that the POST verb is allowed under the HTTP Verbs section.
I am at a loss as to what to look at next so any hints are greatly appreciated.
After working with a colleague, we managed to get the web api service running to an extent. It currently shows an error message but it's one that we created which means the code is actually being hit. We had to give database permissions to the IIS_APPPOOL\DefaultAppPool user and re-register .net 4 with iis via the aspnet_regiis command.

Errors when running ASP Classic alongside ASP.NET in IIS 7.5

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.

Resources