RadScriptManager and RadRotator - asp.net

I'm new with this code (Telerik ASP AJAX) there was another guy who is not here anymore, so we can't ask him to help..
There is a page with simple questionary.. it has been working on previous WEB server (based on IIS Windows 7).
After we built the new PC we also installed Win_7 and the same IIS, but the Telerik Version might be freshier.
..
There is a main page with PlaceHolder (PH) with RadScriptManager.
Then, from another code, RadRotator is created and added as a Control to the PH.
..
During debugging everithing is Ok, I can see how the code creates all the elements, creates RadRotator with success, and then the created Rotator is successfully passed to PH container.
''
But at the end of the way there is no Rotator visible at the page.
..
And I can't see it's references to it's script on the page as well.
It should be like that:
<script src="http://some path/2016.3.914/Rotator/RadRotator.js" type="text/javascript"></script>
But there is no such state on the final page.
The IIS is set to Integrated Mode, not Classic. Also the App is under NET4.
Why generally that would be?
If the question is not clear, please, ask me for clarification.

Well, sorry, I forgot to report the answer..
The problem was that in new version
RadScriptManager
should be replaced with
ScriptManager
.

This may be caused by many things and this fix is strange.
Ensure the Telerik CDN is enabled so you get the URLs as you said you expect. You need the RadScriptManager for this
Ensure access to those scripts is provided in your network (monitor the network requests, ensure they return 200 or 304, speakwith your network admins otherwise)
Ensure you are using an official version and not an internal build, only official releases have CDN
if you are using webresource requests, add <location> elements to the web.config to allow anonymous access to the Telerik handlers that fetch the resources

Related

Validation of Viewstate MAC failed (Shared hosting Plesk)

I am using plesk'shared hosting server to host my website. Constantly getting ViewState MAC failed error
Plesk won't be able to provide any Machine Key. As it is shared hosting.
I have also attached the screenshot. please help.
Earlier This issue was coming in one page only. I have resolve it by converting it to JavaScript and ajax call in order to Stop AutoPostBack.
But now this is coming in many pagaes.
Add following link in your web.config file.
Above line should be included within section.
OR
if you don't want this solution to implemented on project level then you can add these attribute to the page(Top most line of HTML view) directive of the page which is creating issue.
That means you have to add enableEventValidation="false" viewStateEncryptionMode="Never" in page directive.

Problem with Default Document and IIS7.5/Windows 7

I'm having a problem with a component used in a Sitecore solution on our Windows 7 workstations that is driving me batty.
In short, the component in question adds <script> tags to the page that load supporting JavaScript files. The src attributes are set to something like:
/path/to/scriptgenerator/?r=1234&p=asdf
Those paths are not working - I'm getting a 404 back.
You might thing "oh ... well, the path doesn't exist." But it does, and it also has a Default.aspx page in it. In fact, if I try the following path, the JS is generated and returned by the server:
/path/to/scriptgenerator/Default.aspx?r=1234&p=asdf
We're testing the site using IIS7.5, not Visual Studio's debugging web server. Of course, on the production machines, which are Win Server 2008, things work just fine.
The component in question is a third-party component and I have no access to the source code, so I can't just modify it to append default.aspx to the SRC path.
I have checked to verify that Default.aspx is set up as a default document for the site, and it is.
I tried to work around the problem using ISAPI_Rewrite, but for some reason, rules that I set up for /path/to/scriptgenerator are ignored.
I've tried the solution described in these questions, and that has no effect on my problem:
IIS 7 Not Serving Default Document
ASP.NET 2.0 and 4.0 seem to treat the root url differently in Forms Authentication
I'm really not sure what to try or look for next ... any suggestions?
Is this component set up within the same IIS Site as the Sitecore application?
If so, have you added path /path/to/scriptgenerator to IgnoreUrlPrefixes setting in web.config?

MS Chart not showing on hosted site

I have a MS Chart component displaying fine on an ASP.Net page. When I deploy it I get a broken image. The settings in the web.config are the same and the temporary images folder has the correct permissions.
When I get the URL of the images I can see that the /.png file is not getting created.
What sort of things do I need to look at to track down the problem?
I was able to resolve the issue by ensuring that my application pool settings was using "ASP .net integrated" and not "ASP .Net Classic". This will ensure that your handler is being used.
I had the same problem when I was working with the charting in .NET 4 and my problem turned out to be related to the default value of the privateImages attribute and the fact that my code wasn't using any identifying attributes for the session or the user.
See my post here for an explanation of how I solved my problem.
It's also worth noting that the ASP.NET Development server ignores the config settings for charting and renders them in memory unless you specifically set an attribute to force it to use your config.

ASP.Net Context.User.Identity weirdness

I have an ASP.Net 3.0 SP1 app that uses Form Authentication.
While testing, I noticed that if I viewed a page that another user was viewing, the other users name would be displayed in the control on my master page. The Context.User.Identity is also for the other user.
If I switch to different page that no one else is viewing the Context.User.Identity is correct.
I stumped and would appreciate suggestions.
Thanks in advance.
Chris
Maybe because output caching is enabled for the page: if the page is cached server-side with VaryByParam=none, all users will get the same copy from the cache.
I can only think of two things that can cause this:
You're storing user-specific data in a place shared between requests (e.g. in a static(C#)/shared(VB) variable, in the ASP.NET Cache, in the Application object, ...)
You have output caching enabled.
Check for:
OutputCache directives in your aspx and ascx files,
system.web/caching element in your web.config file(s),
Calls to the HttpCacheability.SetCacheability method.
If you can't find the problem:
Try creating a simplified version of your application until you get the simplest possible version that still reproduces the undesirable behaviour.
During this process of simplification you'll likely discover the problem for yourself. If not, post some code from the simplified version.
Make sure you are not using a link that comes with the authentication ticket when using a cookieless browser.
Also make sure to review any other that might be sharing the data among requests. Just like DOK said, but remember Application isn't the only way you could be doing that.
It looks like the issue was caused because I setting targetframe="_self" or Target="_self". I removed all these and everything seem to be working fine.
One other note: If I were to refresh the page it would also display the page with the correct user.

ASP.NET theme not rendering correctly

I have a small web application which uses themes. The themes work on host, so on preinit, if the host = a, load x theme, if the host = b, load y theme.
In my code this looks like:
If request.url.host.contains("a") Then
Page.Theme = x
Else
request.url.host.contains("b") Then
Page.Theme = y
I have a url which is a.abc.com and another which is b.abc.com (well it is this structure, but the letters are meaningful/company names). Problem is (and I have done host == ""), when I debug my site on localhost (another clause in the above if block where host = localhost), the style renders perfectly. Alignment of elements are perfect as I expect with the numerical values I have provided for width, margins, etc in the css. But when I use the publish tool of VS2008 (with updatable ticked), and upload to a.abc.com, which has the same stylesheet as localhost (a copy in its own folder), there are all sorts of alignment issues as if I have done no work. Why do my styles render incorrectly # runtime? If it helps, I am using VS2008 Pro Edition, IIS6 and Windows Server 2003.
What is frustrating is that the page source indicates the theme is loading ok, as it is referenced in HTML head. So when I publish, the theme for a.abc.com is loaded and referenced. Other than all this information, there is no obvious sign of what the problem is. I haven't tried to conventionally reference a single CSS file in the ASPX markup, but if I did and this worked, then it doesn't explain the problem either, anyway.
Thanks
Are you setting the Theme early enough in your code? A Theme must be applied to a page very early in the request lifecycle, in the PreInit event, if you do it in code-behind.
Yep, it is on page preinit.
I think it is to do with forms authentication. If I view (not debug) the login page, it picks up the localhost theme and everything is displayed correctly. The login control is in the middle of the page, as it should be, etc.
But if I debug the page and, as you'd expect, the login page is the start/default page, the login control appears to the left as it does when I deploy and the source indicates the css for the appropriate host has been picked up - only when I debug, there is no style applied until I login.
Are you using the built-in web server? When running in ASP.Net Development Server, the styles in App_Themes won't be used on any unauthenticated page (such as Login.aspx or ForgotPassword.aspx). That's because the user doesn't have browse permissions on that folder yet, or the App_Themes folder lacks browsing permissions. Apparently, IIS handles this but Cassini doesn't.
Try adding this to web.config to let Themes and styles work before authentication.
Or, if possible, switch to running the app on IIS on your machine.
I have enabled and installed all the sub features in
Internet Information Services --> World Wide Web Services --> Common HTTP Features
This solved by Theme not working problem.

Resources