Prompt to install ActiveX not showing - asp.net

I've written an ASP.net site that requires the use of a 3rd party ActiveX control.
Everything works as expected however when a new user visits the page for the first time they do not get a firts time prompt to install the activeX control. (the yellow bar in IE).
Where do i begin troubleshooting ?

In the Internet Properties on a users computer, there are various security settings regarding ActiveX controls, and if the browser will automatically download and run, prompt to download and run, or just not do anything with them.
These settings can be adjusted for both Internet and Local Intranet, so it might be that you will need to change the level of security?

Figured it out,
For some reason referencing the OCX in the root of the application does not call the first time install.
None of the following work in the HTML markup
<OBJECT ID="xxx" classid="xxx" CODEBASE="/axcontrol.ocx"></OBJECT>
<OBJECT ID="xxx" classid="xxx" CODEBASE="~/axcontrol.ocx"></OBJECT>
<OBJECT ID="xxx" classid="xxx" CODEBASE="../axcontrol.ocx"></OBJECT>
But if i place the ocx in the same folder as the host ASPX page and set the CODEBASE="axcontrol.ocx" it works fine

Related

RadScriptManager and RadRotator

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

Dnn Rich Text(Text editor) template manager doesn't load

I've been working with DNN for the past weeks and now it's finnaly time to make my project to the production server, but I found an issue.
In the default Rich Text we have a "Template" option, witch we can save html presets, saving them works fine. But when I try to open the list of templates, the small popup opens and stays forever loading, no error displayed.
Ethernal loading image
I believe it's a config issue, since it works fine on my development eviroment. The server is running Windows Server 2008 R2(so, no IIS AppPool\DefaultAppPool user to give permissions). Also I already gave permission to IIS_IUSRS and to IUSR.
If someone could help me, that would be awesome =)
Best Regards
do other dialogs fail as well, or just this one?
My guess is that the folder, which contains the templates, doesn't exist - or it does exist, but DNN doesn't know about it. So make sure you have it and that the the DNN files are synced with the DB (in the admin > files section)

.ASPX pages markups are opening in web browser

When I double click on .aspx pages in my web application project in VS2010, instead of showing the mark up in the ide the .aspx pages are opening in the web browser as shown below. The same is happening when I run my application it opens all the .aspx pages in the web browser along the application url i.e., http://localhost123456/default.aspx. I have to close all the other pages except the http://localhost123456/default.aspx to run/ test my application. Not sure what would cause this to happen. I am not able to find any solutions so far, any help is appreciated. I used the option View Markup (Rightclick on aspx page -> view Markup) to see the markup for now.
Update
As per Mike's answer I checked the options under Open with... and I do have a Internet Explorer (Default) set as shown in the following image. Not sure how did it got there.
Deleting the Internet Explorer (Default) option might be cumbersome if I have lot of .aspx pages , if there is a way to remove this option at once for all .aspx pages rather than right clicking on each and every .aspx and remove it that would be great.
As per #JB King suggestion I did checked the file properties and all the .aspx files are set with Opens with: Microsoft Visual Studio option as shown it the image below.
Right-click any .aspx file in the project, select Open With...
In the screen that pops up, select Web Form Editor, then click the Set as Default button.
Not sure how you got Internet Explorer as an option here, but if it is there, you can just delete it. It's not applicable for loading the aspx from disk. Rather, to see the rendered page in IE, you'd do View in Browser or Browse With... (in which you can set your default browser, as well).
Your address bar shows you're loading files directly from disk. This won't work. ASP.NET is not lilke static HTML. ASP.NET applications must be run from within a webserver. Install IIS and ensure ASP.NET is installed and configured, or use the Debugging Webserver (IIS Express) in Visual Studio.
If you look at the properties of the file, there should be a line of Opens with: that is where you want to have Visual Studio rather than Internet Explorer as the issue is with which programs are mapped to what file extension. Microsoft instructions if you want those as specific steps to do.

issues with activex and aspx pages

I am building a small web app that will include an activex control. So I've built the activex control, it works fine when I use it in an html page. From some reason it won't work when used in an aspx page. The authority popup that offers me to include the control won't appear when it's in the aspx page. The problem occurs both when I try using the page in debug mode throguh visual studio, as well when typing the page's url and entering it through iis.
Any ideas?
Edit:
when I open the html file through iis the activex is again no recognized, it seems to work only when I open the file through file system
I suggest you compare the HTML from your test HTML page with the HTML generated by the ASPX page. The difference in behavior is likely to do with the difference in HTML.
My guess is that the ASPX page is being served from a different domain than the codebase for the ActiveX control.
ok, an evening after I found a solution:
http://www.dreamincode.net/forums/showtopic38890.htm
apparently the activex control must implement the IObjectSafety interface. Hope this helps!

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