title: Classic asp "An error occurred when verifying security for the message." iis7 transport level security
body: <p>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.</p>
  
  <p>When using a browser to load the service reference i can loading the svcutil.exe ... WDSL page.</p>
  
  <p>When using my test asp page to call a web method from this reference i get the following returned:</p>
  
  <p>Finished calling Web Service.
  Status = Internal Server Error
  ResponseText = a:InvalidSecurityAn error occurred when verifying security for the message.</p>
  
  <p>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.</p>
  
  <p>The API was recently migrated , it would appear something has not been setup correctly but i am at a loss to explain what.</p>
  
  <p>I can browse to the svcutil.exe ... WDSL service reference,  when selecting it via the browser i get the expect XML response. </p>
  
  <p>The USER NAME and password utilised work when using the non-classic asp publicaiton of the API using the message based secuirty.</p>
  
  <p>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 ?</p>
  
  <p>Thank you
  Scott</p>
  
  <p>EDITED TO ADD THE FOLLOWING UPDATE:</p>
  
  <p>Attempted to use the Default App Pool and a new App Pool but same problem persists.</p>
  
  <p>My test page error: ResponseText = a:InvalidSecurityAn error occurred when verifying security for the message.</p>
  
  <p>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)</p>
  
  <p>note: virtual dir defined on TRANSPORT and V3. V3 works ok using .net as opposed to classic asp to authenticate.</p>
  
  <p>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.</p>
  
  <p>This reference appears to suggest a fix but many of the DIR paths and references in "appcmd" dont exist.</p>
  
  <p>_http://theether.net/kb/100127</p>