I have written a small ASP.NET application. It runs fine when running it with the small IIS installation that comes with Visual Studio 2005, but not when trying with IIS. I created the virtual directory in IIS where the application is located (done it though both IIS and VS 2005), but it does not work. In the beginning I thought it might be caused by the web.config file, but after a few tests, I think that the problem lies with IIS (not certain about it).
Some of the errors that I get are
Unable to start debugging on the web server. The underlying connection was closed: An unexpected error ocurred on a receiver. Click help for more information
Can anybody give me a suggestion of what to try next?
Have you run aspnet_regiis?
Here's an overview site for different IIS versions setup and should help if there are other questions/issues
Try reinstalling aspnet_regiis.exe.
If you are using .net frameworkype 4.0 and using 64 bit system,
Go to Run, Type cmd and Command Prompt will be up, then type
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
If you are using 34 bit system,
Go to Run Type cmd and then type
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
The site won't load at all or you can't debug remotely?
Some thoughts:
Make sure you've got debugging enabled in your web.config, if you're trying to debug. Otherwise, build in 'Release' mode.
Make sure your project is set as an application, and is running as the correct version of .NET
More description of your setup and the error message would be useful.
Make sure that the customErrors is set to off in the web.config. That should show the actual exception.
Make sure that your virtual directory in IIS is set to the correct version of the .NET framework.
Look at the properties in the virtual directory and see that the correct default documents are the ones that you are using in your dev project.
Also look at the url headers for the website in IIS.
On some of our servers we have both versions of the .NET framework. In IIS I typically have to set what version the virtual directory should be using. This can cause problems running it on the server.
First make sure you have installed and configured IIS server. To check whether IIS server is installed: Run->inetmgr press enter.
To know how to install and configure IIS server check the following Link:
http://chalaki.com/install-iis6-windows-xp-professional-sp3-setup-run-csharp-cgi/425/
To develop Website using Visual developer with IIS instead of "default ASP.NET Development Server", In the new website window under "Location" click on "Browse" to see the different Server options including IIS Server. User can select the server as IIS server instead of "File System", then the "Location" option will be "HTTP" instead of "File System".
In Visual developer 2008 under Properties->Start Option->Server->"Use local IIS server" option is not shown, Even though IIS server was installed and configured successfully. the only options shown are "use default server" and " Use custom server with base URL".
So in Visual developer 2008 to run on IIS server(If IIS server is installed), Need do the following:
New Website -> Under Locations Click on "Browse" -> Click on "Local IIS" and then select the "IIS Virtual Directory"(IIS vitual Directory which is directory created by the user while configuring IIS server) -> Open
While Running/debugging, the server which you selected while creating the website, the same server will used to open the website, that is while creating the website if you selected "IIS Server" then the website will be opened though IIS server.
One more thing is, while installing Visual developer 2008 and IIS server, If you installed IIS server after installing Visual studio then you need to do the following before creating new website:
Run ->cmd press enter (then enter the following Command)-> C:\WINDOWS\Microsoft.NET\Framework\Version# aspnet_regiis -i press Enter then you get message after 3 seconds "ASP.net was installed successfully".
(*Version# will be v2.0.50727 in most cases)
Related
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
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.
I installed Visual Studio 2003 on Windows 7 but I am getting the following error on when I press the F5 for debugging.
Error while trying to run project: Unable to start debugging on the web server.
Could not start ASP.NET or ATL Server debugging.
Verify that ASP.NET or ATL Server is correctly installed on the server.
What does that mean and how do I fix it?
The cause for this as per microsoft support is -
This problem occurs because the debugger does not send the debug action to IIS when you run the application. The debugger identifies your computer as localhost. However, in IIS, the Web Site Identification of the application is the IP address that you specified
The resolution is as given below -
http://support.microsoft.com/kb/814717
http://forums.asp.net/t/703333.aspx
I found answer :
iis manager -> computer name -> ISAPI and CGI restrictions -> aspnet v1.1... -> select allowed
(dont forget restart IIS.)
I tried all the options but in vain. My solution was:
Go to properties page of the application in VS2010
a. check you have selected 'Define DEBUG constant'
b. check you have selected 'Use Visual Studio development server' under the Server.
i) select 'Auto-assign Port'
c. check you have selected 'Apply server settings to all users'
d. check you have selected 'asp.net' under Debuggers
Mine all the above were messy. I did the same and it worked.
May be you have to install another server on your computer, so it conflict with IIS server. You have to change another server port address or remove from your computer.
Simple steps to solve this error!!
Make sure the following things are intact:
Check if your application pool is stopped. If so, start it.
Also make sure the framework of the pool matches with that of your application.
Virtual directories in IIS need to bear the same name as its
original application directory
Clear Temp files, Temp ASP files, delete the worker process of the application and restart your IIS.
Here's a link that will help you setup ASP.Net 1.1 and its requisites, in case, the above didn't help you.
How to setup asp.net v1.1
How can I setup IIS 5.1 in Visual Studio 2008 as my web development server? I'm using Win XP, and I was using Cassini, but I want to give a tray to IIS instead of.
Go into Control Panel -> add remove programs -> enable / disable windows features, find IIS and install it.
Go to Start -> Accessories -> Administrative tools -> IIS Manager
Right click websites, add a new website, point the home directory to the root of your site.
Open up localhost
????
Profit!
You might have to attach Visual Studio to the ASP.NET worker process to debug.
It's in the web project's property pages, under Web->Servers->"Use local IIS web server"
To attach Visual Studio to the ASP.NET worker proccess to debug go to menu Tools\Attach to Proccess or press CTRL + ALT + P and select aspnet_wp.exe or w3wp.exe.
More information here.
To develop Website using Visual developer 2008 with IIS instead of "ASP.NET Development Server", In the new website window under "Location" click on "Browse" to see the different Server options including IIS Server. User can select the server as IIS server instead of "File System", then the "Location" option will be "HTTP" instead of "File System".
In Visual developer 2008 under Properties->Start Option->Server->"Use local IIS server" option is not shown, Even though IIS server was installed and configured successfully. the only options shown are "use default server" and " Use custom server with base URL".
So in Visual developer 2008 to run on IIS server(If IIS server is installed), Need do the following:
New Website -> Under Locations Click on "Browse" -> Click on "Local IIS" and then select the "IIS Virtual Directory"(IIS vitual Directory which is directory created by the user while configuring IIS server) -> Open
While Running/debugging, the server which you selected while creating the website, the same server will used to open the website, that is while creating the website if you selected "IIS Server" then the website will be opened though IIS server.
One more thing is, while installing Visual developer 2008 and IIS server, If you installed IIS server after installing Visual studio then you need to do the following before creating new website:
Run ->cmd press enter (then enter the following Command)-> C:\WINDOWS\Microsoft.NET\Framework\Version# aspnet_regiis -i press Enter then you get message after 3 seconds "ASP.net was installed successfully".
(*Version# will be v2.0.50727 in most cases)
Before everthing make sure you have installed and configured IIS server. To know how to install and configure IIS server check the following Link:
http://chalaki.com/install-iis6-windows-xp-professional-sp3-setup-run-csharp-cgi/425/
Hope this helps.
I want to make sure my local is matching the production environment closely and that means running IIS and not the ASP.NET development server that comes with Visual Web Developer express edition. What is the best way to do this?
In Visual Studio you right-click the project, select Properties then Web and change it to use Local IIS. It seems the process is similar for VWD, but there there is a Properties node you open instead. I don't have VWD installed right now so can't check to see if this method is indeed accurate but the article is recent so I assume that it is.
First make sure you have installed and configured IIS server. To check whether IIS server is installed: Run->inetmgr press enter.
To know how to install and configure IIS server check the following Link:
http://chalaki.com/install-iis6-windows-xp-professional-sp3-setup-run-csharp-cgi/425/
To develop Website using Visual developer 2008 with IIS instead of "ASP.NET Development Server", In the new website window under "Location" click on "Browse" to see the different Server options including IIS Server. User can select the server as IIS server instead of "File System", then the "Location" option will be "HTTP" instead of "File System".
In Visual developer 2008 under Properties->Start Option->Server->"Use local IIS server" option is not shown, Even though IIS server was installed and configured successfully. the only options shown are "use default server" and " Use custom server with base URL".
So in Visual developer 2008 to run on IIS server(If IIS server is installed), Need do the following:
New Website -> Under Locations Click on "Browse" -> Click on "Local IIS" and then select the "IIS Virtual Directory"(IIS vitual Directory which is directory created by the user while configuring IIS server) -> Open
While Running/debugging, the server which you selected while creating the website, the same server will used to open the website, that is while creating the website if you selected "IIS Server" then the website will be opened though IIS server.
One more thing is, while installing Visual developer 2008 and IIS server, If you installed IIS server after installing Visual studio then you need to do the following before creating new website:
Run ->cmd press enter (then enter the following Command)-> C:\WINDOWS\Microsoft.NET\Framework\Version aspnet_regiis -i press Enter then you get message after 3 seconds "ASP.net was installed successfully".
(*Version will be v2.0.50727 in most cases)