title: MOSS 2007 Custom application page working on IP but not on Intranet and Internet URL
body: <p>I have implemented a custom application page on MOSS 2007 site. I have put the VS folder in layouts and did all the necessary changes in web.config and gac. The custom application page is working smoothly using IP address </p>
  
  <p>e.g.:<code>(http://)IP:portnumber/_layouts/Applicationfolder/page.aspx</code>. </p>
  
  <p>But as soon as i try using the Intranet or internet url e.g.: /abc/_layouts/Applicationfolder/page.aspx or <a href="http://abc.orgname.com/_layouts/Applicationfolder/page.aspx" rel="nofollow">http://abc.orgname.com/_layouts/Applicationfolder/page.aspx</a>. I get the below error. Please help me..</p>
  
  <pre><code>Cannot complete this action.
  Please try again.   at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWebInternal(String bstrUrl, Guid&amp; pguidID, String&amp; pbstrRequestAccessEmail, UInt32&amp; pwebVersion, String&amp; pbstrServerRelativeUrl, UInt32&amp; pnLanguage, UInt32&amp; pnLocale, String&amp; pbstrDefaultTheme, String&amp; pbstrDefaultThemeCSSUrl, String&amp; pbstrAlternateCSSUrl, String&amp; pbstrCustomizedCssFileList, String&amp; pbstrCustomJSUrl, String&amp; pbstrAlternateHeaderUrl, String&amp; pbstrMasterUrl, String&amp; pbstrCustomMasterUrl, String&amp; pbstrSiteLogoUrl, String&amp; pbstrSiteLogoDescription, Object&amp; pvarUser, Boolean&amp; pvarIsAuditor, Int32&amp; plSiteFlags) 
     at Microsoft.SharePoint.Library.SPRequest.OpenWebInternal(String bstrUrl, Guid&amp; pguidID, String&amp; pbstrRequestAccessEmail, UInt32&amp; pwebVersion, String&amp; pbstrServerRelativeUrl, UInt32&amp; pnLanguage, UInt32&amp; pnLocale, String&amp; pbstrDefaultTheme, String&amp; pbstrDefaultThemeCSSUrl, String&amp; pbstrAlternateCSSUrl, String&amp; pbstrCustomizedCssFileList, String&amp; pbstrCustomJSUrl, String&amp; pbstrAlternateHeaderUrl, String&amp; pbstrMasterUrl, String&amp; pbstrCustomMasterUrl, String&amp; pbstrSiteLogoUrl, String&amp; pbstrSiteLogoDescription, Object&amp; pvarUser, Boolean&amp; pvarIsAuditor, Int32&amp; plSiteFlags)
  </code></pre>
  
  <p>I faced the above error after deploying and I followed below solution given in link:<br>
  <a href="http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/602705ce-08a3-41af-a6fe-b1472b048532" rel="nofollow">http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/602705ce-08a3-41af-a6fe-b1472b048532</a></p>
  
  <p>But now the Application page is working only on IP and throwing above error on Intranet and Internet URL.
  I have also checked the Alternate access mapping. As it is production and the rest of the sites are working fine with both IP and URL.
  I think it might be some configuration or ASP.net Authentication issue. I may be wrong. Just a guess.</p>
  
  <p>Any help will be appreciated.</p>