Hello there Im have just changed the target framework for an asp.net mvc project from target framework 4 t 3.5, I keep getting this error when I try to debug, or go to any controller action
'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. '
Any ideas why I keep getting this error? as soon as I revert back to .net 4.0, everything is fine
ps could be an issue with routing as the global.asax Application_Start() is not not hit hence route entries are not registered
Thanks
Are you running the site on IIS or Casini? If IIS, you should also check that the Application pool is targeting .NET Runtime 2.0
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 very new to web services. I have wrote a web service application. When I run it from visual studio, everything works fine and my local website comes up. But after I deployed it in IIS, I can't browse it from iis and i get the following error! I am confused about this error for a day! Can some one help me?
XML Parsing Error: no root element found
Location: http://localhost:99/WebService.asmx
Line Number 1, Column 1:
I faced a similar issue when I deployed a project on my local new computer. By default, ASP.NET is installed but disabled in Windows.I had to enable it before my project run. See Install IIS and ASP.NET Modules for details.
Make sure that all the required modules are enabled.
I had same issue, but had ASP.NET modules installed. Apparently had to change .NET Framework Version from v2.0 to v4.0 and site was showing as it should. You need to go to IIS, Application Pools, double click the one that has older version of .NET and set the relevant one. Maybe this will be helpful for someone else.
Server Error in '/' Application.
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. Version Information: Microsoft .NET Framework Version:2.0.50727.8689; ASP.NET Version:2.0.50727.8670
Configuration: .Net framework 3.5, windows 10 operating system [IIS express 10]
How can I solve this Problem, Please help me
Hosting server will typically generate a "404 Not Found" web page when a user attempts to follow a broken or dead link.
Check the URL and look for resource (webpage/service/view) does exist?
This means that the url you tried to access doesnt exist, or the IIS is not running, are you sure you ran it from visual studio using F5 ?
I have installed:
Visual Web Developer 2010 Express
ASP.Net MVC 3
I went to File > New Project > ASP.Net MVC 3 Web Application
I chose Empty template with ASPX view engine. VWD generated lots of files.
When I clicked Run, I get the following error:
Server Error in '/' Application.
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: /
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.1
What am I missing here? Is there something else that needs to be done to get it running?
Yes, that's true
An empty application doesn't have a single controller or view defined. It's all on you. Most people start with an application.
We have deployed a .net 4 asp.net site on IIS 6.0.
Default.aspx is configured as one of the default document.
When we access the site using the following url
http://testsite
We expect it to render
http://testsite/Default.aspx
But instead we get 404 Not found error. We did not had this issue when it was deployed on .Net 2.0. Only thing that has changed on the server is that we use .NET 4 instead of .NET 2.0.
UPDATE: I tried the following link but it did not work.
Getting an ASP.NET 4 application to work on IIS6
The framework version on the server is .NET 4 RC. Will it help if we install the latest .NET 4 version on the server?
Update: The issue is resolved now. The problem was a Third party upload control that we were using which added its own HttpHandler in Web.Config. This HttpHandler started failing in the .NET 4.
With the new .NET 4 framework, comes some problems if you are running it on IIS 6 Windows Server. IIS 6 does not let you have more than one framework at the time running in the same instance like IIS7 that can create Application Pool targeting different framework.
When IIS 6 runs under ASP.NET 2.0 (3.0 and 3.5 are superset, not frameworks) you are going to hit this error if the application is 4.0
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 11: </configSections>
Line 12: <system.web>
Line 13: <compilation debug="true" targetFramework="4.0">
Line 14: </compilation>
Line 15: <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> </ system.web>
You have a few options;
Downgrade the .NET application to 3.5 that Visual Studio 2010 makes it really easy. Just go to the Website properties -> Application tab and there is a drop down with all the framework releases, select 3.5, you VS2010 will reload the project and modify the web.config, if you added web service reference, that you may have to delete them and re-add them under 3.5
To configure the IIS6 and web config to solve the issue.
I deal with the second part:
In IIS 6 console, you need to right click you project and click the property and check the ASP.Net tab whether Framework 4 is selected or not. If not select the framework 4.
But still you might face the same error because of the application pool; you might have same application pool for two different framework web application.
IIS 6 does not let you have more than one framework at the time running in the same instance (means single application pool can’t use for two different frameworks) like IIS7 that can create Application Pool targeting different framework.
To solve this issue you need to create application pool and assigned this application pool to you framework 4 web application.
To assign the application pool, in IIS console open the properties section of the web application, and click on the “Home directory” tab and selection application pool which you have created earlier from drop-down-list.
This two might now solve your problem completely sometime. You can get the error as
“404 Page is not found”.
Though you might now have any issue while in development time.
Basically page is not found issue is cause of other problem which is set hidden by is IIS6 . But you need to see the real cause. What you have do here is go to the IIS6 console open “web service extension node” which is right below the “default website” node. You will see the entire ASP.Net framework list over there, by default these frameworks might be prohibited so please select ASP.Net Framework 4 and click allow button.
Browse you website now, you get other error beside “404 Page is not found”. You might get the error as listed below:
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0'
You’ll see following error when browsing the website
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the element of the Web.config file.
To solve this issue, you need to modify your web config file as below:
Previously the CompilerVersion value is set as v3.5 but we already change our targetFranework to 4. Thus according to the error message above the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework.
Hence your new setting will be as below:
<providerOption name="CompilerVersion" value="v3.5"/>
Hope this will solve your ASP.Net 4 migration and hosting issue at IIS6.
Here is a link to a more complete solution and explanation of this:
http://johan.driessen.se/archive/2010/04/13/getting-an-asp.net-4-application-to-work-on-iis6.aspx
Check the server logs, they will probably give you a better idea of what is going on.
You can find the path to the log file by right clicking the website in IIS and go to properties. Then goto the Web Site tab, under 'Enable logging' click properties and the logging properties window will show up which displays the path to the log file.
I think in 4.0 the default page setting is actually stored in the web.config. With the IIS 7.0 , IIS reads the web.config the determine what to do for the default page. I think IIS 6.0 is not reading the setting.