Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to make Visual Studio 2005 to handle .asp files like .aspx

Reply
Thread Tools

How to make Visual Studio 2005 to handle .asp files like .aspx

 
 
Faustino Dina
Guest
Posts: n/a
 
      02-26-2009
Hi all,

I'm porting some old ASP code to ASP.NET. The problem I need to service a
request to an x.asp script that was originally developed in ASP VBScript
code. I need the new C# ASP.NET code to be inside x.asp. And I need this to
be debugged from Visual Studio 2005.
To do that I followed http://support.microsoft.com/kb/815172 to configure
IIS to map .asp to be processed by using .NET dll, and also modified the
web.config in my Visual Studio 2005 project by adding

<httpHandlers>
<add verb="GET, HEAD, POST, DEBUG" path="*.asp"
type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
But now on the x.asp script:

<%
//'dim id
//'session.Contents.RemoveAll()
Response.AddHeader("Pragma", "no-cache");
Response.AddHeader("cache-control","private");
Response.CacheControl = "no-cache";
session("giro")=Request.QueryString("gr");
response.write("&giro="&session("giro"));
%>

When it is called from the client, the iis server logs an 500 error. I put a
breakpoint in the code but it is not honored. Even I can not get a
compilation error from this file. I think Visual Studio does not recognizes
the association made in iis that .asp is now an alias of .aspx

What should I do work with the .asp files like .aspx in Visual Studio 2005?

Any hint is welcomed

Thanks in advance

Sammy


 
Reply With Quote
 
 
 
 
Faustino Dina
Guest
Posts: n/a
 
      02-26-2009
Well, from this source
(http://dotnetlog.com/archive/2007/10...h-asp.net.aspx)
I borrowed a few new lines for the web.config.
<buildProviders>

<add extension=".asp" type="System.Web.Compilation.PageBuildProvider"/>

</buildProviders>



This should be put inside <compilation > tag.



Now, when I run the project from inside VS, I receive compilation errors...
in the Event Viewer! At least it is a step forward. VS continues to ignore
the .asp source code despite I registered extension .asp to use C# in
Tools - Options - Text Editor - File Extension .



What am I missing?

Thanks in advance

Sammy

"Faustino Dina" <(E-Mail Removed)> escribió en el mensaje
news:ecX%(E-Mail Removed)...
> Hi all,
>
> I'm porting some old ASP code to ASP.NET. The problem I need to service a
> request to an x.asp script that was originally developed in ASP VBScript
> code. I need the new C# ASP.NET code to be inside x.asp. And I need this
> to be debugged from Visual Studio 2005.
> To do that I followed http://support.microsoft.com/kb/815172 to configure
> IIS to map .asp to be processed by using .NET dll, and also modified the
> web.config in my Visual Studio 2005 project by adding
>
> <httpHandlers>
> <add verb="GET, HEAD, POST, DEBUG" path="*.asp"
> type="System.Web.UI.PageHandlerFactory"/>
> </httpHandlers>
> But now on the x.asp script:
>
> <%
> //'dim id
> //'session.Contents.RemoveAll()
> Response.AddHeader("Pragma", "no-cache");
> Response.AddHeader("cache-control","private");
> Response.CacheControl = "no-cache";
> session("giro")=Request.QueryString("gr");
> response.write("&giro="&session("giro"));
> %>
>
> When it is called from the client, the iis server logs an 500 error. I put
> a breakpoint in the code but it is not honored. Even I can not get a
> compilation error from this file. I think Visual Studio does not
> recognizes the association made in iis that .asp is now an alias of .aspx
>
> What should I do work with the .asp files like .aspx in Visual Studio
> 2005?
>
> Any hint is welcomed
>
> Thanks in advance
>
> Sammy
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Enabling browser back button for GridView Paging and Sorting in Ajax1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008) anil reddy ASP .Net 0 02-11-2009 04:22 PM
Is Visual Studio 2005 complict with Visual Studio 2003 rockdale ASP .Net 1 08-23-2006 07:20 PM
Should I write Visual studio 2005 or Visual studio 2003 MCSD =?Utf-8?B?VmlqYXk=?= Microsoft Certification 14 06-30-2006 09:05 AM



Advertisments