Debugging an ASP.NET application on Local IIS Server - asp.net

I have setup a local IIS instance to run and development an older ASP.NET (CLR v4.0) application that I have inherited.
I am running it an a virtual directory, and I am able to attach to the IIS process and debug it (annoying). However, I am unable to "F5" in Visual Studio to start debugging. I get an error message saying "The web server could not find the requested resource."
I have went through all of the Microsoft advice on their help page without much luck. Am I naive in thinking that this will work, or am I missing something? I even installed the IIS 6 Metabase compatibility, but that did not seem to help either.
I realize that I probably need to give more information, but I don't know what other details I need to add.
This is running on Windows 8.1 Enterprise with IIS 8, and I am using Visual Studio Professional.
Thanks

MYSTERY SOLVED!!!!!!!!!
Apparently, Request filtering is installed by default. In order for debugging to work, you have to go the virtual directory -> Request filtering -> Http Verbs, and allow verb DEBUG.

Related

Problems publishing site to localhost on windows 2008 rs server

I must preface this post by saying that I am not an experienced developer, I am in the process of learning through trial and error and a lot of google searches so detailed (step-by-step) feedback would be greatly appreciated. I created a website, which does not use a database, using visual studio 2015 and I am attempting to host it locally on a Windows 2008 R2 server.
I installed IIS and loaded the asp.net v4.0 framework. The site works fine, produces no errors when I test it and works after being published only if the visual studio is still running.
However, when I close the Visual studio and open my browser window to http://localhost:50044 (which is the URL listed in properties menu in VS), I also tried using port :80 and nothing. When trying to add Web Site via the IIS management utility I receive the following authentication error: ”Cannot verify access path (C:\Inetpub\wwwroot).”
I checked the permissions and windows authentication is enabled with read access, and all other permissions seem to be correct. I am at a loss, I'm sure it is probably something simple that I am missing due to my lack of knowledge and experience. Any help would be appreciated.
It's sounds like you are running on IIS express which in your case stops running when you close visual studio. Normal process is create a new website in IIS and point to the folder where your web.config is. You can then hack your host file (C:\Windows\System32\drivers\etc) so DNS works. Add an entry like "127.0.0.1 mytestwebsite.com". I hope that helps
So I figured out part of what was happening. I didn't realize that visual studio has built in IIS and was using that by default.
I ran VS as an admin, created a new project, then attempted to create a virtual directory thru VS under the project/properties/web tab. I selected local IIS and entered http://localhost/boc and it returns an error: unable to create vd. Web server http://localhost... Could not be found.
I then went in to the IIS manager and set up a virtual directory with no issues. However, when I attempt to reference it thru VS I again receive an error message.
Any ideas?

404.17 error - requested content appears to be script

I have a similar question to this one;
IIS 7.5
Server 2008
ASP.Net 4.0 web site
The error I get when trying to run the site is this:
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
...
Most likely causes:
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different hander.
Now here comes the weird part:
THE WEIRD PART
The weird part is that on the develop server -- which is similar in every aspect to the production server -- everything runs smoothly.
Here's a list of things I cannot try, because I don't want to mess with the sever (it hosts many other sites):
Reinstalling .Net
Reinstalling IIS
Reinstalling anything
Running aspnet_regiis
Here's what I did try:
Republishing the site
Restarting the application pool
Changing the application pool to .Net 2.0 and back to .Net 4.0
Switching around between Integrated and Classic pipeline mode
Enabling 32-bit mode
Taking a look at Handler Mappings
Eventually I created a new application pool, and it sort of started working.
Q) "Sort of"?
A) Yes, sort of.
Now the site only works when the (new) app pool is set to .Net 4.0, Integrated,
and the site's Authentication has ASP.NET Impersonation set to Disabled.
Any change to these settings sets the server yelping "404.17" all over again.
Q) What's wrong with that?
A) What's wrong with that is that I NEED ASP.NET Impersonation for the site to function properly.
As always, your guidance is most needed.
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Usually this error occurs when you have the right IIS version installed to the respective .net framework. If it was a version (not installed) issue then you would have got a different error message. Anyways, I think by now you have resolved your matter, but I like to share some words with anyone else having this problem. These error messages gave me so much headache all last week and I had tried everything.
Best remedy is always to re install the latest .net in latest visual studio. And the important thing to do is uninstall the existing IIS(express or whichever you have) and re install it first. Then download the latest visual studio. This way visual studio installation can easily access you IIS and add the necessary application pool.
As for the error 404.17, it could simply be because the right application pool has not been assigned for the appropriate dot net version. If the right version is not there re installing visual studio is the only way I know. Also, I think you can try downloading another version of the Visual Studio too. For eg, download the ultimate if you have professional or vice versa. Hope this helps someone with similar problem.
Installing this windows server feature http activation is, what was missing for me.

Calling LoadLibraryEx on ISAPI filter

Hi we have configured IIS with helicon and webgate.
when I am accessing my site I am finding Following Error message on page
HTTP Error 500.0 - Internal Server Error
Calling LoadLibraryEx on ISAPI filter "C:\Appl\Softwares\Webgate\access\oblix\apps\webgate\bin\webgate.dll" failedror
Please help.
My configuration as my other environment where all the things are working.
Yesterday, while setting up a website on IIS 7 and Windows Server 2008, I loaded up the website in the browser and ended up getting the following error message:
Calling LoadLibraryEx on ISAPI filter C:\…isapi.dll failed
The path was to the isapi.dll file in C:\Program Files\etc and I was pretty sure everything was setup properly. After doing a bit of research on the topic, I figured out that since I’m running IIS 7 on a 64-bit version of Windows Server and my web application was 32-bit, I had to change a setting in the IIS configuration.
To fix this problem, all you have to do is open IIS7 and click on Application Pools.
Then right-click on the application pool for your website or the default application pool and go to the Advanced Settings tab. Make sure that Enable 32-bit applications is set to True.
That’s it! Now restart IIS and load up Internet Explorer again and your website should load fine.
I received the same error after installing .NET 1.1.
After uninstalling .NET 1.1 I still had the same error.
However, the error has gone immediately after I went to IIS Manager -> ISAPI filters and removed the only filter from here (it was ASP.NET_4.0.30319.0).
This error might be because of the following reasons. Those are:
webgate installation folder has restricted permissions. Give required permissions for the webgate installation and configuration folder for the IIS process which runs your website. (Had you run configuration script for webgate or just manually configured it?)
There may be other DLLs missing on which webgate is dependent. For example, VC++ runtime redistributables. (For 10g use 2005 version, for 11g use 2012 version).
Some internal files are missing for webgate. Try re-installing webgate and running config script.

What is to prevent me from using IIS Express exclusively on my development box?

I have only read a bit about IIS Express, and am in the process of downloading and installing it now. It seems like i should be able to uninstall IIS proper and just make use of IIS Express when developing/debugging webserver-based technologies in visual studio (2010 SP1).
Is this a sane conclusion?
What development scenarios might not play well with IIS Express?
Are there cases wherein IIS proper would absolutely still be needed?
My use of IIS in the past has been for ASP.NET MVC cases, a few web service debugging sessions, etc. Obviously IIS proper is still needed for actually hosting the resulting solutions, but can i realistically "free up resources" and just use IIS Express on demand?
To my knowledge some known issues with IIS Express:
Only http/https protocols are supported
There is limited UI support (through Visual Studio and WebMatrix) to configure IIS Express. But you can configure it manually by editing applicationhost.config.
IIS Express runs as current logged on user, so you may run into issues like http://forums.iis.net/t/1175734.aspx
It will be slow because by default failed request tracing and console tracing are enabled (failed request tracing can be disabled by editing applicationhost.config file)
Kernel mode caching is not supported

Can't debug ASP.NET application stored in IIS

I have a question regarding IIS (version 7.5) and ASP.NET (.NET Framework 4) . I am trying to debug ASP.NET web application which is stored on IIS. Now, I have done this in past and everytime it worked perfectly.
But now when I try to do same, **Visual Studio 2010** always gives me error, **"unable to start debugging on the web server. the iis worker process for the launched URL is not currently running" ...** even the application I had created in past (& stored in IIS) can't debug using Visual Studio. But all applications (new & old) can be accessed if I type their path in Browser, and they work fine too.
I did search on internet about my problem and I found many posts, but almost every post talks about activating **Windows Authentication** in IIS for the application in question. But, I am using Windows 7 home premium and the IIS shipped with this version doesn't support option for Windows Authentication. Also, if this is the only reason then why my old applications were working just fine till now without this Authentication method?? I found MSDN help about this error but it is not much helpful to me. I also checked APPLICATION POOL selection in IIS and my Application (both are using V.4.XX.XXX)... I have also checked **BINDING** , which is *:80 to Default Website, that means all requests to port 80 will be directed to default website (where my all applications reside)
As a side note, I have SharePoint Server 2010 installed. Which has its own website (which I have disabled while debugging) ...
I think there is something is changed in my IIS configuration, but I cant figure out what it is. And I am sure that it has something to do with SharePoint installation (may be because of more than one website on IIS for same port ??). Because I am using IIS for first time after installing SharePoint and I am having this error.
I will really appreciate if any one has answer ...
Thanks,
Jack
UPDATE: As I suspected ... having more than one site in IIS was root cause of trouble, Once I uninstalled Sharepoint Server 2010 and its web sites from IIS, my Visual Studio 2010 debugger was able to "Auto-Attach" w3wp.exe process while debugging any application ... ( I really don't see any reason that even after disabling all other websites why still it was giving me error at first place ?? )
I know its not a solution, because I have to remove Sharepoint Server ... but at present its more important for me to work on that application then Sharepoint Server.
But I am still open for any suggestions which might help me to run both together ....
Thanks,
Jack
Check the Bug fix for this issue in the Microsoft's Connect site.
.
Is it with .NET 3.5 in Visual Studio 2010 , if yes , then check http://www.ginktage.com/2010/08/fix-for-visual-studio-2010-hangs-when-debugging-asp-net-3-5-web-application/ for information

Resources