ASP.NET project not building in my Testing machine - c#

I have a running project that I need to modify. I am trying to load the whole project into my Visual Studio 15 CE for modifying. I have got the whole list of files in my Solution explorer and then also the database in SQL manager. When I click execute, it gives an error list! Here is the image. enter image description here
Then In the Browser, I get this message:
HTTP Error 500.24 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
Most likely causes:
system.web/identity#impersonate is set to true.
Things you can try:
If the application supports it, disable client impersonation.
If you are certain that it is OK to ignore this error, it can be disabled by setting system.webServer/validation#validateIntegratedModeConfiguration to false.
Detailed Error Information:
Module ConfigurationValidationModule
Notification BeginRequest
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:55014 /fanKc9TuE6zuHQVMTPwHWVIHJCM.html
Physical Path H:\Quoting system files\MGF_LIVE_BACKUP\fanKc9TuE6zuHQVMTPwHWVIHJCM.html
Logon Method Not yet determined
Logon User Not yet determined
Request Tracing Directory D:\Old folders\Documents\IISExpress \TraceLogFiles\MGF_LIVE_BACKUP

This is an application Pool setting issue..
Try going into IIS and changing the app pool for your application to use classic mode instead of integreted mode.
Alternatively you can add this to your Web.Config:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>

Related

HTTP Error 403.14 - Forbidden with Debug of ASP.NET Web Application

I'm trying to start ASP.NET Web Application
but I got this error with debug:
HTTP Error 403.14 - Forbidden The Web server is configured to not list
the contents of this directory.
Module
   DirectoryListingModule
Notification
   ExecuteRequestHandler
Handler
   StaticFile
Error Code
   0x00000000
Not sure if it exactly what I have to do, but as it shown, I must follow this instruction but when I'm trying to open IIS Manager on Windows 10, it says that the Windows cannot find 'inetmgr'.or 'inetmgr.exe'
So not sure what I have to do to figure out with this error.
Since it doesn't seem like you have the full IIS installed, try adding this into your web.config that lies within the directory you want to browse:
<system.webServer>
<directoryBrowse enabled="true"/>
</system.webServer>
...at least so you can get past this problem. If you're doing this for debugging, fine, but you have to seriously consider whether this is really what you want to allow on a production server.

Seeing a generic 500 internal error, how to view detailed error?

On my production server, I just deployed a asp.net web application.
I am seeing a generic '500 internal server error'.
How can I view a detailed error temporarily until I fix the problem?
I already have:
<customErrors mode="Off" defaultRedirect="error.aspx"/>
<customErrors mode="Off" /> is usually enough. But if you have messed up with some IIS configuration it won't even reach your web.config which might explain why you are seeing this generic 500 error message. Take a look at the Event Log (eventvwr.msc) of the server which might contain additional information about the error. There could really be lots of possible reasons (.NET framework misconfiguration, application pool or virtual directory misconfiguration, missing access rights to some folders, ...)
That's the reason why you should have a staging server which has the same configuration as your production server - it would allow you to test your configuration before shipping.
Change IIS Error Pages feature settings to "Detailed errors" or try to run the app from the server where it's deployed.
If the error page is coming from IIS because of some configuration being incorrect, you can try using Failed Request Tracing.

StaticCompressionModule and DynamicCompressionModule on 32bit IIS and 64bit Windows

I want to host a 32bit application in IIS 7 on 64 bit Windows 2008. When I visit the site with the default modules enabled I get this 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: DynamicCompressionModule
Notification: SendResponse
Handler: StaticFile
Error Code: 0x8007007e
If I remove the StaticCompressionModule and DynamicCompressionModule the site works.
Can I get it working without having to disable these modules?
Microsoft KB says
This problem occurs because the ApplicationHost.config file or the Web.config file references a module or a DLL that is invalid or that does not exist.
Try enabling 32bit application in Application Pool configuration
EDIT:
Found the folowing
For above specific error (mentioned in this example), DynamicCompressionModule module is causing the trouble. This is because of the XPress compression scheme module (suscomp.dll) which gets installed with WSUS. Since Compression schemes are defined globally and try to load in every application Pool, it will result in this error when 64bit version of suscomp.dll attempts to load in an application pool which is running in 32bit mode.
This module entry looks like:
Hence to get rid of this problem:
Ø Remove/Disable the XPress compression scheme from the configuration using the command below:
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name='xpress']
OR
Ø Use a 32bit version of suscomp.dll
In the end I couldn't get it to work without disabling these two modules. It's worth noting that if you're using Visual Studio to deploy your application to an IIS server, your applications config is going to overwrite what is on the server and thus, reenable the two modules. You need to disable the modules in your config file.

launching a web service (.asmx) in a IIS 6.0

I have developed a web service with the .asmx extension using C# and i want to deploy this into my VPS which has Windows Server 2003 with IIS 6.
Service is running with Framework 4.0 and it's installed in the VPS also. When I upload the precompiled version into the VPS it shows a runtime error
Server Error in '/' Application.
Runtime Error
Description: An application error
occurred on the server. The current
custom error settings for this
application prevent the details of the
application error from being viewed
remotely (for security reasons). It
could, however, be viewed by browsers
running on the local server machine.
Details: To enable the details of this
specific error message to be viewable
on remote machines, please create a
<customErrors> tag within a
"web.config" configuration file
located in the root directory of the
current web application. This
tag should then have
its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are
seeing can be replaced by a custom
error page by modifying the
"defaultRedirect" attribute of the
application's <customErrors>
configuration tag to point to a custom
error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
can anyone help me on this?
Update
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to >service this request. Please review the specific error details below and modify your >configuration file appropriately.
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names >are case-sensitive.
Source Error:
Line 26:
Line 27:
Line 28:
Line 29:
Line 30: Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Source File: C:\Inetpub\vhosts\akashvahini.com\httpdocs\web.config
Line: 28
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET >Version:2.0.50727.3053
this is the new error message after enabling debugging in the web.config
You should enable debugging to diagnose the problem.
Microsoft has a very detailed explanation on how to enable detailed debugging over here.
Server Error in '/' Application.
That error is too generic, check the output after you enabled debugging and post the results.
And don't forget to disable debugging after your site goes live.
Update:
Seems to be permission related:
http://forums.iis.net/p/1042369/1454379.aspx
The ASPNET user account needs permissions for the folder that contains your asmx service.
Update2:
You can give the ASPNET user permissions using the file system permission dialog:
http://www.asp.net/learn/whitepapers/denied-access-to-iis-directories
Might look different on newer versions of Windows.
From my experience "Server Application Unavailable" means that you have got web sites that use different versions of .net in the same application pool.
the site that hosts your webservice needs to be in an app pool that only has .net 4.0 web sites. The application pool is configured on the Home Directory tab in the web site properties.
Looks to me like the application pool is trying to run two difference versions on .net.
Make a new application pool and call it something like .Net4 and then move the new site across to use this app pool and everything should work.
This error is shown by
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET >Version:2.0.50727.3053
Where the site with a .asmx should say .Microsoft .NET Framework Version:4.0 etc...

Problem with getting custom errors to display on IIS7

We're running a site built in EPiServer (CMS5 R2, latest version) and ASP.NET 3.5 that's running on IIS7, we've built a custom error handler that utilizes the URLRewriter-functionality of EPiServer to handle 404 and 301 status codes, everything works locally (Windows 7 + IIS7.5) but we just can not get the 404 pages to work on the live server (Windows 2008 Server + IIS7). The 301-redirects work but for the 404-page we just get the default IIS7 message:
iis7 default 404 message http://episerversucks.com/upload/iis7_error.png
The handler is obviously getting fired since the pre-defined 301-redirects work (URLs from an old site that we need to redirect to the new site), but for the 404 IIS7 just replaces them with it's default message.
The 404 handler works in such a way that is does an internal redirect to a page /Pages/Error404.aspx that display a nice customized 404-page in an appropriate language and sets it's own status code to 404 through Response.StatusCode = 404; I got the tip from a site to change TrySkipIisCustomErrors variable to true, i.e. Response.TrySkipIisCustomErrors = true;but that didn't help either.
The only configuration difference I've found between the local dev machines and the server is that the local machines have a configuration setting called ".NET Error Pages" and a setting called just "Error Pages", while the live server only has the setting called "Error Pages" and is missing the .NET Error pages ones, but I've found no way to add the .NET Error Pages config dialog to the server, is it IIS7.5 specific?
I've been digging my way through this for the better part of a day and just can not find a solution that seems to work, so I turn here.
Edit: The local dev version and the live version have identical web.config's, settings, etc. (except for the database connection string obviously)
Ok so I solved it, the problem was setting the errorMode to "Detailed."
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
</configuration>
If it's on Custom the IIS7-error handler intercepts all pages that return 404 and switches the response out.

Categories

Resources