Windows Authentication 401.2 Error using IIS Express - asp.net

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.

Related

IIS Express with VS2010 SP1 Constantly Rebuilds Web Site

I'm working with larger solution that has several website projects and recently it was decided to switch from Cassini to IIS Express. There are about 10 or so developers who all share the same solution/project and thus web.configs and they are all working happily with IIS Express except for me. The problem is that for no pattern I can figure out, IIS Express constantly resets itself and performs a new build thus resetting the session.
Here are some of the reasons it will rebuild itself:
Editing an ASPX file
Doing nothing for a few minutes
Editing code behind file
Using the web site as normal
Note: the above actions do not always cause a rebuild. Also many of these actions were perfectly fine using Cassini.
My system is pretty standard compared to the other developers who are not having issues.
Here is some more information:
I'm using VS2010 SP1 and Windows 7 Professional.
I started using IIS Express 7.0 but have since tried upgrading to 8 with the same results.
I've uninstalled/reinstalled IIS Express several times w/o any luck.
Using ReSharper 7.x
I've turned off edit and continue
I'm now in full debug mode and this constant rebuild/reset is becoming prohibitive.
EDIT: it is in fact rebuilding as verified using health monitoring per John Saunders' suggestion.
EDIT: one important thing I did not mention is this mainly happens during a debug session. Not only during debug session, but usually. In fact adding a break point, or even hitting a break point can cause a rebuilt.
I would look at Resharper as being the cause of the problem. Try completely disabling or uninstalling Resharper and see if the problem persists.
I've been much happier with coderush from dev express myself... I don't work for them just tried both and Resharper really bogged down my system and I didn't like it...

Debugging ASP.NET in IIS 7

I have searched all the usual but come up empty. I must be doing something silly!
Simply I created a new project, ASP.NET Web App, and wish to use and debug it with the local install of IIS 7.5 on my Windows 7 x64 box.
According to what I have read it should be a simple process; my issue is that Visual Studio will not stop at breakpoints nor at errors etc.
I just don't get it:
Visual Studio is attaching to the w3p process for me automatically.
If I hover over the breakpoints it shows a message saying the same, that it is in the same w3p process.
I am in Administrator context. I manually ran it like so to be sure but in any case if you are an admin it runs like that anyway.
Some notes:
I do not wish to use IIS Express as I require native IIS 7.5 for my tasks, however it does debug in express - no surprise there.
As mentioned above, all this is being done locally.
The path of the virtual directory is pointed towards the project files, as set by Visual Studio 2010. It even set the Network Service as read on the folder structure.
When debugging from VS the web site runs fine, just debugging is the issue.
Maybe it is permissions? The Default App Pool is using the ApplicationPoolIdentity not Network Service... Should it be? I had assumed they we.re one and the same essentially. Although I changed this and no luck unless I didn't do something I should of
Keep in mind here that my issue is semi-unique in that I am not receiving error messages, not even in the event logs... For all intents and purposes it should be working fine, just it isn't.
VS and IIS, and all updates, are applied to date.
Note: I'm familiar with IIS7.5, I run my own public web hosting server. I just never tried to debug
Note: It is Visual Studio 2010 Ultimate
Thanks for your time.
Sigh!
I went back to basics... Uninstalled IISExpress and tested; It worked! Re-installed IISExpress; It worked!.
I guess installing IIS7 native after IISExpress did something screwy? I had ran the register ISS command on IIS7 when I installed it.
Right, so now I have both installed in tandem and they work fine. Thanks for all your help guys, appreciated.
you can try right-click on project in VS go to properties select web from left menu tab. Check if ASP.NET debugger is checked and also you can select Use Local IIS Server and give localhost url there (in project Url textbox) and then Say start debugging from VS and put breakpoints.
I had a similar issue the other day, I attached the debugger to the wrong w3p process, make sure you attach it to the one the app pool identity is running under.
I wanted to write it as comment by I don't think I can add pictures..
Are you sure you are running the same version of dll?
Is your breakpoint filled like this?
or hollow like this?
1st go to ,Program and Feature in control panel and then in that turn on or off windows features. and now check all check boxes(activate features) related to Internet Information server & windows service managers. once this is done run your visual studio as administrator and then attach to right w3p process.

"unable to start debugging on the web server" MSVSMON.EXE failed to start. VS2010 error

having a real problem getting VS2010 to debug IIS.
I've searched on the internet for a few days now and tried every single solution I can. VS2008 works perfectly but I've installed VS2010 and when trying to debug an IIS site (by pressing F5 on a project that uses IIS) I get the error message
"unable to start debugging on the web server. Microsoft Visual Studio Debugging Monitor (MSVSMON.EXE) failed to start. If this problem persists, please repair your Visual installation via "add or remove programs" in the control panel."
when i try attaching the process manually, i get the same message.
I've tried repairing the software. I tried it, it failed, so I uninstalled using the Microsoft Visual Studio 2010 Uninstall Utility (http://archive.msdn.microsoft.com/vs2010uninstall/Release/ProjectReleases.aspx?ReleaseId=4321), then reinstalled and it still has the same problem. With the SP1 update this still happens. I can run the website fine when running "start without debugging" and it runs fine.
I've gone through all the guides I can and all tried all the settings on IIS I can and still no luck. I'm using Windows 7 64bit if that means anything. I can detail much more about all the things i've tried.
also have a laptop and have done the same, installing VS2010 and TFS (also on win7 64bit), and this works perfectly for debugging. Didn't have to mess around at all. I can't see any difference between this and my PC with the problem. I'm scratching my head here and thinking I might have to format my PC and try again from a fresh install (which would be seriously annoying!)
Thanks to anyone that reads this,
Dan Gent
I had a HOSTS file entry resolving the project URL to a DEV server instead of local machine. Changing the entry to point to 127.0.0.1 fixed the problem.
Are you installing from a purchased disc or did you download it? Either way, you need to download a fresh copy and install that (sounds like original is corrupted).
Also, make sure you have all the IIS & Web components installed on your machine. Is your OS home or basic?
http://technet.microsoft.com/en-us/library/cc731911.aspx
i've fixed it now. ended up formatting machine, reinstalling windows 7, and then taking backups everytime i installed a new program so i could roll back. installed VS2010 first, F5 worked. then installed VS2008 & everything else and debugging still works on VS2010. not sure what happened as the above problem happened on a fresh install. something must have corrupted something somewhere
thanks for all your help and narrowing this problem down to something that was worth formatting my PC to fix.
cheers,
Buswell
This can also be caused if you are using a host name in IIS and make a mistake in your hosts file.
Check that the hosts ip is set to the local machine 127.0.0.1 and not somewhere else. In my case I had accidentally set it to the development server.
Have you tried starting MSVSMON manually? I had the same problem you are and found the service was stopped. So I tried enabling the service and made sure that it was using the correct credentials.
I hope this helps!
Thanks!
Don
The only thing that worked for me after I tried practically every solution on the Web is to right-click the project on the solution explorer, and select Debug->Debug as Administrator.
Right click on Project, "Use Custom web server" checkbox will be selected, select check box "Use local IIS web server".
I resolved this issue with this and its working.
Managed to resolve this error by At solution explorer-> right click the project->select Debug->Start new instance.
I think it was because i had copied the project folder from another server.

VS2010 Ultimate - Unable to launch ASP.NET Development Server

I've worked with ASP.NET once before and had a project where it was potentially useful, so I started creating an ASP.NET website as part of a solution that contained several C# class libraries.
I'm using Visual Studio 2010 Ultimate Edition and Windows 7 Professional x64. The issue is that when I try to debug my website project, I get the following error message:
Unable to launch the ASP.NET Development Server
There's no other information (it seems a popular variant is the "port in use" error).
Interestingly, I can run single pages on the application by right-clicking on the ASPX and selecting "View in Browser". This does not allow me to debug into my breakpoints, though.
I have no clue what the problem could be. I'm running VS2010 in Administrator mode. One of the questions that popped up here suggested I uncomment the "127.0.0.1 localhost" line from my HOSTS file, which I did, and restarted VS with no luck. I also tried both setting a static port for the web server to run on as well as let it dynamically generate one. Both do not help the situation.
Any help?
Thanks.
Added on 5/20/2010 at 9:25 CT
I can debug by attaching to the process. However, this is still a painful way to debug quickly so I'd still like a solution to the problem.
There are some things to check before listed here
Please eliminate issues on the link and check whether you may debug
Hope this helps
Myra
The problem was I had a InstallShield Lite project which was apparently causing problems. Once I unloaded that project, I can launch the development server in debugging mode.

ASP.Net Web Site Won't Compile, But Works Anyway?

I have an ASP.Net 2.0 web site, using the DotNetNuke framework (4.09), and it will not compile, but when I hit the site in a browser, it works. Even the parts that don't compile will work. How is IIS able to compile and run this site, when Visual Studio can't? Everything is the same in both places... I copied the entire web site from the remote server on to my local machine, then I set it up in IIS the same way. On my local machine, Visual Studio can't compile the site, but it still runs. How can this be possible?
The specific errors are not important, as there are 189 of them, from every possible part of the site. I'm not trying to fix the errors... what I want to know is how it's possible for the web server to run the site, regardless of the errors. Please pay attention to what I have written - everything is exactly the same in both places. There are no missing DLLs, no different configurations, nothing on the machine itself... remember, the site runs fine on my local machine.
Is this a web site or a web application? If it's a web application, you're probably still running off the last successfully built bits in the bin.
The site is using old dlls, or possibly you have references missing in your local version that the server has just fine.
As Mitchel said, we need to see the error before we can really answer your question.
To give you an answer on this we would need to know what the errors are.
Your local machine cached the 'working' copy and is using that maybe?
The site was compiled successfully at one point as it works on the remote server. Thus, copying it to your local machine and hitting the local site will also work. However, there can be several reason why you can't re-compile it on your local machine including; missing references, web.config entries, third party control licensing, etc..
I realize you are not trying to correct the 189 errors, but there are clues, if not answers, in the error listing that will get you moving in the right direction.

Resources