Am running the web allication using asp.net.am getting this error - asp.net

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: /webctrl_client/1_0/treeimages/Rminus.gif

I had this problem for a simple reason. Make sure you compile your site before deploying it. I had some pages that were compiled and some pages that were not compiled. And because I was testing on a Windows Server 2008 box, not a Windows 7 box.
It took me so long to figure out because when I tried viewing these pages on the application server (Windows Server 2008), it wouldn't let me view a non secure page (http protocol), because of Internet Explorer's security settings. I only had a binding for port 80 when testing on a browser on the server box. So I couldn't even see the aspx page that was compiled, let alone the aspx pages that were not compiled. A plain HTML page was visible on both boxes however, on the same site--that part was interesting. So that told me IIS was running fine. When I viewed the pages on another machine (running Windows 7) on that network, the compiled aspx page showed up fine because it was compiled. And the non-compiled pages did not.
Here are other possible issues:
(use correct version of .NET framework for commands below)
1.) Have you installed the .NET framework?
2.) Make sure ASP.NET 4.0 is registered. Run these commands to verify.
"%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe" -lv
"%systemroot%\system32\inetsrv\appcmd.exe" list apppool /managedRuntimeVersion:v4.0
"%systemroot%\system32\inetsrv\appcmd.exe" list config -section:system.webServer/isapiFilters
If not, run this:
"%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis" -i -enable
3.) Make sure the ISAPI filters are turned on for the version you are using. Click server (not the site) in IIS 7. Then go to "Isapi Filters". Allow the ones you need.
4.) Make sure your application pool is running in the version of your compiled source code of your ASP.NET pages. Go to Application Pools in IIS, then right click the application pool for your site, and choose Advanced. Change the version to either 2.0 or 4.0. Make sure it's also 32 bit if you compiled your app as 32 bit.
... when reading forums those are the 4 solutions I came across most frequently. Mine was a bit simple, but confused me for hours because I hadn't installed the SSL certificate yet.

Related

IIS7 MVC Routing Not Working

Our company ships an MVC based product (targeting v4.5) which has stopped working on a customer site for what appear to be environmental issues - a build which worked with no problems once upon a time now gives a 403.14 - The Web server is configured to not list the contents of this directory.
.
What I think is happening...
The user accesses http://server/AppName
Because it's an MVC app, the default route (Reports/Index) should be used.
Instead IIS is looking for a default document...
... and, not finding one, it assumes the user wants to list the contents of the directory...
...which is not enabled so it throws a 403.14.
.
What I've tried so far...
Accessing the route directly.. results in 404 error. So I'm pretty
sure IIS doesn't realise it should use routing.
Use aspnet_regiis to register ASP.Net with IIS. This was done from the Framework64 folder since...
OS is 64 bit - Windows Server 2008 (Standard without Hyper-V)
IIS is 64 bit - though Enable 32-Bit Applications is true
Checked AppPool is targeting v4 of the framework - it is.
Changed AppPool mode to Classic - was pretty sure it should be integrated but was worth ruling it out. It is now back to Integrated
Confirmed RunAllManagedModulesForAllRequests is set to true in the web.config.
Checked permission conditions defined in <system.webServer> section of web.config are met - they are.
Created the simplest of MVC applications and deployed it - same problem.
Running the command shell as Administrator unregistered ASP.Net using aspnet_regiis -ua and re-registered using aspnet_regiis -enable -i. We hit a couple of permission problems - and the Temporary ASP.NET Files directory was missing but once they were address we were back to the same error.
Added a simple default.htm - when present, this is served in response to the http://server/AppName request.
I'm clean out of ideas and all google hits suggest some combination of the above - or enabling directory browsing (which I think is just a symptom rather than the root cause).
Also, not sure if it's relevant but the amount of configurable elements available for the application in IIS seems a bit below what I would have expected...
Have you Checked the user the application pool process is running under? I think Your site needs to run with permissions to execute the .net libraries and I've seen this just change for seemingly no reason (probably related to an overzealous update to the system).
You can try with the Enabling directory browsing .
assuming you are under Windows Server 2012 or Windows Server 2012 R2
On the taskbar, click Server Manager.
In Server Manager, click the Manage menu, and then click Add Roles
and Features.
In the Add Roles and Features wizard, click Next. Select the
installation type and click Next. Select the destination server and
click Next.
On the Server Roles page, expand Web Server (IIS), expand Web
Server, expand Common HTTP Features, and then select Directory
Browsing. Click Next.
On the Select features page, click Next. On the Confirm installation
selections page, click Install. On the Results page, click Close.
if you using the Windows PC try this in your command prompt as follows:
go to C:\Program Files\IIS Express
then press Enter:appcmd set config
/section:system.webServer/directoryBrowse /enabled
Maybe this is your case https://forums.iis.net/t/1157304.aspx
SQL Server Reporting Services creates a folder called Reports by
default if you install it on IIS. If you install SQL 2008 then
Reporting Services doesn't need to use IIS and instead will try to
reserve the URL with the HTTP.Sys service.
I believe this is the cause of the conflict you are seeing. What you
could try is changing the URL that Reporting Services uses via the SQL
Server Configuration Wizard.
Also I found that
Report Manager of SQL Server can use reports path http://<server name>/reports
Configure a Native Mode Report Server for Local Administration (SSRS)
I think the problem is IIS features that are not installed yet. I have met this kind of problem frequently in Windows Pro. Make sure to turn on every feature under Internet Information Service -> World Wide Services because by default IIS is configured to use WebForms. So there might be some features that not installed yet to use MVC, especially ISAPI filters. In my case, that was the solution. I hope it helps.
Something similar i encountered using VS 2017 & ASP.NET MVC.
Was working on the project for long with no problems at all but suddenly the routing started misbehaving & stopped working.
So I changed the Port in Project Properties Page & it started working.
I really don't know what is the relation between a port & MVC routing modules. Someone else can enlighten if at all this helps.
I had the same problem and I just created an application pool out of the Default Web Site in IIS and stoped the default web site. With that difference you will not have the application pool's path
I know it's been a long time since this question but i've had the same problema recently. I've tried every single configuration, just like #amcdermott did, but the only action that solve the problem was reinstalling .NET Framework.
My app was built under .NET Framework 4.5.2. The application server had the version 4.6.1 and 4.5.2 installed. So, i uninstalled all framework versions and installed the one that i needed.
Please, make sure that no other applications use superior versions of .NET Framework if you going to try this solution.
Here are some quote I find on Microsoft official site which I think may help:
For site administrators
This problem occurs because the Web site does not have the Directory Browsing feature enabled, and the default document is not configured. To resolve this problem, use one of the following methods:
Method 1: Enable the Directory Browsing feature in IIS (Recommended)
To resolve this problem, follow these steps:
Start IIS Manager. To do this, click Start, click Run, type inetmgr.exe, and then click OK.
In IIS Manager, expand server name, expand Web sites, and then click the website that you want to modify.
In the Features view, double-click Directory Browsing.
In the Actions pane, click Enable.
Method 2: Add a default document
To resolve this problem, follow these steps:
Start IIS Manager. To do this, click Start, click Run, type inetmgr.exe, and then click OK.
In IIS Manager, expand server name, expand Web sites, and then click the website that you want to modify.
In the Features view, double-click Default Document.
In the Actions pane, click Enable.
In the File Name box, type the name of the default document, and then click OK.
Method 3: Enable the Directory Browsing feature in IIS Express
Note This method is for the web developers who experience the issue when they use IIS Express.
To do this, follow these steps:
Open a command prompt, and then go to the IIS Express folder on your computer. For example, go to the following folder in a command prompt:
C:\Program Files\IIS Express
Type the following command, and then press Enter:
appcmd set config /section:directoryBrowse /enabled:true

Windows Server 2003 IIS Renders ASP.NET 4.0 pages as blank

I have a web project which works fine on my local development machine.
I copied the project to our UAT server, setup a virtual directory pointing to the project and configured it to run on .NET Framework 4.0. I even added the Default.aspx page to the Documents tab. I configured Directory Security to use Windows Authentication.
When i try to access any web page within this application, IIS responds with a blank page. I looked through the event logs and don't see any errors anywhere.
Can someone please help me understand what's going on and how to remedy this?
Thanks in advance!
If you're just seeing a white page with no errors in the event log, it sounds like it could be a problem with the application rather than the hosting environment.
However, there are a few things you could try to doing to troubleshoot this.
Check folder permissions. Try allowing "Everyone" access on your webroot folder and see if that makes any difference.
Confirm that the IIS path is set up correctly but putting a text file in your webroot folder, and then browsing to it and verifying that it's contents are displayed.
Create a basic test.aspx page without any script, just a "Hello World" bit of text, and try browsing to it. Confirm that it displays the correct content.
Edit web.config and turn off custom errors
Try re-registering the ASP.NET extensions with IIS using aspnet_iis (details here)
Hopefully, one of these tests will be able to give you some kind of detailed error message or more insight into the cause of the problem.
For IIS 6.0 on Windows Server 2003, after the install of .NET Framework 4.0, the process of creating Web Sites or Virtual Directories that run under .NET Framework 4.0 is as follows:
Create a new application pool.
Applications running under different
frameworks can't be hosted in the
same application pool, i.e. create
an application pool perf framework.
Next, if you are creating a local
intranet site or virtual directory,
ensure that you don't have "dots" in
the application name. Browsers
confuse the dots to be external web
sites, forcing them to run under
internet zone as appose to the
intranet zone.
Once you create your web site or
virtual directory, make sure that it
runs under an application pool
dedicated for .NET 4.0 applications.
Ensure that when creating your
website or virtual directory, you
click on the ASP.NET tab and select
version 4.0 from the drop down.
Then you may configure as per
normal, with any other additional
settings you may require.
Hope this helps someone experiencing similar issues. Took a while to figure out.

page is not served because it has been explicitly forbidden - extension .asp may be incorrect

I'm trying to run a test version of a web using the File System (i.e. the "Cassini" web server built-in to Visual Studio 2005) rather than (IIS 5.1 on my Win XP dev PC). This web is a hodge-podge of classic ASP files written years ago and some new development in ASP.NET (VB.NET).
How can I get past this error message as it tries to go to /TestWeb/default.asp? -
Server Error in '/TestWeb' Application.
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /TestWeb/default.asp
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Things I have checked and previously encountered trying to get this mess working:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config
(has nothing for *.asp nor
HttpForbiddenHandler so nothing to
comment out).
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
(has nothing for *.asp)
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config
(had a HTTPForbiddenHandler for
*.asp but I commented it out as per other postings advice; seemed to
have no effect for me though).
To get past an earlier error
("Request for the permission of type
'System.Web.AspNetHostingPermission'
failed"), I had to go to
"Administrative Tools > MS .Net
Framework 2.0 Configuration > My
Computer> Runtime Security Policy >
change Local Intranet to Full Trust.
To get past an earlier error ("the
network bios command limit has been
reached") I had to "enable a hot
fix" by adding the following DWORD
value at the following registry key:
HKLM\Software\Microsoft\ASP.NET\FCNMode
and set the value to 1 (per MS KB
Article 911272).
This whole web has been placed on a file server in our LAN and from my desktop VStudio2005 views it via the mapped drive letter (e.g. V:\SVNwork\myFolder\TestWeb)
Visual Studio 2005 models this as a "web site" (not a "web application project").
The remainder of this post describes some background about why I am trying this:
We tend to recreate the web site on our dev PC's which run IIS 5.1 on Win XP. Movement of new stuff into production can be awkward using WinDiff and copying files as needed.
I'm trying to implement source control over this work. I've had a heck of a time trying to configure Visual SourceSafe 2005 and local IIS to work together smoothly (interestingly, I had pretty good luck putting "web application projects" under VSS2005 so I think it's related to the awkwardness of the ASP.NET 2.0 "site" model and VSS).
Anyway, I've moved a development version of this classic ASP and ASP.NET to a common file server in our LAN. Before placing this under Subversion control as a working copy of it's equivalent imported into a repository, I just want to make sure it can work with the Cassini web server. That's where I am stuck. The ultimate goal is have this under SVN and view differences with TortoiseSVN.
Thanks for reading this far...hopefully someone can get me past this error and then I can move forward with the SVN and TortoiseSVN work.
Cassini doesn't, as far as I can tell, support classic ASP. An alternative would be to run a local install of Apache (since you can't/won't use IIS) which will host ASP, but is probably asking for trouble.
See also: http://blogs.msdn.com/mikhailarkhipov/archive/2005/06/24/432308.aspx
You could also run local IIS, which will, of course, host both ASP.NET and classic ASP. Visual Studio can easily be configured to debug with a local IIS install.
Points for moving to subversion: we use the Microsoft stack (Visual Studio, ASP.NET, SQL Server) with subversion and it works very well.
Subversion comment
GRRR.. bosses are fun. The svn model is known as copy/modify/merge. The repository lives in a central location - probably your file server. Using the svn client - or a Visual Studio plugin like the excellent AnkhSVN - each developer gets a LOCAL working copy,makes their changes and performs a "commit" when they're done working on a file.
SVN takes care of making sure that developers don't overwrite each others changes, provides a facility for merging changes when someone has modified a file between when you got your last copy and when you commit your changes, etc.
The whole point of a working copy is that it isolates developers from each other. The merge/commit step takes care of intergrating everyones changes. Having a central working copy that everyone works from defeats the purpose.
This is a very different approach than that used by Visual SourceSafe, which is basically a file locking mechanism. The fact that SVN is a real client-server application (where VSS is simply a disk-based "database" with no server app to administer it) provides all sorts of capabilities. We check out, modify, commit, then publish from svn to a dev server.
Also, if I remember correctly, Cassini won't server apps from a mapped drive.

ASP .NET Development Server not serving everything all the time

I'm using Visual Studio 2005 on a Windows XP SP3 machine and recently have come accross a some what strange issue.
I have a C# and ASP.NET project that runs fine when on the team test server and using IIS locally on my own machine. However, running it using the in-built Visual Studio ASP.NET Development server it doesn't seem to serve all the images/scripts/css files all of the time. When I load a page one time images A, B and C will be missing and I may get a system (sub-package) error however loading it again all those images will be there and the sub-package will work but a CSS, a script or any other image file may be missing.
The Windows event application log seems to show occasionally the missing files will be logged but this isn't consistent either.
It happens to me all the time; I think the reason is that the ASP.NET Develoment server is not a very good HTTP server, and when receiveing too many requests, it drops some ones.
Since it is also very very slow, I configured vs2008 (you can do that with vs2005, of course) to use ASP.NET for debugging; it works far better that way.
To do that:
Project -> properties -> Web (last tab) -> Server. There are three alternatives: Use Visual Studio Development Server; Use local Web IIS; Use custom Web server. Choose the second. (not sure about the exact english names: I have the Italian version of VS).
Check the page in Firefox/Firebug or with IE8 and see if the paths to the files/scripts/images is correct or not. A common problem when switching between the local dev webserver and IIS hosted pages is that the paths may not resolve the same. You can fix this sometimes by using the "~" character before a path in the asp code.

ASP.NET Development Webserver Starts but does not Serve Anything

I created a Virtual Application in IIS 7 to host my app so I could test it on other machines on the local network, since the development web server will not respond to requests from machines other than the local machine. I had to allow IIS to login as me to get into My Documents, and enabled ASP.NET impersonation through the IIS. That worked fine, but...
Now the ASP.NET Development Webserver won't serve anything at all. I hit debug in VS2008, the dev webserver starts up seemingly fine, but then the IDE launches Chrome and the browser just sits there twiddling its thumbs. It never fails, but never loads. Nothing.
There are no errors from ASP.NET Development Webserver or Visual Studio or Chrome that I can find. I even looked in the Event Log. Nothing.
What did I just stupidly do?
I haven't got Chrome installed at the moment so i can't confirm for sure before i answer this, but IIRC i have seen this before and the VS debugger cannot correctly launch Chrome and serve it pages from Cassini (the VS development webserver).
The way i got round this previously is to just create a virtual directory in the local (dev machine) instance of IIS, and point it to the folder containing your web project. Then you can use Chrome to browse it just like a normal web site. You can then manually attach the VS debugger to the right worker process.
Alternatively, you could start up the debugger as you are now, and when Chrome sits there, you could manually enter the url for the page you want to start with (it will be http://localhost:<some port>/default.aspx or similar). VS won't be able to debug the script in the page, but it should still debug the compiled code just fine (like it does for Firefox).
Holy crap, I know what it was. When I changed the IIS settings to have ASP.NET impersonate me to get into the My Documents folder, it modified the web.config file. Now you're probably thinking, well duh, of course it did. I honestly thought that IIS 7 had some new way of dealing with impersonation other than the web.config setting. Turns out it's just built into the MMC snap-in to manage it now, but it does it in the same way.
Once I reverted back to the original version of the web.config file, ASP.NET Development Server happily worked exactly as intended again. I suppose ASP.NET Development Server craps out if there are impersonation settings in the web.config.

Resources