After following all the steps related to integration of tomcat7 and IIS7 i am getting below error.Any idea what might be the cause?First time when I did all the steps as mentioned in tutorial my site was coming up then suddenly it stop coming up.Again i removed my site from IIS and followed the steps but then every time below error is coming:-
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred. Detailed Error Information
Module IsapiFilterModule
Notification AuthenticateRequest
Handler StaticFile
Error Code 0x80070001
Physical Path D:\New\IISROOT
Logon Method Anonymous
Logon User Anonymous
Failed Request Tracing Log Directory D:\New\Tomcat\logs
I have checked the logs but trace log is not created as well as isapi_redirect.logs
I have followed the below steps:
1.created the two files workers.properties and uriworkermap.properties in tomcat\conf
-In workers.properties i added the below information
worker.list=mysite worker.mysite.host=localhost worker.mysite.port=8009 worker.mysite.type=ajp13
-In uriworkermap.properties i added the below information
/mysite/*=mysiteworker
2.Created isapi-rediect.properties in Tomcat\bin
extension_uri=/jakarta/isapi_redirect.dll log_file=D:\DLNew\Tomcat\logs\isapi_redirect.log log_level=debug worker_file=C:\Tomcat\conf\workers.properties worker_mount_file=c:\Tomcat\conf\uriworkermap.properties
3.Add ISAPI Filter
In AddIsapi Filter dialog box i have given filtername as jakarta and Executable path as c:\Tomcat\bin\isapi\isapi-redirect.dll
2.Add Virtual Directory
In Add VirtualDirectory Dialog box i have given Alias as jakarta and PhysicalPath as c:\Tomcat\bin\isapi
3.selected jakarta virtual directory in connections panel -Double-click the 'Handler Mappings' icon in 'Features View'. -Click the 'Edit Feature Permissions' link in the 'Actions' panel. -Ensure that the 'Execute' option is selected.
4.Register the ISAPI Extension In ISAPI OR CGI restriction Dialog box i have given ISAPI or CGI path as c:\Tomcat\bin\isapi\isapi-redirect.dll and description as jakarta and i enabled the checkbox of allow extension path to execute
I am able to access the application through Tomcat by using the url as:http://localhost:80/mysite
But application is not comming up through IIS: i am getting below exception in browser
HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred. Detailed Error Information Module IsapiFilterModule Notification AuthenticateRequest Handler StaticFile Error Code 0x80070001 Physical Path D:\New\IISROOT Logon Method Anonymous Logon User Anonymous Failed Request Tracing Log Directory c:Tomcat\logs
Related
I have a Spring-boot web app that uses SAML authentication provided by https://samltest.id/ .
It works fine on localhost but now I'm trying to put it on a server that has Nginx. Ngnix is configured so that any http request is redirected to https and https://myserver.company.com/myApp/ is sent to http://local_ip:local_port/ .
This cfg works fine if the application has no security but with SAML the result is: when I access the home page of the app I'm redirected to the login page (correct) and after successful login I'm redirected to https://myserver.company.com/saml/SSO/ instead of https://myserver.company.com/myApp/saml/SSO so Nginx gives a 404.
The metadata.xml contains:
<md:AssertionConsumerService Location="http://myserver.company.com:80/saml/SSO"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" isDefault="true" index="0"/>
<md:AssertionConsumerService Location="http://myserver.company.com:80/saml/SSO"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" index="1"/>
Note that URLs are http-based.
After a lot of Google search I have tried the following: I modified SAMLProcessingFilter configuration so that filterProcessesUrl property is "/myApp/saml/SSO" instead of the default value "/saml/SSO".
Now the metadata.xml contains:
<md:AssertionConsumerService Location="http://myserver.company.com:80/myApp/saml/SSO"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" isDefault="true" index="0"/>
<md:AssertionConsumerService Location="http://myserver.company.com:80/myApp/saml/SSO"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" index="1"/>
and after login I'm redirected to https://myserver.company.com/myApp/saml/SSO but this time I get a 404 from the web application instead of Nginx (the error page is different).
What am I missing?
UPDATE: the 3rd attempt
Restored SAMLProcessingFilter cfg to its default,
modified the context root of my app to be http://local_ip:local_port/myApp ,
modified Nginx cfg so that https://myserver.company.com/myApp/ maps
to http://local_ip:local_port/myApp (same context root),
set entityBaseURL property of MetadataGenerator to https://myserver.company.com/myApp ,
uploaded the new metadata.xml to https://samltest.id/ (now it contains https URLs).
Now, after a successful login I'm redirected to https://myserver.company.com/myApp/saml/SSO as expected but I get a 401 from the application with message "Authentication Failed: Incoming SAML message is invalid" and in the application log there is "org.opensaml.common.SAMLException: Unsupported request".
After several attempts I have found the solution.
No need to modify SAMLProcessingFilter or the context root. The key is to use SAMLContextProviderLB instead of SAMLContextProviderImpl as described in the chapter "Advanced configuration" of the manual. Also the entityBaseURL change already described in my question is necessary (it is in the manual too).
I'm trying to debug an error in an ASP.Net 3.5 application. We recently moved the application from IIS6 to 7. In IIS6, code like this:
Throw new Exception("My message")
Would display a page giving the error message, nearby lines of code, and a stack trace (using "debug" compilation mode and no custom errors).
In IIS7, the "detailed" error message gives only the module and error code:
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
Detailed Error Information
Module global.asax
Notification BeginRequest
Handler StaticFile
Error Code 0x00000000
Requested URL [My URL]
Physical Path [My Path]
Logon Method Not yet determined
Logon User Not yet determined
Failed Request Tracing Log Directory [My Directory]
I even set up Failed Request Tracing, which purports to give a stack trace but which still doesn't give me any line numbers or error messages, only the module name and HTTP status.
No. 111.
Severity Warning
Event -MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName global.asax
Notification 1
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 0
ErrorCode 0
ConfigExceptionInfo
Notification BEGIN_REQUEST
ErrorCode The operation completed successfully. (0x0)
How can I get the information I was getting in IIS6? I already know the error is in global.asax, I need a line number and a specific error message.
Also, I'm not sure if this is related but the site is precompiled and aspnet_compiler.exe apparently sets the web.config "debug" switch to false when it compiles (even with the "-d" option). My machine.config has no "deployment" tag. I just set "debug" back to true and recycle after compiling, which I assume would put the site back in debug mode, right?
There is a setting in the error page config that tells IIS the level of detail information to show for local and remote requests. You might want to verify this is configured correctly. To access this setting launch the Internet Information Services Manager and go to
Site Home\Error Pages\Edit Feature Settings
Make sure you disable this setting in production
On II7 we host a WCF/asp.net based API. In order to allow users of a classic asp application to connect to the API we had to publish a version we refer to as "transport". This Transport version is written in asp.net too, it points to the same assembly , its just the security layer is different to allow classic asp to authenticate. Transport level security is used as opposed to message based security.
When using a browser to load the service reference i can loading the svcutil.exe ... WDSL page.
When using my test asp page to call a web method from this reference i get the following returned:
Finished calling Web Service.
Status = Internal Server Error
ResponseText = a:InvalidSecurityAn error occurred when verifying security for the message.
This suggests that the authentication is failing. When testing using asp.net or the application WCF storm to contact the normal API everything works well.
The API was recently migrated , it would appear something has not been setup correctly but i am at a loss to explain what.
I can browse to the svcutil.exe ... WDSL service reference, when selecting it via the browser i get the expect XML response.
The USER NAME and password utilised work when using the non-classic asp publicaiton of the API using the message based secuirty.
Would it be possible to post some troubleshooting tip that may help diagnoise the issue please specifically regarding transport level security fault finding and setup ?
Thank you
Scott
EDITED TO ADD THE FOLLOWING UPDATE:
Attempted to use the Default App Pool and a new App Pool but same problem persists.
My test page error: ResponseText = a:InvalidSecurityAn error occurred when verifying security for the message.
IIS LOG shows:
v3/transport/testclassicasptransportwcfservice.asp ( 200 0 0 ) (i.e iis 200)
/V3/Transport/DeviceService.svc/DeviceService (500 0 0) (i.e iis error 500)
note: virtual dir defined on TRANSPORT and V3. V3 works ok using .net as opposed to classic asp to authenticate.
EVENT LOG:
The Template Persistent Cache initialization failed for Application Pool 'transport' because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes.
This reference appears to suggest a fix but many of the DIR paths and references in "appcmd" dont exist.
_http://theether.net/kb/100127
REF http://theether.net/kb/100127
load cmd prompt
CD to C:\Windows\System32\inetsrv
enter: appcmd list config -section:system.webServer/asp
the following path is displayed: c:\inetpub\conf\temp\ASP compiled templates
check path exists (it does)
Check if the NETWORK SERVICE has permissions to access "ASP compiled templates" If not from appcmd execute;
icacls "c:\inetpub\conf\temp\ASP Compiled Templates" /grant "NETWORK SERVICE:(OI)(CI)(M)"
should read "sucessfully processed 1 files"
restarted app pool.
THE "InvalidSecurityAn error occurred when verifying security for the message" problem still persists but the "COULD NOT CREATE A DISK CACHE SUB-DIRECORY .... " error from the eventlog is no longer occurring.
Sorry another update. The network service permission change DID NOT resolve the issue , changeing to the DEFAULT APP POOL solved the problem.
Got a lead at last. Examined:
ServiceSecurityAudit set in service behaviour. Ref http://intrepiddeveloper.wordpress.com/2008/08/07/security-event-logging-auditing/#
IIS logs (simply shows the non-specific error 500.)
Fault tracing enabled( also shows error 500).
Custom errors were off
Friendly IE messages were off
Asp client side and server side debugging on
ProcessMon running , no errors.
Web.config httpErrors errorMode="Detailed" /> +
ServiceSecurityAudit found me an "Object reference not set to an instance of an object" so sounds like our app has a bug.
Follow up (17/08/11):
Service Security Audit documented here:
http://intrepiddeveloper.wordpress.com/2008/08/07/security-event-logging-auditing/
Was the key for us to resolve this issue. Uncovered the Object Reference Error which indicated out Business Objects and Data Access dlls were out of alignment. Using CLASSIC ASP to contact the WCF.NET API using TRANSPORT AUTHENTICATION there was abolutely no indication of this error until Service Security Audit was enavled on the behaviour.config file in the WCF deployment.
When I start my website on local IIS server (on Windows 7) .. I get this error message
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Detailed Error Information
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:80/Default.aspx
Physical Path D:\مشروع الويب\comstorFinal\Default.aspx
Logon Method Anonymous
Logon User Anonymous
Looks like you don't have IIS7's ASP
feature installed.
To install it:
Start -> Run -> appwiz.cpl -> Turn
Windows features on or off -> Internet
Information Services -> World Wide Web
Services -> Application Development
Features -> ASP (check it and then
click OK)
I'm running IIS5.0 and I am trying to change the ASP.NET process account to my domain user account.
I have followed everything possible here.
When I browse the .svc file (this is a wcf service) I am getting this error:
Server Application Unavailable The
web application you are attempting to
access on this web server is currently
unavailable. Please hit the "Refresh"
button in your web browser to retry
your request.
Administrator Note: An error message
detailing the cause of this specific
request failure can be found in the
application event log of the web
server. Please review this log entry
to discover what caused this error to
occur.
Eventlog says:
aspnet_wp.exe could not be started.
The error code for the failure is
80070522. This error can be caused when the worker process account has
insufficient rights to read the .NET
Framework files. Please ensure that
the .NET Framework is correctly
installed and that the ACLs on the
installation directory allow access to
the configured account.
When I run the client, I get the following error:
The content type text/html;
charset=utf-8 of the response message
does not match the content type of the
binding (application/soap+xml;
charset=utf-8). If using a custom
encoder, be sure that the
IsContentTypeSupported method is
implemented properly. The first 872
bytes of the response were: '
From ASP.NET 2.0 onwards, the correct method to ensure that a user account has the correct rights to run as the worker process identity is to run this command:
aspnet_regiis -ga [account]
You need to run the aspnet_regiis command that matches the ASP.NET version you plan on running:
ASP.NET 2.0 -
%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ga [account]
ASP.NET 4.0 -
%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ga [account]
If you put your Domain Account under IIS_WPG group, it should ideally work. If it doesn't work, there is a sure shot way of fixing it.
In IIS 6... step 1 is applicable... since you are on IIS 5, ignore step 1
Run it with Local System to begin with. If the applications runs, it means your IIS is configured well and you can proceed with the step 2.
Change the account to your domain account, and ensure that you have put the account in IIS_WPG as well. After that, run the tool called Process Monitor http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Browse the application now. If you still get the error, switch to the Process Monitor and stop capture [menu option].
Search for Access denied and fix it. Link