Last post Feb 23, 2010 05:41 PM by jtheoph
Sep 15, 2006 05:23 AM|EdKaufmann|LINK
Why can't I use the ASP.NET WEB server to test using #include ?
<!-- #INCLUDE virtual="/MLMpath/..../sample.htm" -->
When searching the forums the only suggestion I find is: run it through IIS!
Yes, running it trough IE/IIS works! However, its very annoying always to do the 'build', go to the IE and test!?
What do I miss, what do I need to do to test using VS2005 F5!?
Thanks for any hints and your time, ed
Sep 15, 2006 08:40 AMemail@example.com|LINK
What you're missing is that the <!-- #INCLUDE --> directive is an ASP directive, not ASP.NET. The development server in Visual Studio doesn't serve ASP pages, just ASP.NET. You have to use a server that serves ASP, such as IIS.
Sep 15, 2006 09:10 AM|EdKaufmann|LINK
Jeff, thanks for your time and clarification ... although
this opens then the question: why does it (F5) work when using VS20003 (ASP.NET 1.1 and IIS - is this just an accident?!)
When changing, in VS2005, to the 'Custom Server' calling like
http://localhost/.... - ASP.NET 2.0 and IIS is used. Is it by design NOT to support it in ASP.NET 2.0 anymore?
Sep 15, 2006 05:44 PMfirstname.lastname@example.org|LINK
This should work anytime you use IIS, as long as you have enabled ASP in IIS (IIS 6 and above). Are you sure you're using IIS? Is this really
Sep 16, 2006 07:56 AM|EdKaufmann|LINK
... slowly, I guess, I realize what's going on! Be aware, Im using VS2005, WXP Pro and therefore IIS 5.1!
Now, when running the appl in IE (http://localhost/MLMv2) it runs ok
when using ASP.NET server i.e.
http://localhost:1152/MLMv2/Default.aspx I get msg:
Error 1 Failed to map the path '/MLMmisc/Spécial.htm'. C:\Dokumente und Einstellungen\Edi\Eigene Dateien\Visual Studio 2005\WebSites\MLMv2\MasterPage.master 130
Same msg when just doing the 'build' in VS2005! I.e. wherever I use #INCLUDE (SSI) i get above msg!
So my guess: there is something different when using VS2005 with IIS 5.1!?!?
I think I have to live with this or change to W2003 Server with IIS6.0
What do you think?
Thanks anyway for your time, ed
Sep 16, 2006 06:22 PMemail@example.com|LINK
The first uses IIS, the second does not. SSI works in IIS, as expected. In addiion, it looks like your app is in two different locations. I doubt your IIS install is in your profile folders, it's more likely under Inetpup.
Sep 18, 2006 02:37 PM|EdKaufmann|LINK
Jeff, thanks for your patience ..
.. what do you mean my appl is in two different locations?
my appl is in Inetpub. the data (virtual path) is some where on the HD!
What do you mean with "I doubt your IIS install is in your profile folders..." ... which profile ...?
Sep 18, 2006 05:42 PMfirstname.lastname@example.org|LINK
So MLMV2 is a virtual folder then, my mistake. The Documents and Settings folders are part of your profile, each user logged in will have a different folder. And your app still behaves as expected, the SSI is processed in IIS and not in the development
Sep 27, 2006 04:30 PM|rbarrueco|LINK
Im using this <!-- #include virtual="/myfile.inc" --> in an .aspx page. It is hosted on IIS 5 / 2000 and displays correctly.
When I try to debug that same .aspx page, I press play, then I get the error: Failed to map the path '/myfile.inc'
This does not allow me to debug the page. Im coding at my workstation, with the files opened from the server. The files run from the IIS server.
I've looked all over the web for a solution, but most people are lost.
Sep 27, 2006 05:35 PMemail@example.com|LINK
That's working as expected I would think. To convert to ASP.NET, change the include to a user control.
Feb 23, 2010 05:41 PM|jtheoph|LINK
Just came across this thread and found a clear (!) answer on the Microsoft site. Replace the include syntax (old-school ASP) with Response.WriteFile (in-line or in the code behind).
Hope this helps someone out.