I tried some work using http handler and found that we can not execute .asp files and took the httpmodule route.
I have http module on the virtual directory which is a dotnet application.Once the request comes to dotnet http module , i want to redirect to asp file which is the root folder based on some logic in .net.
I don’t want to use response.redirect here, that is the main thing
root/dotnetapplication.
dotnet application has the following code.
application.Context.RewritePath("http://localwww.test.com/main.asp", false);
This is throwing the following exception
'
http://locwww.test.com/main.asp' is not a valid virtual path.
[HttpException (0x80004005): 'http://locwww.allposters.com/main.asp' is not a valid virtual path.]
System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +8855691
System.Web.HttpContext.RewritePath(String path, Boolean rebaseClientPath) +116
ADC.Web.Code.ApcUrlRewriteModule.UrlRewriteModule_BeginRequest(Object sender, EventArgs e)
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Really appreciate your help.
.ASPis traditionally not a .NET application page unless you re-configured the.ASPextension.My guess is that you do not have
.ASPenabled and the server thinks “main.asp” is a virtual directory not a .ASP page:Enabling ASP Pages in IIS 6.0