Cannot debug ASP website on IIS 6.1 - visual-studio-2010

I am new to our company and just trying to set up my workstation. We have an ASP website I am trying to debug in Visual Studio 2010. In the "Web" section of the project properties we have the "Use Local IIS Web server" option selected, however when I try to debug the page I'm working on I get the error "Unable to start debugging on the web server. See help for common configuration errors." I can see the site in IIS (Under Sites -> Default Web Site -> SiteImWorkingOn), and both IIS and the VS project are using .NET 4.0. Any suggestions?
EDIT: I should mention that I've run the "aspnet regiis -i" command in the command prompt to make sure IIS was running .NET 4.0
SECOND EDIT: I found that ASP.NET was not turned on, after doing this I am getting the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x8007000d
Config Error
Config File \\?\C:\Projects\sym_Periscope_NEAL\Periscope\Web\web.config
Requested URL http://localhost:80/Periscope/Pages/Dist.aspx
Physical Path C:\Projects\sym_Periscope_NEAL\Periscope\Web\Pages\Dist.aspx
Logon Method Not yet determined
Logon User Not yet determined

Related

ASP.NET Core 3.1 Web API HTTP error 500 in production

I have an ASP.NET Core 3.1 Web API and it has worked so far. I had to modify the CORS setting in Start.cs and after that it gives HTTP 500 error in production IIS.
It works correctly when I run it in the Visual Studio even though if I run it on the server with double clicks.
Unfortunattelly IIS log doesn't contain any information about error.
I have no idea why this error occurs.
I over copied web.config and I forgot to overwrite modules="AspNetCoreModuleV2" to modules="AspNetCoreModule".
Sorry.

Issue in deploying website with .srf files on IIS

I am facing an issue in deploying website with .srf files on IIS. Getting an isapi module error. Installed asp.net, extensibility, CGI and ISAPI restrictions as required.
HTTP Error 500.0 - Internal Server Error
There is a problem with the resource you are looking for, so it cannot be displayed.
Most likely causes:
• The path to the ISAPI Filter is incorrect.
• IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.
• IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.
• IIS was not able to process configuration for the Web site or application.
• The authenticated user does not have permission to use this DLL.
Detailed Error Information:
Module: IsapiModule
Notification: ExecuteRequestHandler
Handler : TestRemote
Error Code: 0x8007007e
Requested URL: http://localhost:80/TestRemote/Banner.srf
Physical Path D:\wwwroot\Test\TestRemote\Banner.srf
Logon Method Anonymous
Logon User Anonymous
According to your description and error message, it seems there are something wrong about creating mapping for the .srf file.
I suggest you could try to follow below steps to re-add the mapping for mapping between files with the .srf and .dll extensions and the new ISAPI extension DLL.
Steps as below:
1.Generate an ATL Server ISAPI extension DLL using the ATL Server Project Wizard.
2.Build the ISAPI extension DLL and copy it to your Web server.
3.Create a mapping between files with the .srf and .dll extensions and the new ISAPI extension DLL.
For example:
(1)Run Internet Services Manager.
(2)Right-click the appropriate Web site or virtual directory in the tree and click Properties on the shortcut menu.
(3)Click the Home Directory or Virtual Directory property page.
(4)Click the Configuration button.
(5)Click the App Mappings property page.
(6)Click Add.
(7)Enter the path to your ISAPI DLL in the Executable text box.
(8)Enter .srf in the Extension text box.
(9)Click OK.
(10)Click Add.
(11)Enter the path to your ISAPI DLL in the Executable text box.
(12)Click .dll in the Extension text box.
(13)Click OK until all dialog boxes are accepted.

WCF not working when debugging in visual studio but works in IE

I have a WCF that is hosted in an ASP.NET application. Suddenly, the WCF service has stopped working when i debug it in visual studio 2010. When i try to access the service, it throws the below exception.
CommunicationException was unhandled by user code. The remote server returned an error: NotFound
I have WCF tracing enabled but no errors are being logged.
The strange bit is that if i deploy the code to my QA server and access the application, the service works fine, so the code looks like not the problem.
If i also get the source code currently running in production successfully & try debugging it in my dev environment, it fails with the same error i mention above.
Any one have an idea what could be messed up in my dev environment?. I have tried both IE, Firefox & Chrome & the results are the same.
I after a very long debugging involving deleting Bin & obj folders and lots of rebuilds, i finally got this WCF service working again.
First, i suspected the service could be corrupted somehow, so i tried to update the service reference in my silverlight application but was bumped with the following error.
There was an error downloading 'http://localhost/mySite/Webservice/GetData.svc'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost/mySite/Webservice/GetData.svc'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
I then browsed to the physical folder path to confirm if really my .svc file was there and indeed as expected, the file was there.
Trying to Browse to the path http://localhost/mySite/Webservice/GetData.svc in my browser bumped me with another error below.
HTTP Error 404.7 - Not Found The request filtering module is
configured to deny the file extension.
Most likely causes: Request filtering is configured for the Web server
and the file extension for this request is explicitly denied.
This made me start thinking that suddenly, IIS 7.0 has decided to block access to my .svc files.
I then added fileExtension=".svc" mimeType="application/octet-stream" to IIS, restart IIS but got the same error.
I then read on some blog i cant remember about adding <add fileExtension=".svc" allowed="true" /> under <requestFiltering> tag in file applicationHost.config located at C:\Windows\System32\inetsrv\Config, still nothing changed. Tried adding <mimeMap fileExtension=".svc" mimeType="application/octet-stream" /> under serverSideInclude in the same file, again with no luck.
Tried this http://www.adamwlewis.com/articles/iis-7-not-serving-files-4047-error still with no luck.
The following 2 steps are i think what resolved the issue.
I added a mapping for the SVC extension to ASP.NET by running ServiceModelReg.exe -i from C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation
Browsed to my .svc file in the browser and this time it looked like i had made some progress but still, i had one more error to overcome . The is bellow.
Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
I resolved the above error by registering the correct version of ASP.NET using the ASP.NET IIS Registration Tool (aspnet_regiis.exe,) as described in the link below
https://msdn.microsoft.com/en-us/library/hh169179(v=nav.70).aspx
At this point my service was back to normal as it had always been. I still haven't figured out what messed up my development machine.

allowDefinition='MachineToApplication' - MVC3 ERROR

I'm developing an application in MVC3 (http://www.colombiatrolley.com/sitrolley). In my computer it runs correctly, but when I upload it to the server (a hosting service) I get this error:
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
I know it is a very common error but I have not fixed it yet.
Some config sections are only allowed at the "root" of the application, then authentication section is one of them.
You need to configure IIS to run your your site as an application, not a sub-directory in an existing application.
For IIS 7+, right click the directory that contains your web application, and select "Convert to Application".
EDIT:
Arie van Someren is right. Looking carefully at your error, you want the <authentication> configuration to be in the web.config one level up, not the web.config in Views.
I had the same problem. I solved it by deleting the obj folder that appeared after doing a "Build > Publish".

Getting a 404 when using .NET 4 on IIS 6, with or without MVC

I've completed this set up on a fair few IIS 6 boxes, but one is giving me a tough time.
The problem occurs when I add the application extension mapping to:
c:\windows\microsoft.net\framework\v4.0.21006\aspnet_isapi.dll
When this is in place, I get a 404 error on every request.
Even if I remove all files from the application directory apart from a basic test.htm and navigate to that, I still get a 404.
I've unchecked the "Verify that file exists"
I've set up a .NET 4 application pool and pointed my application to that
I've changed the ASP.NET version to 4.0.21006
I've checked the IIS log file, and there's nothing useful in there (it only shows the first bunch of requests after each reboot and then stops logging)
I've checked the application event log and nothing gets reported
I've installed MVC 2
I've copied the set up onto another box, just to be sure, following all the same steps - and it all works!
What else can I look out for??
N.B:
If I set .NET to v2 in IIS, then I can successfully navigate to \test.htm
Go into Web Service Extensions in IIS and set ASP.NET 4.0 to Allowed instead of Prohibited.
Like this:
BTW: This happened to me in the RTM version of .net 4 as well, so it's not just the betas.

Resources