ASP to ASP.NET Migration Tool - URI Problem

R

rob

Dear All,

I have a very small test project to convert asp to asp.net using the
Microsoft/Artisan ASP to ASP.NET Migration Assistant
(http://msdn.microsoft.com/asp.net/using/migrating/aspmig/aspmigasst/default
..aspx). Everything works fine when my include file is in the same directory
as the asp file that includes the include file. What I am having trouble
with is that the migration tool doesn't see my include file when it resids
in a seperate directory. I assume that step #5 of the migration tool
(Specify URI Addresses) should do the trick but no matter what I try it
doesn't work, i.e. http://localhost/ASP2ASPNET/inc,
d://MyProject/ASP2ASPNET/inc, d://MyProject/ASP2ASPNET/inc/test.inc.

Here are my two test files:

d://MyProject/ASP2ASPNET/test.asp:
<HTML>
<HEAD>
<!-- #INCLUDE VIRTUAL="/ASP2ASPNET/inc/test.inc"-->
</HEAD>
<BODY>
<%
setX "Hello World"
Response.Write x
%>
</BODY>
</HTML>

d://MyProject/ASP2ASPNET/inc/test.inc:
<%
Dim x
Sub setX(newValue)
x = newValue
End Sub
%>
<script language="VB" runat="Server">
Dim x As Object
Dim setX() As Object

Here is the output file aspx.net that I get including the error message.
</script>
<HTML>
<HEAD>
<%'UPGRADE_NOTE: Language element '#INCLUDE' was migrated to the same
language element but still may have a different behavior. Copy this link in
your browser for more: ms-its:C:\Program Files\ASP to ASP.NET Migration
Assistant\AspToAspNet.chm::/1011.htm %>
<%'UPGRADE_NOTE: The file '/ASP2ASPX/inc/test.inc' was not found in the
migration directory. Copy this link in your browser for more:
ms-its:C:\Program Files\ASP to ASP.NET Migration
Assistant\AspToAspNet.chm::/1003.htm %>
<!-- #INCLUDE VIRTUAL="/ASP2ASPX/inc/test.inc" -->
</HEAD>
<BODY>
<%
setX(CInt("Hello World"))
Response.Write(x)
%>
</BODY>
</HTML>


Any input is highly appreciated.

Rob

BTW, I know I should not use includes and I know for the simple example
above I could just copy the include into the main directory. Nevertheless,
what I am working on is a bit more complex and the above is just a test
project that represents the problem I have with the big app.
 
C

Cowboy

I am not sure how to solve this problem, but I will add my two cents to the
process:

Migration, at least normally, is a tenuous process at best. Generally, using
the migration tools allows you to get your application into the .NET world,
where you can alter pages to fit the .NET model. I have yet to see a
migration tool that works well enough I would state the application was
production ready (esp. long-term) right after migration. In most cases I
have seen, you end up rewriting the application before moving to production.
In some cases, the migration tools give a false sense of security that
convinces users it is okay to deploy this "inferior" ASP.NET code.

Apologies for spouting off, but I have yet to see a case in which I truly
saw migration as the correct option (over rewrite). It may save you some
time, but you will likely end up rewriting a lot of code anyway.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top