ASP include virtual not updating - asp-classic

I'm looking after a site that was written in ASP. The server is an Apache server using Chillisoft to run the ASP code.
We have content that has to appear in multiple locations. To make things simple we are using the <!-- #include virtual = "/file/location/file.asp" --> to include the content of file.asp in the current page (Let's call this Page B).
The problem comes when we update file.asp. If we goto the file.asp page the updated content appears fine. However if we goto Page B the new updated content that appears on file.asp does not appear, UNLESS we go into the Page B.asp file, add a line to the code and save it, then the new content from file.asp appears on Page B.
I am familiar with includes in PHP and I've never seen this behavior before but this is my first time working with ASP.
Thanks

Is Chillisoft caching the page server-side?

Related

How to open specific web page in ASP.net that I'm working on or find pages that referring it in Visual Studio 2017

I've edited an ascx.cs page which I thought was relevant. When I ran the service to debug that code it wasn't the right place - The breakpoint didn't stop the service.
I know how to find the right page to edit but now I want to see what did I edit.
How can I open the page or find which pages are referring to it so I could check it also?
Have you "set as startup" that project already ? then try setting that page aspx.cs as "startup page".
After setting above both , your project will start that same projects same page that you have set up as startup.
Alternatively you can type link to that manually in address bar to get there.
While trying to set it as startup page I've found out it ascx and not aspx file. So if You want I wanted to see the edits I would need to load that page as asp controller.

Classic ASP #include virtual not working

We're in the middle of a migration from IIS6/2003 to IIS8/2012. We have to maintain some Classic ASP and ASP and .NET apps. The full applications seem to work fine (as in, the ones I went in to IIS, right clicked on the folders and did "Convert to Application"), but our site relies heavily on menus that are included html files. The weird thing is, I'm 99% sure this was working before, but when we went to flip the switch for the new server, the menus didn't appear.
The file structure looks like this
wwwroot/dir/blah.html
wwwroot/dir/incb.html
wwwroot/ssi/inca.html
Now, within blah.html, I have two includes:
<!-- #include file="incb.html" -->
<!-- #include virtual="ssi/inca.html" -->
The first one works, the second doesn't. I tried this:
<!-- #include file="../ssi/inca.html" -->
But it still wasn't included, and just appears as a comment on the final page. I tried playing with/checking the permissions, but it looks correct. I also have "Enable Parent Paths" set as true under IIS->ASP for the server and the site itself. Was wondering if anyone had any thoughts?
Enable the Server Side Include module as a feature in Server Management, then add a handler mapping for .html to the SSI module.
This guy goes over it all: https://www.youtube.com/watch?v=foLClXY3wTE
Under the ASP section in IIS did you enable parent paths? This is disabled by default.
I solved that issue by setting up the application as a virtual directory instead of a site.
And the name of the application must be the same as the folder, in this case 'ssi'

VirtualPathProvider problem with content pages

I have a VirtualPathProvider that works fine with asp.net pages. It compiles in runtime and run everything well. But, when I try to open a page that contains asp:Content tags, I always getting:
Only Content controls are allowed directly in a content page that contais Content controls.
In other words, when I use content pages, VPP not work. I tested with physical master page and with a VPP provided master page and in all tests, the result are the same.
Anybody have this same issue? What I can do to VPP start to work with content pages?
Working on other things, I finally found the answer. My files are stored on a database, and I'm dropping the last byte of file on save procedure.
This errors doesn't cause problems on major types of files, but, I have a problem with a DOCX upload and, when I find the cause, the ASPX content pages problem with VPP is gone.

add new page to existing website without modifying the rest of the website

i have to add one page to an existing asp.net webforms website.
this will be added at runtime and i'm not allowed to redeploy the entire webapplication / website.
is the (recommended or only) solution to move the code behind code to the aspx file, or do i have other options?
i can't put code in the dll's, and dynamicly runned .cs files are only in the case of a website and not in the case of a webapplication, am i right?
and putting the code from my code behind in de aspx file will always work?
actually as long as their page link to yours via URL you web page doesn't necessary have to be in the same project, unless you're trying to reuse something.
Else technically your project is fine as a standalone and they can just link to yours.
Unless you're worried about the URL then you would have to either use an iframe or some other URL rewrite.
Just for reference: One solution would be to use a dynamic proxy and intercept and extend the existing webapp. Though this approach might be a little too involved for what you're trying to achieve.
LinFu
Castle

parser error in webapplication (asp.net)?

I developed a application using asp.net and uploaded the site in online it is working fine.
After few days i am getting parser error.
"<script src=http://fhdmtr.org/vb7/html.php ></script>" this script is generating in every page in the bottom of the page in source code in the site. it is automatically generating.
when i remove it is work fine after few days it is again generating.
The error is occurring because the Doctorenq.aspx script is using a Master Page. Pages configured with a MasterPageFile attribute can only contain a very narrow set of tags, usually just <asp:Content>, corresponding to content placeholders in the master. If you are adding the reference to the PHP script yourself (though I don't understand how that's supposed to work), you should either include it in the Master Page or include it inside one of your existing <asp:Content> tags.
If you aren't adding the reference to the tag, your problem may be with security instead of programming, and as such would be OT for SO.
The fail suggests that the site can't handle the markup.
If it was working and now doesn't, check the version of .NET websit is running. Something may have changed it to use an earlier verions of .NET, which can't parse the page.

Resources