I'm having a hard time fixing an error that I currently have and I hope you can help me with it.
I am developing a little ERP-WebSite that is going to be used within an intranet. Naturally I want to use Windows authentication to make it as comfortable as possible for the user. I developed the Website using Visual Studio 2008 and its integrated development server. Recently I migrated to VS2013 and .NET 4.5. Code wise everything went good and I am able to build everything but here comes the problem. Because I am using VS2013 now I also have to use IIS Express. When I try to debug the Website i receive a 401.2 Error. Error Code 0x80070005. On VS2008 everything worked perfectly and I am 99% sure I have the IIS config set up currectly. Here are the relevent parts:
applicationhost.config:
I also set the according values in the Project Settings in VS2013.
I'm kind of lost right now. Any help will be much appreciated!
EDIT--------------------------------------------------------------------------------------------------------------------------
After playing around with IISExpress for way to long now, I finally got it to work again. Something must have been wrong with my previous eddits of the applicationhost.config file of the IIS Express. I just deletet it and let VS13 recreate it. Afterwards I was able to run my site using IISExpress. I hope this might help someone who has the same problem as I do. Sadly i realized that it is painfully slow. It takes almost 2 minutes for some pictures to get loaded etc.. What could be the cause of that ? I also tried using the full IIS Version (with Win-authentication installed) but when I run my site using the local IIS I receive an XML-parsing error: No element found. Using the local IIS would be a lot faster than using IISExpress, so I'd very much like to fix this Error.
Thanks for any help in advance.
Soo.. I'm trying to help a friend build up hes photo-gallery-site.. Everything works just fine until i was about to publish it..
So to start of.. The first issue when i'm trying to push it up (VIA FTP - To citynetwork (webhost), i got:
Parser Error Message: The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.
I've solved that to just change:
<compilation debug="true" targetFramework="4.6"/>
To:
<compilation debug="true" targetFramework="4.0"/>
But then i get another wierd error that looks something like this:
System.ComponentModel.Win32Exception: Access is denied - Cannot execute a program. The command being executed was "\\webstorage\storage_content\00\102600\elliotelliot.com\public_html\bin\roslyn\csc.exe"
Please help mee. I'm soooooo confused, i mean.. It works just fine when im publishing it to my local iis server and run it from there, all the files is also pushed up (nothing missing), anyone else with this issue?
I've seen people talk about application pools and users (therefore the "Access is denied" state)
Thanks!
/R
Please Check Why csc.exe is pointing to some other location than the framework location.
This is very similar to an issue I faced. I fixed it by changing the .NET Target version to 4.5. I changed it through Visual Studio instead of directly editing the web.config file, I don't know if this would make a difference or not.
There's more information, and more things to try in this article.
Hopefully something there helps.
I am running a Asp .Net website under IIS 7.5 - win 7, IIS 8.5 - win 8.1. I have 2 development machines witch run it normally.
Steps to recreate the environment
After a fresh install of Win 7 on another machine.
Installed all updates
Added IIS Feature with
.Net extensebility
Asp
CGI
ISAPI Extensions
ISAPI Filters
Registered .Net framework 4.0 with IIS(aspnet_regiis -i/aspnet_regiis -ir)
Added correct application pool to website.
Set the path to bin folder of the project.
in web.config set:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
Aded IIS/IIS_USRS read-Write rights on the specific folder
*Note: I do not need Directory Browsing enabled
The Problem
On all new OS Installs, no mater what win version (7, 8, 8.1, or 10 Preview) I got the same error
****HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.****
If anyone can help because I am running out of places to look for the problem.
*Note - Same setting work fine on 3 development machines with win 7 and server 2008.
If I deploy a Publish it works fine. (Containing .aspx pages)
Thank You
As I said in my comment below the OP I had tried everything on the list of usual suspects. After losing literally days of my life wrestling with this problem, this is what fixed it for me:-
For some reason best know to the malevolent forces of dotNet, publishing my web apps with the setting Precompile during publishing checked (found in the File Publish Options in the Settings tab of the publish dialog in VS 2012) caused certain of the MVC apps to use the wrong handler. It was almost as though IIS "forgot" they were MVC apps.
A small text file called:
PrecompiledApp.config
was created in the root directory of the malfunctioning app.
Deleting this text file and subsequently publishing without the pre-compile setting brought the malfunctioning apps back to normal!
I have not the faintest clue why this option should cause such a detrimental effect, but this seemed to be the cause.
(I also set all the references to the MVC dependencies as "copy local", but this is on the "usual suspect" list of things to do.)
As with most things dotNet related fixing such mysterious problems as these requires days of banging one's head against a wall randomly altering settings until one makes a difference. There is usually no logical reason for, or documented example of, the error in question, and you are just left with voodoo, hearsay and trawling sites like SO for an answer.
Gimme open source software any day...
On windows 8.1, IIS 8.5 i got the same error.
I googled and found this video:
https://www.youtube.com/watch?v=OmQlO0daduE&feature=youtube_gdata
My Default.aspx was Defeult.aspx with an a->e typeo - fixed it. And now it works.
Tho, I get it, it's still a strange error. Maby should have been something like - "Couldn't find any of the default start pages defined in 'Default Document' and with a - how to change link"
I have a large (to me) ASP.NET (4.5 Framework) application that was working fine when developed in and published from VS2012.
I've since upgraded from VS2012 to VS2013 and I opened the solution without issue and it runs fine locally (on IIS Express).
I don't know if this is a red-herring, but I used NuGet to update the AJAX Control Toolkit for the first time (and its dependencies) and it appears to have worked.
When I publish (file system publish) the site to our web server (IIS 8 in Windows Server 2012) it loads fine UNTIL I change <compilation defaultLanguage="vb" debug="true" targetFramework="4.5"> to debug="false".
When I do, the site runs like a pig, sometimes pages don't even load, and its IIS Worker Process spikes the CPU and holds, growing in % until it consumes essentially all the CPU.
EDIT: this happens on the server and on my PC (IIS Express)
This test site's AppPool is running with the identical settings as our live site's AppPool. Of note:
Enable 32-bit applications: True
.NET Framework Version: v4.0
Managed Pipeline Mode: Integrated
I expect you'll need more information, but I honestly don't know where to begin and I don't want to overwhelm with unnecessary detail.
Thank you in advance
EDIT: I REALLY should have mentioned this:
the site is precompiled during publish in Release mode. I've never had to change to debug=false in my development environment prior to publish in the past.
I get this for each of the Projects in my solution:
(0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: [projectname], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly.
EDIT: it appears this solution I inherited is a web SITE not APP. I don't know if that comes into play.
I ended having to call Microsoft on this. They used ProdDump and LogMan to analyze what was happening. In less than 24hrs came back to me and said:
"Thread 19 seems to be pretty badly bogging down the CPU. The top of
the stack indicates that AjaxMin is trying to do FindEntry on a
Dictionary object and this was triggered from AjaxControlToolKit,
specifically there appears to be something “CombineScripts” attribute
defined on either the Master page or in the design page of
OrderDetails.aspx. Basically this combines all the JS files and
minifies them.
A quick test would be to disable the logic of CombineScript from
AjaxControlToolKit and see if that improves performance"
Google told me CombineScripts was an attribute of ToolkitScriptManager and since AJAX was always a suspect (for no real good reason, just a hunch) I jumped on it.
Sure enough, changing my reference to the ToolkitScriptManager to include CombineScripts="false" completely fixed the problem!
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false" ScriptMode="Release" />
Related posts:
I'm not the only one: https://www.google.ca/#q=ToolkitScriptManager+combinescripts+problem
Two helpful posts:
http://forums.asp.net/t/1696523.aspx
http://ajaxcontroltoolkit.codeplex.com/workitem/27558
In the project project properties check for any reference to old version of Ajax control toolkit. If found any then remove the same and try again.
I some times gave same error when I use nuget. I think conflict is your web.config assembly reference. Please compare your dll reference and web.config reference.
Try to change .Net version for Application Pool to v4.0
Migrating a project from ASP.NET 1.1 to ASP.NET 2.0 and I keep hitting this error.
I don't actually need Global because I am not adding anything to it, but after I remove it I get more errors.
The reason I encounter this issue is because I change the build configuration. When I set a web project to x86, it changes the output path to bin\x86\Debug. However, the output path should be bin and the web server won't find the binaries because of this.
The solution thus is to change the output path of the website back to bin after you change the build configuration.
There are a few things you can try with this, seems to happen alot and the solution varies for everyone it seems.
If you are still using the IIS virtual directory make sure its pointed to the correct directory and also check the ASP.NET version it is set to, make sure it is set to ASP.NET 2.0.
Clear out your bin/debug/obj all of them. Do a Clean solution and then a Build Solution.
Check your project file in a text editor and make sure where its looking for the global file is correct, sometimes it doesnt change the directory.
Remove the global from the solution and add it back after saving and closing. make sure all the script tags in the ASPX file point to the correct one after.
You can try running the Convert to Web Application tool, that redoes all of the code and project files.
IIS Express is using the wrong root directory (see answer in VS 2012 launching app based on wrong path)
Make sure you close VS after you try them.
Those are some things I know to try. Hope one of them works for you.
I've found that it happens when the Global.asax.(vb|cs) wasn't converted to a partial class properly.
Quickest solution is to surround the class name 'Global' with [square brackets] like so (in VB.Net):
Public Class [Global]
Inherits System.Web.HttpApplication
...
Deleting the existing global.asax file and adding a new one, clears out this error. This has worked for me many times.
If your using visual studio 2010 this error can occur when you change the configuration deployment type. The 3 types are x86, x64 and Mixed mode.
Changing to mixed mode setting for all projects in solution should resolve the issue. Don't forget to delete the bin, Lib files and change the tempdirectory output if your an ASP.NET website.
This just happened to me and after trying everything else, I just happened to notice on the error message that the app pool was set to .Net 1.1. I upgraded the app to 2.0, converted to web application, but never changed the app pool:
Version Information: Microsoft .NET Framework Version:1.1.4322.2490; ASP.NET Version:1.1.4322.2494
This one drove me completely insane and I couldn't find anything helpful to solve it. This is probably not the reason most people have this issue but I just hope that someone else will benefit from this answer.
What caused my problem was a <clear /> statement in the <assemblies> config section. I had added this because in production it had been required because there were multiple unrelated applications on the same hosting plan and I didn't want any of them to be affected by others. The more correct solution would have been to have just used web config transforms on publish.
Hope this helps someone else!
Changing the address's port number (localhost:) worked for me :)
I fixed this error by simply switching from Debug to Release, launch program (It worked on release), then switch back to Debug.
I tried just about everything else, including restarting Visual Studio and nothing worked.
I had this same problem installing my app to a server. It ended up being the installer project, it wasn't installing all the files needed to run the web app. I tried to figure out where it was broken but in the end I had to revert the project to the previous version to fix it. Hope this helps someone...
In my case, a AfterBuild target in the project to compile the web application was the reason for this error.
See here for more info
Removing Language="c#" in global.asax file resolved the issue for me.
In my case, I was duplicating an online site locally and getting this error locally in Utildev Cassini for asp.net 2.0. It turned out that I copied only global.asax locally and didn't copy the App_code conterpart of it. Copying it fixed the problem.
When you try to access the Microsoft Dynamics NAV Web client, you get the following error.
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
This error can occur when there are multiple versions of the .NET Framework on the computer that is running IIS, and IIS was installed after .NET Framework 4.0 or before the Service Model in Windows Communication Foundation was registered.
For Windows 7 and Windows Server 2008, use the ASP.NET IIS Registration Tool (aspnet_regiis.exe,) to register the correct version of ASP.NET. For more information about the aspnet_regiis.exe, see ASP.NET IIS Registration Tool at Microsoft web site.
try this solution
https://www.youtube.com/watch?v=LNwpNqgX7qw
Ensure compiled dll of your project placed in proper bin folder.
In my case, when i have changed the compiled directory of our subproject to bin folder of our main project, it worked.
Had this error in my case I was renaming the application. I changed the name of the Project and the name of the class but neglected to change the "Assembly Name" or "Root namespace" in the "My Project" or project properties.
Deletin obj, bin folders and rebuilding fixed my issue
I had this problem.
I solved it with this solution, by giving CREATOR OWNER full rights to the Windows Temp folder. For some reason, that user had no rights at all assigned. Maybe because some time ago I ran Combofix on my computer.